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

Dependency management import should support exclusions.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-7, 4.0.0
    • Dependencies
    • None

    Description

      suppose i have a multi-module project that uses spring, and so have this in dependency-managements in a parent pom:

      <dependency>
      	<groupId>org.springframework</groupId>
      	<artifactId>spring-framework-bom</artifactId>
      	<version>${org.springframework.version}</version>
      	<type>pom</type>
      	<scope>import</scope>	
      </dependency>
      

      spring artifacts (or at least a lot of them) have a dependency on commons-logging. right now, if i want to exclude commons-logging i have to add an exclusion to every spring dependency in every module of my project, which is actually more XML overall than giving up on using the bom dependency altogether and listing all spring dependencies with excludes once in the parent dependency management.

      I'd like to be able to do this:

      <dependency>
      	<groupId>org.springframework</groupId>
      	<artifactId>spring-framework-bom</artifactId>
      	<version>${org.springframework.version}</version>
      	<type>pom</type>
      	<scope>import</scope>
      	<exclusions>
      		<exclusion>
      			<artifactId>commons-logging</artifactId>
      			<groupId>commons-logging</groupId>
      		</exclusion>
      	</exclusions>
      </dependency>
      

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              radai Radai Rosenblatt
              Votes:
              20 Vote for this issue
              Watchers:
              31 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m