Solved the problem myself - thanks. It was a typo and Maven instantiated an empty project instance. I need to be spanked for blindness ;-)
Regards Alexander von Zitzewitz www.hello2morrow.com SonarJ Elevator Pitch: http://www.hello2morrow.com/videos/benefits +1 (877) 294-6327 ------ Forwarded Message From: Alexander von Zitzewitz <a.zitzew...@hello2morrow.com> Reply-To: Maven Users List <users@maven.apache.org> Date: Wed, 21 Oct 2009 14:49:04 -0400 To: Maven Users List <users@maven.apache.org> Subject: Problem with ${executedproject.compileSourceRoots} 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 ------ End of Forwarded Message --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org