[ http://jira.codehaus.org/browse/MNG-591?page=comments#action_42866 ]
Kenney Westerhof commented on MNG-591: -------------------------------------- Yes, the entire thing could be just a single plugin. I also talked to jdcasey, and we liked the following approach: src/itest/projects/project-a/ [pom.xml, etc] src/itest/projects/project-b/ [pom.xml. etc] Each project would be executed (an 'm2 install' forked somehow) in a new environment containing the artifact[s] of the project (the one the src/itest dir is a part of). This way plugins can be easily tested - you still need to specify that you want to use the plugin in the project-a's pom, of course. The same goes for 'normal' projects, like those with packaging war/ear. The nested test project could use normal tests to test the artifact, for instance using cargo in a Suite to deploy the artifact and then run tests. The artifact here is from the project being integration-tested. It can be referenced by defining a dependency in the nested test project, and a different ArtifactFactory will be used in the forked lifecycle, so that the packaged (but not installed) artifact gets picked up from the target/ dir. So basically, the integration-test could stay unmodified, as long as it's possible to fork an m2 lifecycle on a different project (than a clone of the current one). This would mean exposing more of the lifecycle to plugins. Even better, per packaging a different integration-test plugin/mojo could be used, because plugins / war / ear / ejb / etc may need different test circumstances. But this could also be specified in the nested test projects. > Integration tests lifecycle > --------------------------- > > Key: MNG-591 > URL: http://jira.codehaus.org/browse/MNG-591 > Project: Maven 2 > Type: Improvement > Reporter: Kenney Westerhof > > > I'm trying to do an integration test that depends on a war/ear to be deployed. > What i'm missing is: > - integration-test-compile stage and/or: > - a way to specify an integrationTestSourceDirectory or multiple > testSourceDirectories in the pom > I can't put the test sources in src/test/java because then surefire will run > them in the test stage, when > there's no artifact to deploy yet. > [Btw, I'm doing this while creating a cactus plugin, for the moment using > cargo in the TestSuite itself to deploy.] > The idea is that the integration test sources go in src/itest/*; that there > be a integration-test-compile, > integration-test-package and/or integration-test-appdeploy[or something] and > that surefire > is also bound to integration-test. > Maybe something can be done using the src/test/project/some-project/.... > approach seen in > maven-javadoc-plugin, maven-site-plugin and maven-eclipse-plugin (i'd like to > see some of that > standardized anyway to allow plugin testing generally - which can also be > seen as integration testing). > Thoughts, comments, approaches? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
