Description
I'm running into (what appears to be) the exact same problem that Tom Huybrechts described on the Maven user list a few months ago (quoted below), with Maven v2.0.6, maven-plugin-plugin v2.3, and maven-plugin-tools-api v2.1.
I attach a patch that fixes the problem for me.
Output:
[INFO] [site:site]
[INFO] Skipped "About" report, file "index.html" already exists for the
English version.
[INFO] Skipped "Maven Surefire Report" report, file
"surefire-report.html" already exists for the English version.
[INFO] Generate "Plugin documentation" report.
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 3 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.filterParameters(PluginXdocGenerator.java:253)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeGoalParameterTable(PluginXdocGenerator.java:239)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeBody(PluginXdocGenerator.java:122)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.processMojoDescriptor(PluginXdocGenerator.java:61)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.execute(PluginXdocGenerator.java:49)
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)
On 2007-01-03, Tom Huybrechts wrote:
> > Hi folks,
> >
> > I'm getting aNPE when generating a site for a plugin. It looks like
> > the java mojos get processed OK, but when it looks for bsh mojos
> > (which I don't have) the NPE is thrown.
> >
> > Running 2.0.4 with the latest releases of all plugins
> >
> > Any tips ?
> >
> > [INFO] [site:site]
> > [WARNING] No URL defined for the project - decoration links will not be resolved
> > [INFO] Generate "Plugin documentation" report.
> > [INFO] Using 2 extractors.
> > [INFO] Applying extractor for language: java
> > [INFO] Extractor for language: java found 15 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.filterParameters(PluginXdocGenerator.java:245)
> > at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeGoalParameterTable(PluginXdocGenerator.java:231)
> > at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeBody(PluginXdocGenerator.java:122)
> > at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.processMojoDescriptor(PluginXdocGenerator.java:61)
> > at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.execute(PluginXdocGenerator.java:49)
> > 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)
Attachments
Attachments
Issue Links
- is duplicated by
-
MPLUGIN-31 The plugin:xdoc produce a null pointer exception when no parameter is provided
- Closed
- relates to
-
MPLUGIN-114 PluginXdocGenerator NullPointerException
- Closed