Cool, that is what I am looking for. Thanks so much. Cheers, Eric
On 2014-03-20, 1:50 PM, Mirko Friedenhagen wrote:
Eric, when you use the maven-release-plugin a property performRelease is set during release:perform. So define in the pluginManagement section a definition for the maven-failsafe-plugin in your build section: <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.17</version> <executions> <execution> <id>default-integration-test</id> <goals> <goal>integration-test</goal> </goals> </execution> <execution> <id>default-verify</id> <goals> <goal>verify</goal> </goals> </execution> </executions> </plugin> </plugins> </pluginManagement> </build> and later on in your pom <profile> <id>release-run-failsafe</id> <activation> <property> <name>performRelease</name> <value>true</value> </property> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> </plugin> </plugins> </build> <profile> So only during release:perform your integration tests will be executed and success is verified. Regards Mirko -- http://illegalstateexception.blogspot.com/ https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen) https://bitbucket.org/mfriedenhagen/ On Thu, Mar 20, 2014 at 8:32 PM, Eric Kolotyluk <[email protected]> wrote:I am looking for some way to force my integration tests before a release, without explicitly using a profile. For example, <plugin> <artifactId>maven-release-plugin</artifactId> <configuration> <preparationGoals>clean verify site</preparationGoals> </configuration> </plugin> But that doesn't work because unless the failsafe plugin is defined, it won't run the tests. I thought of doing something like <profiles> <profile> <id>run-it</id> <activation> <file> <missing>target/failsafe-reports</missing> </file> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.17</version> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> But that will cause the integration tests to be run after every clean. Is there some way I can trigger the integration tests when doing a release mvn release:prepare without having to do mvn release:prepare -P run-it Cheers, Eric --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
