Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349208 - ArtifactHandler not correctly loaded for non standard types (MNG-5135)
Summary: ArtifactHandler not correctly loaded for non standard types (MNG-5135)
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-13 12:18 EDT by Fred Bricon CLA
Modified: 2021-04-19 13:26 EDT (History)
1 user (show)

See Also:


Attachments
Set of projects showing app-client dependency not added to the classpath (6.84 KB, application/zip)
2011-08-01 05:15 EDT, Fred Bricon CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Bricon CLA 2011-06-13 12:18:31 EDT
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.
Comment 1 Igor Fedorenko CLA 2011-08-01 03:05:32 EDT
(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.
Comment 2 Fred Bricon CLA 2011-08-01 05:15:51 EDT
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
Comment 3 Igor Fedorenko CLA 2011-08-01 10:58:09 EDT
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
Comment 4 Igor Fedorenko CLA 2011-08-03 05:50:31 EDT
Underlying maven core issue http://jira.codehaus.org/browse/MNG-5135.
Comment 5 Fred Bricon CLA 2012-11-08 04:31:11 EST
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
Comment 6 Igor Fedorenko CLA 2014-01-23 20:40:53 EST
Closing old/stale bugzilla entries.
Comment 7 Denis Roy CLA 2021-04-19 13:26:11 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/