[moved to [EMAIL PROTECTED] from dev] On 10/13/07, Jan Nielsen <[EMAIL PROTECTED]> wrote: > Ahh, thanks, Wendy - if the "deploy" is just a deploy to the > repository then, presumably, we would execute an > application-server-deploy of the package artifact during the > "pre-integration-test" phase, right? > > Our project is structured as a multi-module project ala Proficio with > pom.xml files at each module level: > > foo-bar\widget\widget-api\src\main\java > foo-bar\widget\widget-cli\src\main\java > foo-bar\widget\widget-cli\src\test\java > foo-bar\widget\widget-jsf-portlet\src\main\java > foo-bar\widget\widget-jsf-portlet\src\main\webapp\WEB-INF\classes > foo-bar\widget\widget-jsf-portlet\src\main\webapp\jsp > foo-bar\widget\widget-jsf-portlet\src\test > foo-bar\widget\widget-jsf-portlet\src\test\java > foo-bar\widget\widget-jsf-portlet\web > foo-bar\widget\widget-jsf-portlet\web\WEB-INF > foo-bar\widget\widget-migration\src\main\java > foo-bar\widget\widget-migration\src\test\java > foo-bar\widget\widget-persistence\src\main\java > foo-bar\widget\widget-persistence\src\test\java > foo-bar\widget\src\site\xdoc > foo-bar\migration\src\main\java\foo > foo-bar\migration\src\schema > foo-bar\migration\src\test\java > foo-bar\resources > foo-bar\src\site\resources > foo-bar\src\site\xdoc > > The functional tests are not currently in a separate module, though > that is something we are considering. Is there an advantage to this?
Yes. You typically don't want to run this kind of test every time you build, and having them in a separate module makes it easier to control when they run. Also, Maven's support for integration testing isn't as good as for regular unit testing. But it can work as long as you don't _also_ have unit tests in that same module. There are some notes on the wiki: http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing If you're using Surefire to execute the tests, then you can use the usual test phase. Or, you can use 'pom' packaging and explicitly bind executions of things where you need them. Take a look at Cargo to start and stop the app server. It's best done with the Java API and not with the Maven plugin. There are also some issues with the order of the phases-- as you pointed out, deploy is at the end, right after install (to the local repo). So if your test tries to grab something from the repository, be aware that you're not testing the current build. I haven't worked on this problem for quite a while so I'm sure more progress has been made. -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
