You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Arnaud Heritier (JIRA)" <ji...@codehaus.org> on 2009/08/12 01:16:59 UTC
[jira] Updated: (MSHARED-88) ProjectTransitivityFilter has
incorrect behavior for artifactIsADirectDependency method
[ http://jira.codehaus.org/browse/MSHARED-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arnaud Heritier updated MSHARED-88:
-----------------------------------
Fix Version/s: maven-common-artifact-filters 1.2
> ProjectTransitivityFilter has incorrect behavior for artifactIsADirectDependency method
> ---------------------------------------------------------------------------------------
>
> Key: MSHARED-88
> URL: http://jira.codehaus.org/browse/MSHARED-88
> Project: Maven Shared Components
> Issue Type: Bug
> Components: maven-common-artifact-filters
> Reporter: Owen Kellett
> Assignee: Arnaud Heritier
> Priority: Minor
> Fix For: maven-common-artifact-filters 1.2
>
>
> In the class org.apache.maven.shared.artifact.filter.collection.ProjectTransitivityFilter, the filter should only include items that are part of the direct dependencies. However, the method that does this check (artifactIsADirectDependency) only verifies that a dependency has the same artifactId and groupId as a direct dependency. It should also check the classifier and type. I've included an updated version of the method below:
> {code:java}
> public boolean artifactIsADirectDependency( Artifact artifact )
> {
> boolean result = false;
> Iterator iterator = this.directDependencies.iterator();
> while ( iterator.hasNext() )
> {
> Artifact dependency = (Artifact) iterator.next();
> if ( dependency.getGroupId().equals( artifact.getGroupId() ) &&
> dependency.getArtifactId().equals( artifact.getArtifactId() ) &&
> dependency.getClassifier().equals( artifact.getClassifier() ) &&
> dependency.getType().equals( artifact.getType() ) )
> {
> result = true;
> break;
> }
> }
> return result;
> }
> {code}
--
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