Reputation: 1
I have two maven projects:
I want to build a jar where both the class files are included from the project in the 2nd project's pom.xml file.
What type of plugin can do the job? I have tried using maven jar plugin and assembly plugin but neither of them solved my problem.
Upvotes: -1
Views: 671
Reputation: 13876
Both your tests and your main classes should be included in the same project, not separately. A test suite should not be a separate "module" that is imported as a dependency via pom.xml
. Just as @J Fabian Meier pointed out - the tests are not included in your output file when compiled - they are just there to be ran while building to test your classes.
It's very unclear what you're trying to achieve. You might want to go through how a standard Maven project directory layout should look like.
Upvotes: 0