jiangshachina wrote:
Dear Wayne,
I also wish to use the approach you indicated.
But in my mind, I cannot exactly set only one artifact(e.g. ehcache-1.1.jar)
in <exclusion >,
because only there are groupId and artifaceId for setting.
If I use the element, I may exclude all ehcache artifacts(1.1, 1.2.3, ...).
That's my agony :(

a cup of Java, cheers!
Sha Jiang

Hi,

Sure you can use the approach - I have the same situation, and I do this:

      <dependency>
        <groupId>org.acegisecurity</groupId>
        <artifactId>acegi-security</artifactId>
        <version>1.0.2</version>
        <scope>compile</scope>
        <exclusions>
          <exclusion>
            <groupId>ehcache</groupId>
            <artifactId>ehcache</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache</artifactId>
        <version>1.2.3</version>
      </dependency>

It works nicely - you exclude only that specific ehcache:ehcache:1.1 specified in acegi-security POM from transitive inclusion, but net.sf.ehcache:ehcache:1.2.3 is a completely unrelated artifact, according to Maven.


Have fun,

Andrius


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

Reply via email to