NullPointerException when maven-javadoc-plugin configuration defines multiple group elements within a groups list element. --------------------------------------------------------------------------------------------------------------------------
Key: MANT-52 URL: http://jira.codehaus.org/browse/MANT-52 Project: Maven 2.x Ant Plugin Issue Type: Bug Affects Versions: 2.2 Environment: $ mvn --version Maven version: 2.0.10 Java version: 1.6.0_0 OS name: "linux" version: "2.6.29-gentoo-r3" arch: "amd64" Family: "unix" Reporter: Alistair Bush Attachments: maven-ant-plugin.patch When attempting to run mvn ant:ant on sesame-2.2.4 available here [1]. A NullPointerException is raised. [2] for build log segment. It seems that when a pom ( or a parents pom ) defines the following configuration the existing code the error was occuring. I have assumed in my patch that this is the only valid way of defining groups. But at least the fix is small and easy for you to figure out. <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <aggregate>true</aggregate> <source>1.5</source> <groups> <group> <title>Repository API</title> <packages>org.openrdf.repository*</packages> </group> <group> <title>RDF Model API</title> <packages>org.openrdf.model*</packages> </group> ... ... </groups> <links> <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> <link>http://repository.aduna-software.org/docs/info.aduna/api/</link> </links> </configuration> [1] svn co http://repo.aduna-software.org/svn/org.openrdf/sesame/tags/2.2.4/ [2] [INFO] Building OpenRDF Sesame Core [INFO] task-segment: [ant:ant] [INFO] ------------------------------------------------------------------------ [INFO] [ant:ant] [INFO] Wrote Ant project for sesame-core to /home/alistair/gentoo/tmp/sesame-2.2.4/core [INFO] ------------------------------------------------------------------------ [INFO] Building OpenRDF Sesame: Model [INFO] task-segment: [ant:ant] [INFO] ------------------------------------------------------------------------ [INFO] [ant:ant] [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] null [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NullPointerException at org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.escapeXml(PrettyPrintXMLWriter.java:151) at org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.escapeXmlAttribute(PrettyPrintXMLWriter.java:166) at org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.addAttribute(PrettyPrintXMLWriter.java:190) at org.apache.maven.plugin.ant.AntBuildWriterUtil.writeJavadocTask(AntBuildWriterUtil.java:473) at org.apache.maven.plugin.ant.AntBuildWriter.writeJavadocTarget(AntBuildWriter.java:991) at org.apache.maven.plugin.ant.AntBuildWriter.writeGeneratedBuildXml(AntBuildWriter.java:304) at org.apache.maven.plugin.ant.AntBuildWriter.writeBuildXmls(AntBuildWriter.java:113) at org.apache.maven.plugin.ant.AntMojo.execute(AntMojo.java:112) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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) [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Tue Jun 16 00:03:36 NZST 2009 [INFO] Final Memory: 19M/184M [INFO] ------------------------------------------------------------------------ -- 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