Maven surefire plugin run twice with different argLine setttings
} ${APPSERVER_DB_SQLSRV__PORT__RMI} ${junit.test.pattern} -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288014.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire plugin run twice with different argLine setttings
Hi Hugo, Your XML from both of your mails is garbled, unreadable (by Nabble UI if I'm right). Please use proper MUA or even better paste (http://pastebin.com/) or gist ( https://gist.github.com/) them and send the links to them instead. Thanks, ~t~ On Thu, Apr 7, 2011 at 11:03 AM, Hugo de Oude hdo...@allshare.nl wrote: Within our build process we would like to run all unittests twice. Because we would like to test everything against SQL Server and Oracle. To achieve this I added the maven-surefire-plugin to the pom twice. The first one has id 'run_tests_oracle_id' and the second one is called 'run_tests_sqlserver_id'. Now in the configuration I use the argLine to set which database has to be used. But each time when the build is executed the latest configuration of maven-surefire-plugin is used. So it seems not possible to load two maven-surefire-plugins with two different configurations? Does somebody know a solution for this? Main purpose is running all unittest twice on two different databases using maven-surefire-plugin and the itblast-plugin. Thx in advance. run_tests_oracle_id run_tests_oracle org.apache.maven.plugins maven-surefire-plugin 2.8 false ${VMARGS__TEST_PROPERTY_FILE_ORACLE} ${VMARGS__MAVEN_SUREFIRE_PLUGIN_1} false c:/_composer/_config/libraries/picketlink-bindings-1.0.4.final.jar org.twdata.maven maven-itblast-plugin 0.5 itblast_oracle post-integration-test execute tomcat5x ${APPSERVER_DB_ORACLE__PORT__HTTP} ${APPSERVER_DB_ORACLE__PORT__RMI} ${junit.test.pattern} run_tests_sqlserver_id run_tests_sqlserver org.apache.maven.plugins maven-surefire-plugin 2.8 false ${VMARGS__TEST_PROPERTY_FILE_SQLSERVER} ${VMARGS__MAVEN_SUREFIRE_PLUGIN_2} false org.twdata.maven maven-itblast-plugin 0.5 itblast_sqlserver verify execute jetty6x ${APPSERVER_DB_SQLSRV__PORT__HTTP} ${APPSERVER_DB_SQLSRV__PORT__RMI} ${junit.test.pattern} -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288014.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire plugin run twice with different argLine setttings
Oh I'm sorry. I tried to correct the problem and hopefully it is ok now? -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288110.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire plugin run twice with different argLine setttings
still bad... i'm going to guess that you defined the plugin twice, e.g. plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin instead of adding an extra execution to the plugin plugin artifactIdmaven-surefire-plugin/artifactId executions execution idora/id configuration ... /configuration /execution execution idmssql/id configuration ... /configuration /execution /execution /plugin Now you should note that the above will run the tests three times! (there is a default execution of the plugin) In Maven 3.x you can disable the default execution with execution iddefault-test/id configuration skipTeststrue/skipTests /configuration /execution That won't work for Maven 2.x so if you need to support building with Maven 2.x then you either define one execution's configuration in the plugin configuration and reset the configuration back in the second configuration (i.e. you only have one execution defined in your pom) plugin artifactIdmaven-surefire-plugin/artifactId !-- by default use ora config -- configuration ... /configuration executions execution !-- add one execution for mssql -- idmssql/id configuration ... /configuration /execution /execution /plugin or you do something like plugin artifactIdmaven-surefire-plugin/artifactId configuration skipTeststrue/skipTests /configuration executions execution idora/id configuration skipTests${skipTests}/skipTests ... /configuration /execution execution idmssql/id configuration skipTests${skipTests}/skipTests ... /configuration /execution /execution /plugin which will disable surefire by default and re-enable it based on the skipTests property for the two executions. On 7 April 2011 10:55, Hugo de Oude hdo...@allshare.nl wrote: Oh I'm sorry. I tried to correct the problem and hopefully it is ok now? -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288110.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire plugin run twice with different argLine setttings
On 7 April 2011 12:08, Stephen Connolly stephen.alan.conno...@gmail.com wrote: still bad... i'm going to guess that you defined the plugin twice, e.g. plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin Forgot to mention... I can conclude you are using Maven 2.x... Maven 3.x will tell you to take a long walk off a short pier if you attempt to duplicate the same plugin in the pom. Maven 2.x will just merge the two which is why the last one wins for you instead of adding an extra execution to the plugin plugin artifactIdmaven-surefire-plugin/artifactId executions execution idora/id configuration ... /configuration /execution execution idmssql/id configuration ... /configuration /execution /execution /plugin Now you should note that the above will run the tests three times! (there is a default execution of the plugin) In Maven 3.x you can disable the default execution with execution iddefault-test/id configuration skipTeststrue/skipTests /configuration /execution That won't work for Maven 2.x so if you need to support building with Maven 2.x then you either define one execution's configuration in the plugin configuration and reset the configuration back in the second configuration (i.e. you only have one execution defined in your pom) plugin artifactIdmaven-surefire-plugin/artifactId !-- by default use ora config -- configuration ... /configuration executions execution !-- add one execution for mssql -- idmssql/id configuration ... /configuration /execution /execution /plugin or you do something like plugin artifactIdmaven-surefire-plugin/artifactId configuration skipTeststrue/skipTests /configuration executions execution idora/id configuration skipTests${skipTests}/skipTests ... /configuration /execution execution idmssql/id configuration skipTests${skipTests}/skipTests ... /configuration /execution /execution /plugin which will disable surefire by default and re-enable it based on the skipTests property for the two executions. On 7 April 2011 10:55, Hugo de Oude hdo...@allshare.nl wrote: Oh I'm sorry. I tried to correct the problem and hopefully it is ok now? -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288110.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire plugin run twice with different argLine setttings
Thanks for your information. At the moment we cannot switch to Maven 3 yet. I understand the part to take up multiple executions within the same surefire plugin. But how will this work combined with the itblast-plugin. Normally the itblast-plugin sets the goal (execute) and to be able to run the itblast-plugin it uses the surefire plugin. Then itblast is instructed to run the tests against for instance a jetty6x container. And to use the itblast-plugin a surefire plugin is needed. But I don't know if adding more executions to the surefire plugin will work for me. Because actually the itblast-plugin should have two executions if I understand his correctly. -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288333.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org