I have a maven project (Project 1) which is intended for executing
integration tests. Inside this project is an additional class that helps me
automate the deployment of various jars to a nexus repo.
Project 1 is dependent on those jars (SNAPSHOT).
Project 2 is dependent on those jars (SNAPSHOT).
Project 1 is also dependent on project 2. (SNAPSHOT).
STEP 1: My CI server (TeamCity) runs a daily build config called "Deploy
Jars" @ 4:00 AM on Project 1, with Maven phase: "pre-integration-test".
pre-integration-test runs a testNG suite that has the class for deploying
those jars to the repo. Works fine. Only that class runs.
STEP 2: Next, my CI server has a build trigger for project 2 (to compile and
deploy) to occur anytime "Deploy Jars" is successfully built. This works --
project 2 is built (and project 2 updated its SNAPSHOT dependencies on those
Jars that were sent to the repo in step 1). Project 2 is compiled and it's
.jar deployed to the repo as well.
STEP 3: Back to Project 1. Now that all the .jars have been uploaded to the
repo (various jars, including the .jar for project 2, as described in step
2), A Maven build is run with phase "integration-test".
Unfortunately when I do STEP 3, Maven ends up also RE-RUNNING
pre-integration test prior to integration-test, which basically reruns the
actions that already occurred in STEP 1. (i.e. all those jars are sent to
the repo again).
That probably makes sense, in that Maven is probably hardwired to run
"pre-integration-test" any time I ask it to run "integration-test".
I'd like to find a way out of this -- any suggestions? Is there another
maven "phase" I can take advantage of here, to accomplish my objective?
Basically, I don't want step 3 (integration-test) to re-copy those jars to
the repo, it's a waste of time, etc.
Thanks in advance!
Bonus question -- am I getting 'phase' and 'goal' mixed up? My POM file says
that "pre-integration-test" and "integration-test" are "phases". They both
have a "goal" of "test". But in my CI server, I have "pre-integration-test"
and "integration-test" listed as GOALS the maven build configuration on the
CI server, and that seems to be working (for the most part). In other words
the build configuration for STEP 1 only lists "pre-integration-test" for a
goal, and that works, but the POM file only lists "pre-integration-test" as
View this message in context: http://maven.40175.n5.nabble.com/integration-test-testNG-and-a-CI-server-tp5726939.html
Sent from the Maven - Users mailing list archive at Nabble.com.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com