You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Nau, Mike" <Mi...@intuit.com> on 2009/10/15 18:25:59 UTC

maven-release-plugin -- javadoc failures

Hello,

We're running into javadoc issues during the release:perform goal of the maven-release-plugin. The current setup we have is to do a clean install during the release:prepare and then a deploy during the release:perform. 

The release:prepare works fine but we get a javadoc NullPointerException during the release:perform on one of the modules (stack trace included below). We get this when running the build with both JDK 1.5 and 1.6.  This error is reproducible on both linux and windows.

I don't need to run javadoc for this module. I've tried adding the following to the module's pom to attempt to skip javadoc generation,  but I still get the error:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <configuration>
    <skip>true</skip>
  </configuration>
</plugin>

I've also tried adding the useReleaseProfile=false flag to the release:perform goal, but that yielded the same results.  

Normal builds (i.e. clean install) without the release plugin work fine. 

Anyone ideas what might be causing the problem (why it works everywhere other than within the release:perform goal). 

Thanks,
-Mike


[INFO] [INFO] [javadoc:jar {execution: attach-javadocs}]
[INFO] [WARNING] -top option is not supported on Java version < 1.6. Ignore this option.
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Error while creating archive:Exit code: 1 - java.lang.NullPointerException
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:180)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageList(PackageUseWriter.java:124)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:110)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUseFile(PackageUseWriter.java:99)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generate(PackageUseWriter.java:78)
[INFO] 	at com.sun.tools.doclets.formats.html.ClassUseWriter.generate(ClassUseWriter.java:116)
[INFO] 	at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:92)
[INFO] 	at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:122)
[INFO] 	at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
[INFO] 	at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
[INFO] 	at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
[INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[INFO] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[INFO] 	at java.lang.reflect.Method.invoke(Method.java:585)
[INFO] 	at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[INFO] 	at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[INFO] 	at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[INFO] 	at com.sun.tools.javadoc.Start.begin(Start.java:128)
[INFO] 	at com.sun.tools.javadoc.Main.execute(Main.java:41)
[INFO] 	at com.sun.tools.javadoc.Main.main(Main.java:31)
[INFO] 
[INFO] Command line was:"C:\Program Files\Java\jdk1.5.0_15\jre\..\bin\javadoc.exe" @options @packages @argfile


RE: maven-release-plugin -- javadoc failures

Posted by Jörg Schaible <jo...@gmx.de>.
Nau, Mike wrote at Donnerstag, 15. Oktober 2009 23:31:

> Was able to finally figure this out - posting here in case someone else
> runs into the same issue.
> 
> New classes were recently added to the failing module without an explicit
> package defined (they were added directly under src/main/java). Doing this
> triggered a bug in the javadoc compiler detailed in
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101868 when the -use
> flag is used when generating javadocs (stacktrace included below).
> 
> We only saw this error when performing the maven release:perform goal.
> Apparently maven sets the -use javadoc flag as part of the release:perform
> goal, but not as part of a normal non-release build. So we never saw this
> on developer workstations or our SNAPSHOT builds.
> 
> The fix was to relocate the classes added from the default package to
> com.foo.install which side-stepped javadoc bug. Another option we tested
> was to explicitly set the use=false flag within the tcs-prod-tool's
> pom.xml file which also worked.

You're aware that the settings made for the javadoc plugin in the plugins
section of report have nothing to do with the settings made in the plugins
section of build?

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: maven-release-plugin -- javadoc failures

Posted by "Nau, Mike" <Mi...@intuit.com>.
Was able to finally figure this out - posting here in case someone else runs into the same issue. 

New classes were recently added to the failing module without an explicit package defined (they were added directly under src/main/java). Doing this triggered a bug in the javadoc compiler detailed in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101868 when the -use flag is used when generating javadocs (stacktrace included below). 

We only saw this error when performing the maven release:perform goal. Apparently maven sets the -use javadoc flag as part of the release:perform goal, but not as part of a normal non-release build. So we never saw this on developer workstations or our SNAPSHOT builds. 

The fix was to relocate the classes added from the default package to com.foo.install which side-stepped javadoc bug. Another option we tested was to explicitly set the use=false flag within the tcs-prod-tool's pom.xml file which also worked. 

-Mike

-----Original Message-----
From: Nau, Mike [mailto:Mike_Nau@intuit.com] 
Sent: Thursday, October 15, 2009 9:26 AM
To: users@maven.apache.org
Subject: maven-release-plugin -- javadoc failures

Hello,

We're running into javadoc issues during the release:perform goal of the maven-release-plugin. The current setup we have is to do a clean install during the release:prepare and then a deploy during the release:perform. 

The release:prepare works fine but we get a javadoc NullPointerException during the release:perform on one of the modules (stack trace included below). We get this when running the build with both JDK 1.5 and 1.6.  This error is reproducible on both linux and windows.

I don't need to run javadoc for this module. I've tried adding the following to the module's pom to attempt to skip javadoc generation,  but I still get the error:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <configuration>
    <skip>true</skip>
  </configuration>
</plugin>

I've also tried adding the useReleaseProfile=false flag to the release:perform goal, but that yielded the same results.  

Normal builds (i.e. clean install) without the release plugin work fine. 

Anyone ideas what might be causing the problem (why it works everywhere other than within the release:perform goal). 

Thanks,
-Mike


[INFO] [INFO] [javadoc:jar {execution: attach-javadocs}]
[INFO] [WARNING] -top option is not supported on Java version < 1.6. Ignore this option.
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Error while creating archive:Exit code: 1 - java.lang.NullPointerException
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:180)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageList(PackageUseWriter.java:124)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:110)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUseFile(PackageUseWriter.java:99)
[INFO] 	at com.sun.tools.doclets.formats.html.PackageUseWriter.generate(PackageUseWriter.java:78)
[INFO] 	at com.sun.tools.doclets.formats.html.ClassUseWriter.generate(ClassUseWriter.java:116)
[INFO] 	at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:92)
[INFO] 	at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:122)
[INFO] 	at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
[INFO] 	at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
[INFO] 	at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
[INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[INFO] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[INFO] 	at java.lang.reflect.Method.invoke(Method.java:585)
[INFO] 	at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[INFO] 	at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[INFO] 	at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[INFO] 	at com.sun.tools.javadoc.Start.begin(Start.java:128)
[INFO] 	at com.sun.tools.javadoc.Main.execute(Main.java:41)
[INFO] 	at com.sun.tools.javadoc.Main.main(Main.java:31)
[INFO] 
[INFO] Command line was:"C:\Program Files\Java\jdk1.5.0_15\jre\..\bin\javadoc.exe" @options @packages @argfile


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org