Transform your project into a multi-module assembly . In the first module, create an original project. In the second module, add the dependency to the first.
This will add the first JAR to the classpath.
Update from OP: this works, but I had to add this to my POM:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${version.maven-surefire-plugin}</version> <configuration> <useSystemClassLoader>false</useSystemClassLoader> </configuration> </plugin>
The important part is <useSystemClassLoader>false</useSystemClassLoader>
. Without this, my class path only contained a couple of JAR virtual machines, as well as a boot JAR (which contains the class test path in MANIFEST.MF
). I do not know why this class test path is not visible from the classes loaded from it.
source share