[ http://jira.codehaus.org/browse/MPIR-23?page=comments#action_57683 ]
Matthew Beermann commented on MPIR-23:
--------------------------------------
In the interests of full disclosure, I am doing one slightly strange thing, but
it seems like it ought to work anyway:
I've got a custom mojo which, at the beginning of the lifecycle, scans
project.getDependencies() and looks for certain items which we might have a
[different] local version for. If so, it quietly redirects the dependency,
using dependency.setScope("system") and dependency.setSystemPath(path). Yes,
it's a bit odd, but trust that I'm doing it for a good reason.
I thought that perhaps there was some "double-accounting" going on, and I
needed to make the same change elsewhere in the system. But, all other goals in
all other plugins except for this one work just fine. Which leads me to wonder
if the dependencies report is making a bad assumption somewhere...
> Crash when processing system-scoped dependencies
> ------------------------------------------------
>
> Key: MPIR-23
> URL: http://jira.codehaus.org/browse/MPIR-23
> Project: Maven 2.x Project Info Reports Plugin
> Type: Bug
> Versions: 2.0-beta-3
> Reporter: Matthew Beermann
> Priority: Blocker
> Fix For: 2.0
>
>
> The Dependencies sub-report crashes if you have a dependency with
> <scope>system</scope> and a <systemPath/>. See below for traceback. I glanced
> at the code and a huge SWAG on my part is that it's assuming the dependency
> is a proper Maven 2 artifact - e.g. that it has a POM and such - but I'm
> probably completely off.
> [INFO]
> ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] null
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:82)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:63)
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:386)
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:351)
> at
> org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.getMavenProjectFromRepository(DependenciesReport.java:362)
> at
> org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.renderBody(DependenciesReport.java:242)
> at
> org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:65)
> at
> org.apache.maven.report.projectinfo.DependenciesReport.executeReport(DependenciesReport.java:157)
> at
> org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
> at
> org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
> at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> 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:585)
> 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)
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]