[ http://jira.codehaus.org/browse/MECLIPSE-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=141015#action_141015 ]
Gopalakrishnan U commented on MECLIPSE-459: ------------------------------------------- I am also hit by this problem. As Benjamin pointed out I also think the problem is on line 415. It should have been if ( config.isPde() && dep.isProvided() && dep.isOsgiBundle() ) i.e, don't add the dependency to the classpath if the dependency is provided AND it is a bundle AND the project is a PDE project. It needs to be added to the class path if the dependency was not provided or it is not a OSGi bundle. Here is the patch Index: src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java =================================================================== --- src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java (revision 674713) +++ src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java (working copy) @@ -412,7 +412,7 @@ // if the dependency is not provided and the plugin runs in "pde mode", the dependency is // added to the Bundle-Classpath: - if ( config.isPde() && ( dep.isProvided() || dep.isOsgiBundle() ) ) + if ( config.isPde() && dep.isProvided() && dep.isOsgiBundle() ) { return; } Gopal > missing artifact references with pde mode enabled > ------------------------------------------------- > > Key: MECLIPSE-459 > URL: http://jira.codehaus.org/browse/MECLIPSE-459 > Project: Maven 2.x Eclipse Plugin > Issue Type: Bug > Components: Core : Dependencies resolution and build path, PDE > support > Affects Versions: 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.5.1 > Environment: Maven version: 2.0.9 > Java version: 1.5.0_11 > OS name: "linux" version: "2.6.15-51-686" arch: "i386" Family: "unix" > Reporter: Benjamin Voigt > Priority: Critical > Attachments: pde_dep_missing.zip > > > Some artifacts are not referenced after executing mvn eclipse:eclipse and > having pde mode enabled. The strange thing is, that this does only happen for > particluar versions of an artifact. > Two artifacts that I found with this problem are jetty (org.mortbay.jetty) > and slf4j-log4j12 (org.slf4j-log4j12). Jetty versions beyond 6.1.5 work with > pde enabled, higher versions do not. Same for slf4j-log4j12 versions =< 1.1.0. > Attached is an example project demonstrating the problem. Turn pde mode > on/off in the pom and execute mvn eclipse:eclipse. -- 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