Build of multimodule maven project is failed, but each module builds successfully

84 views Asked by At

I have a strange issue with multimodule maven project. It consists of several modules(16 modules) and there are three modules that cannot be built successfully together(Let's name them A, B, C) because of C is failed. Build is successful when I remove module A or B from the project. Build is also successful when only A,B,C are built (I use mvn -pl A,B,C clean install). The strangest thing is the issue observed only on Mac. Each of modules A,B,C consists of several JBehave functional tests. Stories are started by jbehave-maven-plugin in the integration-test phase. Each story tests SOAP web-service that deployed by cargo-maven-plugin. Here are the jbehave embedder code:

public class SampleEmbedder extends Embedder {

@Override
public EmbedderControls embedderControls() {
    return new EmbedderControls().doIgnoreFailureInStories(true).doIgnoreFailureInView(true);
}

@Override
public Configuration configuration() {
    Class<? extends SampleEmbedder> embedderClass = this.getClass();
    return new MostUsefulConfiguration()
               .useStoryLoader(new LoadFromClasspath(embedderClass.getClassLoader()))
               .useStoryReporterBuilder(new StoryReporterBuilder()
                                            .withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass))
                                            .withDefaultFormats()
                                            .withFormats(CONSOLE, TXT, HTML, XML)
                                            .withCrossReference(new CrossReference()))
               .useParameterConverters(new ParameterConverters()
                                           .addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")))) // use custom date pattern
               .useStepMonitor(new SilentStepMonitor())
               .usePendingStepStrategy(new FailingUponPendingStep()
               );
}

@Override
public InjectableStepsFactory stepsFactory() {
    return new SpringStepsFactory(configuration(), createContext());
}

private ApplicationContext createContext() {
    return new SpringApplicationContextFactory("spring/application-context.xml").createApplicationContext();
}
}

The issue vanishes when I delete from B all the stories and comment out all the code within steps classes. Maybe this is caused by spring context, or something else. I can't get rid of this issue for a long time. So, the question is, how can I troubleshoot this issue or what is the cause?

0

There are 0 answers