[
http://jira.codehaus.org/browse/MJAVADOC-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed MJAVADOC-251.
--------------------------------------
Assignee: Benjamin Bentmann
Resolution: Fixed
Fix Version/s: 2.6.1
Fixed in [r800618|http://svn.apache.org/viewvc?view=rev&revision=800618].
> Configuration of javadoc:javadoc fails with NPE upon disadvantageous order of
> config injection
> ----------------------------------------------------------------------------------------------
>
> Key: MJAVADOC-251
> URL: http://jira.codehaus.org/browse/MJAVADOC-251
> Project: Maven 2.x Javadoc Plugin
> Issue Type: Bug
> Affects Versions: 2.6
> Reporter: Benjamin Bentmann
> Assignee: Benjamin Bentmann
> Priority: Critical
> Fix For: 2.6.1
>
>
> Compare these two logs from Maven 3.x
> {noformat}
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-javadoc-plugin:2.5:javadoc' with basic
> configurator -->
> [DEBUG] (f) nosince = false
> [DEBUG] (f) use = true
> [DEBUG] (f) bootclasspathArtifacts = []
> [DEBUG] (f) links = []
> [DEBUG] (f) encoding = UTF-8
> [DEBUG] (f) aggregate = false
> [DEBUG] (f) tags = []
> [DEBUG] (f) isOffline = false
> [DEBUG] (f) useStandardDocletOptions = true
> [DEBUG] (f) taglets = []
> [DEBUG] (f) doctitle = Maven Ant Plugin 2.3-SNAPSHOT API
> [DEBUG] (f) resourcesArtifacts = []
> [DEBUG] (s) reportOutputDirectory =
> M:\maven\plugins\maven-ant-plugin\target\site\apidocs
> Unable to parse the created DOM for plugin configuration
> org.apache.maven.plugin.PluginConfigurationException: Unable to parse the
> created DOM for plugin configuration
> at
> org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:611)
> at
> org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:564)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:336)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:281)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:208)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:181)
> at
> org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:467)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:163)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:56)
> 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:597)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
> Caused by:
> org.codehaus.plexus.component.configurator.ComponentConfigurationException:
> Setter
> org.apache.maven.plugin.javadoc.JavadocReport.setReportOutputDirectory(
> java.lang.Class )
> threw exception when called with parameter
> 'M:\maven\plugins\maven-ant-plugin\target\site\apidocs': null
> at
> org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.setValueUsingSetter(ComponentValueSetter.java:204)
> at
> org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:225)
> at
> org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:140)
> at
> org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:58)
> at
> org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:605)
> ... 16 more
> Caused by: java.lang.reflect.InvocationTargetException
> 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:597)
> at
> org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.setValueUsingSetter(ComponentValueSetter.java:191)
> ... 20 more
> Caused by: java.lang.NullPointerException
> at java.lang.String.endsWith(String.java:1466)
> at
> org.apache.maven.plugin.javadoc.JavadocReport.setReportOutputDirectory(JavadocReport.java:184)
> ... 25 more
> {noformat}
> and from Maven 2.2.x
> {noformat}
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-javadoc-plugin:2.5:javadoc' -->
> [DEBUG] (f) aggregate = false
> [DEBUG] (f) author = true
> [DEBUG] (f) bootclasspathArtifacts = []
> [DEBUG] (f) bottom = Copyright © {inceptionYear}-{currentYear}
> {organizationName}. All Rights Reserved.
> [DEBUG] (f) breakiterator = false
> [DEBUG] (f) debug = false
> [DEBUG] (f) destDir = apidocs
> [DEBUG] (f) docfilessubdirs = false
> [DEBUG] (f) docletArtifact = groupId = 'null'artifactId = 'null'version =
> 'null'
> [DEBUG] (f) docletArtifacts = []
> [DEBUG] (f) doctitle = Maven Ant Plugin 2.3-SNAPSHOT API
> [DEBUG] (f) encoding = UTF-8
> [DEBUG] (f) failOnError = true
> [DEBUG] (f) groups = []
> [DEBUG] (f) isOffline = false
> [DEBUG] (f) javadocDirectory =
> M:\maven\plugins\maven-ant-plugin\src\main\javadoc
> [DEBUG] (f) keywords = false
> [DEBUG] (f) links = []
> [DEBUG] (f) linksource = false
> [DEBUG] (f) localRepository = Repository[local|file://U:\Jeder\Maven-2]
> [DEBUG] (f) nocomment = false
> [DEBUG] (f) nodeprecated = false
> [DEBUG] (f) nodeprecatedlist = false
> [DEBUG] (f) nohelp = false
> [DEBUG] (f) noindex = false
> [DEBUG] (f) nonavbar = false
> [DEBUG] (f) nooverview = false
> [DEBUG] (f) nosince = false
> [DEBUG] (f) notimestamp = false
> [DEBUG] (f) notree = false
> [DEBUG] (f) offlineLinks = []
> [DEBUG] (f) old = false
> [DEBUG] (f) outputDirectory =
> M:\maven\plugins\maven-ant-plugin\target\apidocs
> [DEBUG] (f) overview =
> M:\maven\plugins\maven-ant-plugin\src\main\javadoc\overview.html
> [DEBUG] (f) project = MavenProject:
> org.apache.maven.plugins:maven-ant-plugin:2.3-SNAPSHOT @
> M:\maven\plugins\maven-ant-plugin\pom.xml
> [DEBUG] (f) quiet = false
> [DEBUG] (f) reactorProjects = [MavenProject:
> org.apache.maven.plugins:maven-ant-plugin:2.3-SNAPSHOT @
> M:\maven\plugins\maven-ant-plugin\pom.xml]
> [DEBUG] (f) remoteRepositories =
> [Repository[apache.snapshots|http://repository.apache.org/snapshots],
> Repository[central|http://repo1.maven.org/maven2]]
> [DEBUG] (s) reportOutputDirectory =
> M:\maven\plugins\maven-ant-plugin\target\site\apidocs
> [DEBUG] (f) resourcesArtifacts = []
> [DEBUG] (f) serialwarn = false
> [DEBUG] (f) session = org.apache.maven.execution.mavensess...@272961
> [DEBUG] (f) settings = org.apache.maven.settings.setti...@1c0b8a0
> [DEBUG] (f) show = protected
> [DEBUG] (f) skip = false
> [DEBUG] (f) splitindex = false
> [DEBUG] (f) stylesheet = java
> [DEBUG] (f) tagletArtifact = groupId = 'null'artifactId = 'null'version =
> 'null'
> [DEBUG] (f) tagletArtifacts = []
> [DEBUG] (f) taglets = []
> [DEBUG] (f) tags = []
> [DEBUG] (f) use = true
> [DEBUG] (f) useStandardDocletOptions = true
> [DEBUG] (f) verbose = false
> [DEBUG] (f) version = true
> [DEBUG] (f) windowtitle = Maven Ant Plugin 2.3-SNAPSHOT API
> [DEBUG] -- end configuration --
> {noformat}
> Note the different order in which the parameter values are injected. When
> {{reportOutputDirectory}} is injected before {{destDir}}, the mojo produces
> the NPE.
> The plugin should not rely on any particular ordering of the parameters.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira