Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-705

Declared dependency is not included when there exist an exclusion of the artifact in another dependency

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0-beta-1
    • 2.0-beta-2
    • None
    • Maven version: 2.0-beta-1-SNAPSHOT, Revision: 227347

    Description

      I have declared a dependency (commons-collections), but I also have an exclusion of commons-collections in another dependency. In this case commons-collection is not added to the classpath. Part of my POM:

      <project>
      ...
      <dependencies>
      ...
      <!-- Hibernate -->
      <dependency>
      <groupId>hibernate</groupId>
      <artifactId>hibernate</artifactId>
      <version>3.0.5</version>

      <exclusions>
      ...
      <exclusion>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      </exclusion>
      ...
      </exclusions>
      ...
      <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.1</version>
      </dependency>

      </dependencies>
      ...
      </project>

      Attachments

        Activity

          People

            brett Brett Porter
            kristian Kristian Marinkovic
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified