On 24/03/2008, Benson Margulies <[EMAIL PROTECTED]> wrote: > > I defined a new Mojo by extending AbstractCompilerMojo from the > maven-compiler-plugin. > > It doesn't work, because the @component annotation for the compiler > manager > on AbstractCompilerMojo doesn't happen. > > Obviously, it works in the CompilerMojo. > > As an experiment, I made a copy of AbstractCompilerMojo co-located with my > Mojo class. That works. > > The only information I've managed to scavenge suggested that plexus > annotations don't work on base classes at all, so I'm stumped. >
actually it's because the plexus annotations are javadoc annotations, and so aren't available to your project when you're compiling against the binary jar - as you say, if you use the original source then it's ok. this is the main issue: http://jira.codehaus.org/browse/MNG-3042 and there is a workaround: http://www.ops4j.org/projects/pax/construct/maven-inherit-plugin but it requires you to have the original plugin as a dependency in your new plugin project, which is not recommended practice HTH -- Cheers, Stuart
