maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <>
Subject Re: Testing jar files instead of class files
Date Tue, 30 Apr 2013 12:20:34 GMT
Well how I normally do something like that is I put the failsafe execution
in a profile, which by convention is called `run-its`

So to build everything and install in the local repository cache:

mvn install

To build everything and install in the local repository cache with
integration tests run:

mvn -P+run-its install

The second invokation will also rebuild the artifacts.

Note I typically will have the release profile activate the integration
tests also such that the integration tests are run on all release artifacts

If, however, you want to be able to test the build artifacts without
rebuilding them, then you really just need to factor the tests into a
separate module and just run that module.

So, you would have a separate module called integration-tests that has its
tests added via the run-its profile

mvn install

will install everything (including the dummy integration-tests module)

mvn -Prun-its -pl integration-tests verify

will just run the integration tests module with the integration test
profile added (so that this time the integration tests are run)

On 30 April 2013 12:48, Stephen Colebourne <> wrote:

> On 30 April 2013 12:28, Stephen Connolly
> <> wrote:
> > What you actually want to do is run your second set of tests after the
> > 'package' phase and before the 'install' phase. There is only the
> 'deploy'
> > phase after the 'install' phase so there would be no scope to run tests
> > after the 'install' phase.
> Thanks for the suggestion, but my question is around doing this in two
> separate command line invocations, not one.
> Iin a large multi-module build, I need to complete the full install
> for all modules (for speed). Only at that point do I want to stop and
> separately (perhaps on demand) run the additional tests.
> Unless what you're indicating is a way to run the second maven build
> without running the phases before integration-test?
> Stephen
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message