Just wondering if rather than having an <exclusion> list stuffed in each of <dependency> elements, if we could have some sort of <compatible> tag that can 'advise' Maven the choosing strategy for conflicting artifacts (pretty much like version ranges).

For sake of an example:

 <dependencies>
       <dependency>
           <groupId>junit</groupId>
           <artifactId>junit</artifactId>
           <version>3.8.2</version>
           <compatible> <=3.8.2 </compatible>
       </dependency>
   . . .
  </dependencies>

So, Maven can safely choose 3.8.2 for all varying versions JUnit less than or equal to 3.8.2, but not 4.0.

The other thing is that when an artifact is published to a repo, the publisher can add some compatibility meta-data as well to indicate that the current version is incompatible with certain other versions or the artifacts.

Just a thought...

Cheers
Rahul


<snip>
      <dependency groupID="commons-lang"
          artifactID="commons-lang"
          version="${commons-lang.version}">
        <exclusion
            groupId="junit"
            artifactId="junit"/>
      </dependency>
      <dependency groupID="commons-logging"
          artifactID="commons-logging"
          version="${commons-logging.version}">
        <exclusion
            groupId="junit"
            artifactId="junit"/>
        <exclusion
            groupId="logkit"
            artifactId="logkit"/>
        <exclusion
            groupId="avalon-framework"
            artifactId="avalon-framework"/>
      </dependency>

</snip>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to