There is a phase integration-test.

I think you could bind different existing plugin (compile, cargo, surefire)
using the execution, phase and goal tags.

I hope this info will guide you toward the solution you need.

Gilles

> -----Original Message-----
> From: Pablo [mailto:[EMAIL PROTECTED]
> Sent: 05 January 2006 10:43
> To: Maven Users List
> Subject: Integration testing
> 
> Hello everyone
> 
> I'm trying to include integration tests into my maven project.
> I've accomplished the task but had to write my own plugin.
> Since I don't know maven2 too well I'd like to ask you a few questions.
> 
> My plugin does the following:
> 1) compiles integration tests
> 2) starts tomcat using cargo
> 3) runs tests
> 4) stops tomcat
> 
> Junit tests are run before the 'package' phase so there is no
> application to be tested yet.
> Therefore if integration tests were in the same directory as the junit
> tests, the test phase would fail.
> 
> That's why I use two test directories:
> 1) src/tests for junit tests
> 2) src/integration-tests for integration tests
> 
> I'd like to use maven code as much as possible therefore I'd like to
> remove the 1st section (compilation of tests).
> Right now the compilation of tests is done in a similiar way as in
> TestCompilerMojo.java.
> I wanted to extend this class but the fields: compileSourceRoots and
> outputDirectory are read only.
> So I would have to create a few fields with different names, and when
> they are set in plugin's configuration I could set the proper ones
> through reflection. It's not a good approach I agree.
> 
> It would be even more convenient if I could use the existing compiler
> plugin and could simply set different paths.
> The junit tests would be compiled in a standard way by setting
> <testSourceDirectory> and integration tests would be compiled using
> different source directory to a different output directory.
> 
> The question is, how can I do it? How can I use maven-compiler-plugin
> two times with different source and destination paths? Can someone send
> me a few lines of pom which does it?
> 
> Thanks in advance
> Pablo
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to