[ 
https://jira.codehaus.org/browse/MECLIPSE-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed MECLIPSE-522.
-----------------------------------

    Resolution: Won't Fix

Please refer to 
https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
 if you're wondering why this issue was closed out.

> Transitive dependencies of excluded artifacts are included in the .classpath 
> file
> ---------------------------------------------------------------------------------
>
>                 Key: MECLIPSE-522
>                 URL: https://jira.codehaus.org/browse/MECLIPSE-522
>             Project: Maven Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : Dependencies resolution and build path 
> (.classpath)
>    Affects Versions: 2.5.1
>         Environment: Wndows XP, JDK 5 u12
>            Reporter: Yousuf Haider
>         Attachments: AbstractIdeSupportMojo.java
>
>
> If an artifact is set in the excludes list its transitive dependencies are 
> not excluded from the .classpath.
> The issue lies in AbstractIdeSupportMojo where the doDependencyResolution() 
> method checks that for each resolved artifact whether or not the artifact 
> name (using this notation groupId:artifactId) is in the excludes List.
> Dependencies resolved using ArtifactCollector contain transitive dependencies 
> which do not get excluded using the above mentioned mechanism.
> Proposed solution  for this is to use ExcludeArtifactFilter and pass it on to 
> the AritfactCollector in doDependency() method
> i.e instead of doing this :
> {{artifactResolutionResult = artifactCollector.collect( 
> getProjectArtifacts(), project.getArtifact(), managedVersions, localRepo, 
> project.getRemoteArtifactRepositories(), getArtifactMetadataSource(), *null*, 
> listeners );}}
> We could do this:
> {{*ArtifactFilter filter = new ExcludesArtifactFilter(getExcludes());*}}
> {{artifactResolutionResult = artifactCollector.collect( 
> getProjectArtifacts(), project.getArtifact(), managedVersions, localRepo, 
> project.getRemoteArtifactRepositories(), getArtifactMetadataSource(), 
> *filter*, listeners );}}
> This way the resovledDependencies don't contain the excluded artifacts as 
> well as any transitive dependencies. Also it lets the ArtifactCollector  to 
> manage the exclusion instead of this plugin doing it itself.
> Attaching the patched version of AbstractIdeSupportMojo.java



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to