[ http://jira.codehaus.org/browse/MNGECLIPSE-59?page=comments#action_61231 
] 

Mark J. Sinke commented on MNGECLIPSE-59:
-----------------------------------------

I took the liberty to resolve the problem of workspace artifact resolution. The 
attached patch file has it all.

The way it works is that when an artifact is resolved, the resolution is 
channeled through an Eclipse-based artifact resolver, which will first look for 
a Maven2-enabled project in the workspace, with a pom file that declares the 
exact version ID which is requested. If that happens to be the case, instead of 
adding a JAR dependency to the local repository, instead a project dependency 
is added to the Maven2 ClassPath container.

I had to slightly change the code in MavenEmbedder to allow this. The patch is 
uploaded to the MNG-1937 issue, mentioned in the dependencies. I did not 
explicitly allow substitution of the artifact resolver. Instead, I allowed 
changing the Plexus Embedder context before looking up components. This happens 
to make the necessary subsitution  of the artifact resolver trivial. It's a 
oneliner in EclipseMavenEmbedder now, referring to the EclipseArtifactResolver.


> Allow artifact resolution from workspace projects
> -------------------------------------------------
>
>          Key: MNGECLIPSE-59
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-59
>      Project: Maven 2.x Extension for Eclipse
>         Type: New Feature

>   Components: Dependency Resolver
>     Versions: 0.0.4
>     Reporter: Leonardo Quijano Vincenzi
>     Assignee: Eugene Kuleshov
>      Fix For: 1.0.0

>
>
> Provide artifact resolution from workspace projects, which override the same 
> artifact from the local or remote repositories. This would allow to work with 
> dependant Eclipse projects without specifying the Eclipse dependency manually.
> The workspace artifact resolution would have to be specified manually, since 
> several Maven-Enabled projects in the same workspace could have the same 
> artifact and version Id. Or at least automatic resolution with an optional 
> override would be nice.
> More comments here:
> http://jira.codehaus.org/browse/MNGECLIPSE-58

-- 
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

Reply via email to