Hello !
I am working on a plugin that needs to make sure that code is generated and
everything is compiled. It then uses compileSourceRoots and target/classes
to perform some static analysis on the code.
The header of my Mojo looks like
/**
* Create SonarJ dependency XML report.
*
* @goal sonarj
* @execute phase="compile"
*/
Before I tried to bind it to the ³verify² phase, but compileSourceRoots
never contained the directories for generated sources unless the plugin was
called as part of the ³verify² phase. If the plugin was called alone with
³mvn sonarj:sonarj² no phases are executed so that the generated-sources
dircetories are not known to Maven and therefore also not known to my
plugin.
When I use execute-phase=²compile² it gets even worse. Now code generators
and compiler are run, but ${executedProjects.compileSourceRoots} is an empty
list. What am I missing here?
I am using
mvn --version
Apache Maven 2.1.0 (r755702; 2009-03-18 15:10:27-0400)
Java version: 1.6.0_15
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
Any help would be greatly appreciated
Regards
Alexander