[
http://jira.codehaus.org/browse/MNBMODULE-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=241879#action_241879
]
Jesse Glick commented on MNBMODULE-102:
---------------------------------------
I played with the legacy ArtifactCollector but it does not work, even when run
from M3; the ResolutionNode for batik-script shows no children. I guess the old
buggy code was just copied into M3 unmodified. Maybe
org.sonatype.aether.graph.DependencyNode is what new code ought to be using,
but I don't suppose I can use this from a plugin that needs to run in both M2
and M3, and the API looks fairly different.
The background is that nbm-maven-plugin does rather exotic things with
dependencies, since Maven's dependency tree works very differently from NB
module dependencies:
1. NB does not do transitive dependencies, so indirect dependencies reported by
Maven may need to be added to OpenIDE-Module-Module-Dependencies even though
they do not appear in your POM. There is also special handling for OSGi bundles.
2. The plugin attempts to automatically create library wrapper modules for any
"plain" JARs it finds.
I am rather afraid of making any changes to this complex logic. There is a unit
test, but it also uses maven-dependency-tree, so there is no way to confirm
that a rewrite preserves the same behavior (minus this bug). Probably safer to
leave the code the way it is for now, especially since this bug only manifests
itself in cases where Maven 2.x in fact produced the wrong classpath and you
really ought to edit your POM to work around that problem anyway.
> Transitive dependencies incorrectly processed in Maven 3
> --------------------------------------------------------
>
> Key: MNBMODULE-102
> URL: http://jira.codehaus.org/browse/MNBMODULE-102
> Project: Maven NetBeans Module Plugin
> Issue Type: Bug
> Affects Versions: 3.3
> Environment: Fedora Linux 13 64 bit, Windows XP SP3, JDK 6 update 21
> Reporter: Jakub Herkel
> Assignee: Jesse Glick
> Priority: Minor
> Attachments: test2.zip
>
>
> We have found this problem, when we tried to test Maven 3.0 with our project.
> With an older version we were able to compile the whole project without any
> problem. With a new version we have a problem with nbm-maven-plugin. We could
> see this :
> [ERROR] Failed to execute goal
> org.codehaus.mojo:nbm-maven-plugin:3.3:manifest (default-cli) on project
> netrad.client.gui.module.core: See above for failures in runtime NetBeans
> dependencies verification.
> There is a little help that we should have a look above but unfortunately
> there isn't any information why the building process failed. If we tried to
> run maven with -X option, we could see :
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.codehaus.mojo:nbm-maven-plugin:3.3:manifest (default-cli) on project
> netrad.client.gui.module.core: See above for failures in runtime NetBeans
> dependencies verification.
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
> 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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoFailureException: See above for
> failures in runtime NetBeans dependencies verification.
> at
> org.codehaus.mojo.nbm.NetbeansManifestUpdateMojo.checkModuleClassPath(NetbeansManifestUpdateMojo.java:625)
> at
> org.codehaus.mojo.nbm.NetbeansManifestUpdateMojo.execute(NetbeansManifestUpdateMojo.java:447)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
> ... 19 more
> I have prepared a demo project which shows this problem. Also I have found
> out which dependency in pom.xml causes this problem. If I remove
> "test2.nvc.widget" dependency from the module-core, everything is ok.
--
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 from this list, please visit:
http://xircles.codehaus.org/manage_email