Uploaded image for project: 'Maven Ant Plugin (RETIRED)'
  1. Maven Ant Plugin (RETIRED)
  2. MANT-41

mvn ant:ant fails with NPE when maven-javadoc-plugin custom tag is specified in pom.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1
    • 2.2
    • None
    • Fedora 8 , Java SE 1.6.0_05-b13, Maven 2.0.9

    Description

      I recently added a custom javadoc tag to cross reference requirements and implementation. This is accommodated by the maven-javadoc-plugin as in the following snippet from my pom.xml:

        <reporting>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <tags>
                  <tag>
                    <name>requirement</name>
                    <placement>a</placement>
                    <head>Software Requirement:</head>
                  </tag>
                </tags>
              </configuration>
            </plugin>
          </plugins>
        </reporting>
      

      When I run the maven-ant-plugin, it fails with a NullPointerException:

      [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:539)
              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:451)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
              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:287)
              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.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: 1 second
      [INFO] Finished at: Thu Jun 05 13:11:49 MDT 2008
      [INFO] Final Memory: 5M/81M
      [INFO] ------------------------------------------------------------------------
      

      The maven-ant-plugin works fine when the custom tag configuration is removed from the pom.xml file.

      Attachments

        Activity

          People

            bentmann Benjamin Bentmann
            esm Elliot Metsger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: