[ 
http://jira.codehaus.org/browse/MECLIPSE-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101972
 ] 

Bulent Erdemir commented on MECLIPSE-240:
-----------------------------------------

This is something done on purpose. The code below in 
org.maven.ide.eclipse.embedder.EclipseArtifactResolver.java, while trying to 
resolve the artifact, first checks it the artifact can be found in Eclipse 
workspace and if so, tries to use that project instead of checking it from the 
repo. This is to allow faster development (i.e. having to issue a mvn install 
command everytime a dependant artifact is updated).

And the classes and resources in that Eclipse project can be accessed by the 
dependants (tried that).

  public void resolve(Artifact artifact, List remoteRepositories, 
ArtifactRepository localRepository) throws ArtifactResolutionException,
      ArtifactNotFoundException {
    if(!resolveAsEclipseProject(artifact)) {
      super.resolve(artifact, remoteRepositories, localRepository);
    }
  }

So, this is a good thing. :) 

However, it's not compatible with WTP, where WTP tries to deploy a project to a 
defined server, goes through Maven dependencies and copying every dependency 
into the WEB-INF/lib directory. But since there's no jar for the Eclipse 
project in the workspace, those classes are missing. 

And your war file simply does not work because the container cannot find the 
class present in the project .

Any comments on this are appreciated.

> cannot use maven eclipse plugin to resolve installed dependencies that are 
> also available in the eclipse workspace
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: MECLIPSE-240
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-240
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: dependency resolution
>    Affects Versions: 2.0
>         Environment: eclipse 3.2.2. 
> maven 2.0 plugin integration or latest fix 0.11.20070304-1200
> using other plugins (for svn)
> jdk 1.5.0.1
> os: windows server 2K3
>            Reporter: Son, the blue mountain
>         Attachments: pb.GIF
>
>
> when adding dependency against another maven artifact but who is locally 
> built in the same eclipse workspace, the dependency resolution tries to use 
> the eclipse project self.
> however, this looks just like an icon. 
> in the code, i cannot reference any class that come from such artifact.
> should i eventually rollback to 0.04 version ?

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