Hello there
I'm writting a plugin which is supposed to do a few things:
1) Compile test classes to be run in integration-test phase
2) Start tomcat
3) Run tests
4) Stop tomcat
Steps 2, 3 and 4 are almost done. The main problem is step 1.
I thought it would be too much to do by implementing compilation from
scratch therefore I simply created a class extending TestCompilerMojo class.
Unfortunatelly it doesn't work, throws exception because CompilerManager
is not initialized. I tried to make it by myself by setting necessary
field in execute() method (compilerManager, compilerId) and now it
doesn't throw any exceptions.
In plugin configuration I've placed 'compileSourceRoots' and
''outputDirectory' but it seems that these values are not set because I
got a message:
'[INFO] No sources to compile'
Can someone point me to some tutorial or HOWTO describing all necessary
steps to make it work?
I don't want to place integration tests in the same directory as normal
junit tests because these tests are supposed to be run after tomcat is
started with web application running in the *integration-test* phase not
the *test* phase. If they were placed in src/tests the *package* phase
would return error since there would be no webapp running *(test* is
before *package* phase).
Thanks in advance.
Pablo