jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-2032

Bug in dependency exclusions processing (ArtifactFilter's)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.2
  • Fix Version/s: None
  • Component/s: Dependencies
  • Labels:
    None
  • Complexity:
    Intermediate

Description

I thing, I found an error in dependency exclusions calculations.
For pom dependencies:

<dependencies>
<dependency>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.2.8</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>gnujaxp</groupId>
<artifactId>gnujaxp</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

in method MavenMetadataSource.createArtifacts the two above dependencies are processed and ArtifactFilters are applied. The first dependency (struts) gets ExcludesArtifactFilter( "javax.servlet:servlet-api" ) - this is OK, but
the second dependency (jfreechart) gets wrong filter - AndArtifactFilter which concatenates ExcludesArtifactFilter( "gnujaxp:gnujaxp" ) with ExcludesArtifactFilter( "javax.servlet:servlet-api" ). This second ExcludesArtifactFilter comes from the first dependency (struts). Method parameter "dependencyFilter" is overridden when processing the first dependency and read when processing the second one. The fix should be simple.

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MNG-1797 Dependency excludes apply to every subsequent dependency, not just the one it is declared under.

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Grzegorz Slowikowski added a comment - 02/Feb/06 9:30 AM

Sholud be Maven 2.0.2, not 2.0.1

Show
Grzegorz Slowikowski added a comment - 02/Feb/06 9:30 AM Sholud be Maven 2.0.2, not 2.0.1

People

  • Assignee:
    Brett Porter
    Reporter:
    Grzegorz Slowikowski
Vote (0)
Watch (0)

Dates

  • Created:
    02/Feb/06 9:29 AM
    Updated:
    21/Feb/06 8:54 PM
    Resolved:
    21/Feb/06 8:54 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.