1

I have a test which requires the successfully compiled jar to be in the target directory: this is a software that interacts with other programs which get started as a separate process and to test this the test starts a small program from the jar of its own package. This can be "bootstrapped" by first running the build and skipping the tests and then running the build again - but this is not ideal.

Is it possible to create a pom which will first compile, create the jar in target (or somewhere else) then allow the test to run and if anything fails maybe remove the jar again? Or if the jar is created anywhere else just for testing in addition, that would not be a problem.

jpp1
  • 2,019
  • 3
  • 22
  • 43
  • 1
    You want to do integration tests. This happens the package phase so that you can test the packaged project. – Tunaki May 28 '16 at 17:30
  • Look at this question http://stackoverflow.com/questions/1399240/how-do-i-get-my-maven-integration-tests-to-run – Tunaki May 28 '16 at 17:36

0 Answers0