-1

I have two maven projects:

  1. This is the framework project and has the dependency classes in the src/main/java
  2. This is the project that contains my test scripts in the src/test/java

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.

petrov.aleksandr
  • 622
  • 1
  • 5
  • 24
aadhi00
  • 1
  • 1

1 Answers1

0

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.

Dropout
  • 13,653
  • 10
  • 56
  • 109