On Wednesday 03 January 2018 13:35:13 Konrad Windszus wrote: > > Adding an additionalClasspathElement in Parent (see my comment in > > SLING-7347) or a third option as 1) will not work in Parent. > > > > O. > > > > p.s.: the issue is with depends-maven-plugin not Exam itself > > I am not sure I can follow here. Actually adding > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-failsafe-plugin</artifactId> > <version>2.20.1</version> > <configuration> > <!-- do not use generated JAR but instead the classes directory to > make sure that the file being generated from the depends-maven-plugin is > being found by failsafe as well > (https://issues.apache.org/jira/browse/SUREFIRE-1343) --> > <classesDirectory>${project.build.outputDirectory}</classesDirectory> > </configuration> > </plugin> > {code} > > solves the issue for me. I would not add this configuration to the parent > though, as usually (outside of the pax exam context) you are interested > only in the generated JAR but not in the classes directory in your ITs!.
Pax Exam is running fine with the generated JAR and only META- INF/maven/dependencies.properties is missing for depends-maven-plugin. Therefore I prefer a third option which is configured in Parent, adds dependencies.properties to the JAR if present and leaves everything else as is. Not sure why dependencies.properties is not picked up at all. > Using additionalClasspathElement (as proposed previously) is not good, as > that will put every class two times in the classpath (first within the JAR > then in the "classes" folder). Do you think that adding this configuration > to all modules leveraging pax exam will work? Sure, but it's an *ugly* workaround. O. > Konrad
