Issue Details (XML | Word | Printable)

Key: JXR-79
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Johannes Schneider
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven JXR

NPE on source XREF

Created: 12/Jan/10 01:22 PM   Updated: 13/Jan/10 10:29 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_16
Java home: /usr/lib/jvm/java-6-sun-1.6.0.16/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.31-17-generic" arch: "amd64" Family: "unix"


 Description  « Hide

[INFO] Generating "Source Xref" report.
[DEBUG] Scanning /home/johannes/projects/com.cedarsoft.commons/version/src/main/java
[DEBUG] parsing... com/cedarsoft/VersionRange.java
[DEBUG] parsing... com/cedarsoft/Version.java
[DEBUG] parsing... com/cedarsoft/UnsupportedVersionRangeException.java
[DEBUG] parsing... com/cedarsoft/VersionMismatchException.java
[DEBUG] parsing... com/cedarsoft/UnsupportedVersionException.java
[DEBUG] parsing... com/cedarsoft/VersionException.java
[DEBUG] /home/johannes/projects/com.cedarsoft.commons/version/src/main/java/com/cedarsoft/VersionRange.java -> /home/johannes/projects/com.cedarsoft.commons/version/target/site/xref/com/cedarsoft/VersionRange.html
[DEBUG] /home/johannes/projects/com.cedarsoft.commons/version/src/main/java/com/cedarsoft/Version.java -> /home/johannes/projects/com.cedarsoft.commons/version/target/site/xref/com/cedarsoft/Version.html
[DEBUG] /home/johannes/projects/com.cedarsoft.commons/version/src/main/java/com/cedarsoft/UnsupportedVersionRangeException.java -> /home/johannes/projects/com.cedarsoft.commons/version/target/site/xref/com/cedarsoft/UnsupportedVersionRangeException.html
[DEBUG] /home/johannes/projects/com.cedarsoft.commons/version/src/main/java/com/cedarsoft/VersionMismatchException.java -> /home/johannes/projects/com.cedarsoft.commons/version/target/site/xref/com/cedarsoft/VersionMismatchException.html
[DEBUG] /home/johannes/projects/com.cedarsoft.commons/version/src/main/java/com/cedarsoft/UnsupportedVersionException.java -> /home/johannes/projects/com.cedarsoft.commons/version/target/site/xref/com/cedarsoft/UnsupportedVersionException.html
[DEBUG] /home/johannes/projects/com.cedarsoft.commons/version/src/main/java/com/cedarsoft/VersionException.java -> /home/johannes/projects/com.cedarsoft.commons/version/target/site/xref/com/cedarsoft/VersionException.html
[DEBUG] **************************************************************
[DEBUG] Starting Jakarta Velocity v1.4
[DEBUG] RuntimeInstance initializing.
[DEBUG] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
[DEBUG] Trying to use logger class org.apache.maven.jxr.log.VelocityLogger
[DEBUG] Using logger class org.apache.maven.jxr.log.VelocityLogger
[DEBUG] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
[DEBUG] Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] ClasspathResourceLoader : initialization starting.
[DEBUG] ClasspathResourceLoader : initialization complete.
[DEBUG] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
[DEBUG] Default ResourceManager initialization complete.
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[DEBUG] Created: 20 parsers.
[DEBUG] Velocimacro : initialization starting.
[DEBUG] Velocimacro : allowInline = true : VMs can be defined inline in templates
[DEBUG] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
[DEBUG] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
[DEBUG] Velocimacro : messages on : VM system will output logging messages
[DEBUG] Velocimacro : autoload off : VM system will not automatically reload global library macros
[DEBUG] Velocimacro : initialization complete.
[DEBUG] Velocity successfully started.
[DEBUG] ResourceManager : found templates/index.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] ResourceManager : found templates/overview-frame.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] ResourceManager : found templates/allclasses-frame.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] ResourceManager : found templates/overview-summary.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] ResourceManager : found templates/package-summary.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] ResourceManager : found templates/package-frame.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
java.lang.NullPointerException
at org.codehaus.plexus.util.FileUtils.copyURLToFile(FileUtils.java:820)
at org.apache.maven.plugin.jxr.AbstractJxrReport.copyRequiredResources(AbstractJxrReport.java:330)
at org.apache.maven.plugin.jxr.AbstractJxrReport.createXref(AbstractJxrReport.java:265)
at org.apache.maven.plugin.jxr.AbstractJxrReport.executeReport(AbstractJxrReport.java:409)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101)
at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:164)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:328)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:132)
at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:142)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:109)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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: 20 seconds
[INFO] Finished at: Tue Jan 12 20:21:16 CET 2010
[INFO] Final Memory: 89M/186M
[INFO] ----------------------------------------------------------------------



Johannes Schneider added a comment - 12/Jan/10 01:25 PM

Hmm, think this issue should be moved to http://jira.codehaus.org/browse/JXR


Johannes Schneider added a comment - 12/Jan/10 01:42 PM

It seems it is related to a custom stylesheet. When I remove that line:

<stylesheet>xref/cedarsoft.css</stylesheet>

from reporting.plugins.plugin.configuration everything works as expected.
But this line worked with an older version. I have updated several plugins. One of them broke it. I think it is not the site plugin and not the jxr plugin. I tried to revert both versions....


Johannes Schneider added a comment - 12/Jan/10 02:30 PM

Okay, I have found the problem.

I have moved the xref-plugin configuration (including the dependency that contains the stylesheet) to the pluginManagement section.
While this works for the javadoc plugin (also has an additional dependency declared and references the resource) it does not for xref.
So I had to move the dependency back to build.plugins.

Now it works as expected again.

I don't know enough about maven and plugin configuration to find out whether this is a bug or my fault... I assume the second.

At least a better error message will be very helpful...


Wendy Smoak added a comment - 12/Jan/10 04:57 PM

Whatever the problem is, it shouldn't die with a NPE.

Can you provide a simple example project that demonstrates the problem?


Johannes Schneider added a comment - 13/Jan/10 10:29 AM

I just have a complex sample project here...