See <http://jira.codehaus.org/browse/MNG-2981> for a patch that fixes this. - Steve
Jason Dillon wrote: > As many of you know I've been working on Groovy integration for Maven > 2... and I've recently (er well a few weeks ago) gotten things hooked up > to allow mojos to be implemented in Groovy. > > I've started to use this to build other plugins, but I've just run into > a rather annoying problem with the site plugin, in that it is not > correctly picking up the dependency configuration of the > maven-plugin-plugin when generating the plugin's descriptor in the reactor. > > Too hook up the Groovy bits you basically need something like this: > > ----8<---- > <project> > .... > <packaging>maven-plugin</packaging> > .... > <build> > <plugins> > <plugin> > <groupId>org.codehaus.mojo.groovy</groupId> > <artifactId>groovy-maven-plugin</artifactId> > <version>1.0-alpha-3-SNAPSHOT</version> > <executions> > <execution> > <goals> > <goal>compile</goal> > </goals> > </execution> > </executions> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-plugin-plugin</artifactId> > <dependencies> > <dependency> > <groupId>org.codehaus.mojo.groovy</groupId> > <artifactId>groovy-mojo-tools</artifactId> > <version>1.0-alpha-3-SNAPSHOT</version> > </dependency> > </dependencies> > </plugin> > </plugins> > </build> > </project> > ---->8---- > > When running `mvn install`, either from the module directory, or when > using the reactor, everything works fine as expected, and it spits out > something like: > > <snip> > [INFO] [plugin:descriptor] > [INFO] Using 3 extractors. > [INFO] Applying extractor for language: java > [INFO] Extractor for language: java found 0 mojo descriptors. > [INFO] Applying extractor for language: bsh > [INFO] Extractor for language: bsh found 0 mojo descriptors. > [INFO] Applying extractor for language: groovy > [INFO] Extractor for language: groovy found 1 mojo descriptors. > </snip> > > If you run `mvn site` from the module directory, it also works just > fine. BUT, if you run `mvn site` using the reactor, then when it gets > to the maven-plugin with the above configuration to hookup Groovy > support, then report fails: > > <snip> > [INFO] Generate "Plugin documentation" report. > [INFO] Using 2 extractors. > [INFO] Applying extractor for language: java > [INFO] Extractor for language: java found 0 mojo descriptors. > [INFO] Applying extractor for language: bsh > [INFO] Extractor for language: bsh found 0 mojo descriptors. > [INFO] > ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] null > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > java.lang.NullPointerException > at > org.apache.maven.tools.plugin.generator.PluginXdocGenerator.execute(PluginXdocGenerator.java:46) > > at > org.apache.maven.plugin.plugin.PluginReport.generatePluginDocumentation(PluginReport.java:192) > > at > org.apache.maven.plugin.plugin.PluginReport.executeReport(PluginReport.java:141) > > at > org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98) > > at > org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:67) > > at > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:239) > > at > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:115) > > at > org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:124) > at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:92) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > </snip> > > and the descriptor generation that happens at the very beginning also > fails (even though when run with `mvn install` this works just fine): > > <snip> > [INFO] [plugin:descriptor] > [INFO] Using 2 extractors. > [INFO] Applying extractor for language: java > [INFO] Extractor for language: java found 0 mojo descriptors. > [INFO] Applying extractor for language: bsh > [INFO] Extractor for language: bsh found 0 mojo descriptors. > </snip> > > * * * > > This is highly annoying... as it basically means that I can not generate > sites from multi-module builds which have maven-plugins implemented in > Groovy (or really, any other custom language). > > Is there a way around this problem... or better yet how can we get this > fixed so that when the site plugin executes in the reactor that it picks > up the correct dependencies for the maven-plugin-plugin and generates > the proper plugin descriptor? > > --jason --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]