On 30 April 2013 13:20, Stephen Connolly <stephen.alan.conno...@gmail.com>wrote:

> 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
> always.
>
> 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)
>

The advantage of this way is that you are letting people who are on the
Maven way continue the Maven way

e.g. if I go from the root:

mvn -Prun-its verify

It will do what it is supposed to do: build everything and run the
integration tests

and you are still able to do what you want, all from the same set of poms
and all without having to do anything other than standard maven patterns


>
>
> On 30 April 2013 12:48, Stephen Colebourne <scolebou...@joda.org> wrote:
>
>> On 30 April 2013 12:28, Stephen Connolly
>> <stephen.alan.conno...@gmail.com> 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: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>

Reply via email to