I have a project setup like this:
parent
|_____project-a
|_____project-b
I want classes in the test folder of project-b to resolve classes in the test folder of project-a.
Actually, I want to access both classes from the main folder and stuff from the test folder.
Is this possible?
Thanks
You can build project A with the goal test-jar
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
Then include it with type test-jar
in project B:
<dependency>
<groupId>com.example</groupId>
<artifactId>project-a</artifactId>
<type>test-jar</type>
<version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With