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

Support global dependency excludes

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Dependencies
    • None

    Description

      The example that everybody understands : how to exclude commons-logging from dependencies ?

      • explicitly exclude it from all transitive dependencies :
        <dependency>
          <groupId>commons-configuration</groupId>
          <artifactId>commons-configuration</artifactId>
          <exclusions>
             <exclusion>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
              </exclusion>
            </exclusions>
        </dependency>
        
      • use the Version 99 Does Not Exist workaround.

      The best solution would be to add a section to the pom, for example :

      <dependencies>
        <exclusions>
           <exclusion>
              <groupId>commons-logging</groupId>
              <artifactId>commons-logging</artifactId>
            </exclusion>
          </exclusions>
      </dependencies>
      

      Attachments

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              simon.brandhof simon.brandhof
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: