Community
Participate
Working Groups
While adding support for app-client types in m2e-wtp (https://issues.sonatype.org/browse/MECLIPSEWTP-104), the following bug hit me : for app-client (http://maven.apache.org/plugins/maven-acr-plugin/usage.html) projects, artifact.getArtifactHandler() doesn't return the correct artifact handler : - artifactHandler.getExtension() returns app-client instead of jar, which prevents correct archive name resolution when embedding in an EAR - artifactHandler.isAddedToClasspath() returns false, which prevents the project to be added to the Maven Library classpath container Correct values can be seen here : https://github.com/apache/maven-plugins/blob/trunk/maven-acr-plugin/src/main/resources/META-INF/plexus/components.xml Attached is a set of sample projects where you can see the appclient project is not available to the jar's classpath. You can check it compiles fine on CLI. Looks to me it's a maven embedder issue.
(In reply to comment #0) > Attached is a set of sample projects where you can see the appclient project is > not available to the jar's classpath. You can check it compiles fine on CLI. > I don't any attachment on this bug.
Created attachment 200646 [details] Set of projects showing app-client dependency not added to the classpath Attached app-client dependency is not added to the classpath of the jar module. The projects build fine via CLI
Are you able to run "mvn dependency:build-classpath" for jar using maven 3.0.2 or 3.0.2 from command line (after installing everything to the localrepo, obviously)? I am getting the error below, which seems to match the behaviour you see in IDE. bash-3.2$ mvn dependency:build-classpath [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building jar 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://repository.sonatype.org/content/groups/sonatype-grid/org/eclipse/m2e/app-client/0.0.1-SNAPSHOT/app-client-0.0.1-SNAPSHOT.app-client [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.208s [INFO] Finished at: Mon Aug 01 18:55:42 MSD 2011 [INFO] Final Memory: 4M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project jar: Could not resolve dependencies for project org.eclipse.m2e:jar:jar:0.0.1-SNAPSHOT: Could not find artifact org.eclipse.m2e:app-client:app-client:0.0.1-SNAPSHOT in nexus (http://repository.sonatype.org/content/groups/sonatype-grid) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Underlying maven core issue http://jira.codehaus.org/browse/MNG-5135.
I tried again this morning, since MNG-5135 is fixed upstream and m2e 1.2 embeds maven 3.0.4 : issue is still here, meeeh
Closing old/stale bugzilla entries.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/