Trying to go down path #1 right now... I have a plugin mojo which is basically a copy of CompilerMojo, but with a couple parameters (like source and output directories) adjusted so I can specify them in the plugin configuration. Everything compiles fine but when I try to use the plugin I get a NPE in AbstractCompilerMojo. It occurs where it is evaluating the compiler ID. It turns out that the parameters from AbstractCompilerMojo are not injected into the plugin.xml file (not surprising since it is not in the same project).
Is there any way to inject extra parameters into the plugin.xml file? -----Original Message----- From: Allison, Bob [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 18:01 To: Maven Users List Subject: Compiling Multiple Source Trees I would like to set things up in a project to compile a set of mock objects stored in src/mock/java into target/mock-classes. These classes should NOT be included into target/classes, since these classes are not part of the distribution artifact. They need to be assembled into a jar with a classifier of "-mock" for use in other project's unit tests. I am looking at two possible ways of doing this: 1) Write a plugin which extends AbstractCompilerMojo. If I do this, I guess I need to add the compiler plugin as a dependency. I also need to figure out how to populate the List and Set parameter objects (source roots, classpath, includes, excludes) in the plugin configuration element. 2) Add some information to the compiler plugin configuration to add a second execution. To do this, I need to figure out how to specify new values for the expressions such as "${project.compileSourceRoots}" since the actual plugin parameters are read only. Does anybody have any suggestions on how to do either of these options or perhaps another option to consider? --------------------------------------------------------------------- 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]
