On Tue, Dec 21, 2010 at 12:32 PM, Benson Margulies <bimargul...@gmail.com> wrote: > Maven 2.2.1. > > I have a profile that turns on skipTests. Mvn -Pthisprofile behaves as > expected. > > mvn release:prepare --batch-mode -Pthisprofile > > goes ahead and runs tests. > > mvn --batch-mode help:effective-pom help:active-profiles > release:prepare -Pfastinstall -DdryRun=true > > shows no skipTests in pluginManagement, but > <skipTests>true</skipTests> under plugins. > > And yet the tests run. > > I don't know how to try to diagnose this.
The profile that is active for the release:prepare execution (which you launch from the command line) is not used during the execution of the preparation goals, which is done in a forked lifecycle (apologies if I'm abusing terminology here). If you think about it, it would make builds more difficult to reproduce if it were done that way. You may be able to accomplish what you want by adding an "arguments" setting to your configuration (that would include something like -Pfastinstall). But be careful; the configuration might be used during release:perform as well -- you *definitely* don't want to skip any tests in that step. If you're just looking to avoid test execution during release:prepare, it might be simpler to just specify preparationGoals to stop earlier in the lifecycle (for example, something like "clean test-compile"). But that would depend on your build and whether it's important to you to do anything like "package" during the prepare step. I have builds for which the preparationGoals is set to "clean validate", because I want the release to happen (or fail) as fast as possible, and I don't mind wasting a version number or two on a failed release:perform. But that wouldn't work for everyone. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org