On 26 March 2014 07:34, Eric Kolotyluk <eric.koloty...@gmail.com> wrote:
> I have tried to get this working, but it does not seem to work. When I do > > mvn release:prepare > > I get > > [INFO] Executing: cmd.exe /X /C "D:\bin\Apache\apache-maven-3.1.1\bin\mvn > -s C:\Users\Eric\AppData\Local\Temp\release-settings2652114304406041143.xml > clean verify site --no-plugin-updates -Psonatype-oss-release -P > user,local-repository" > > In the output I can see the 'clean' and the 'site' happen, but the > failsafe integration tests do not run. If I do > > mvn verify -P run-it > > then the integration tests run as normal. > What is -X telling you? Is the variable performRelease actually set? Looking at org.apache:apache:10 the release-plugin is configured different to the docs. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.1</version> <configuration> <useReleaseProfile>false</useReleaseProfile> <goals>deploy</goals> <arguments>-Papache-release</arguments> </configuration> </plugin> i.e. it disables useReleaseProfile and forces the apache-release profile to be used. I've had a quick look at the code, and I dont think this variable will be set on prepare. The performRelease variable looks like it is only set on "perform" not "prepare". http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile You can use http://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#argumentsto provide additional arguments to the release plugin. The code in AbstractReleaseMojo.createReleaseDescriptor() builds a list of active profiles and so you can just configure the release plugin to include "-P run-its" (which is the profile name used in org.apache.maven.plugins:maven-plugins:22 so I assume its the preferred name) Since it is the same plugin, I dont think you are going to be able to separate out running the integration tests only in prepare. They are going to be run again in perform. This is probably not a bad thing.