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:[email protected]] 
Sent: Thursday, October 15, 2009 9:26 AM
To: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to