开发者

dependency mechanism ( overriding transitive version )

开发者 https://www.devze.com 2023-02-19 14:13 出处:网络
I am trying to explicitly override a transitive dependencies version, but doesn\'t seem to work. I have this in my projects pom

I am trying to explicitly override a transitive dependencies version, but doesn't seem to work.

I have this in my projects pom

<!-- use no-commons-logging -->
<dependency>
    <groupId>commons-logging</groupId>
    <artifactId>commons-logging</artifactId>
    <version>99.0-does-not-exist</version>
</dependency>
<!-- no-commons-logging-api, if you need it -->
<dependency>
    <groupId>commons-logging</groupId>
    &l开发者_StackOverflow中文版t;artifactId>commons-logging-api</artifactId>
    <version>99.0-does-not-exist</version>
</dependency>

But, the first one doesn't seem to override the transitive dependencies version. I am not sure why ?

Here is the full POM http://pastebin.com/TBP0YTZs

Here is the dependency tree http://pastebin.com/VBdjiVcL

PS: a) This is what I am trying to do http://day-to-day-stuff.blogspot.com/2007/10/announcement-version-99-does-not-exist.html


Actually, there is much cleaner method to get rid of commons-logging once and for all:

<dependency>
  <groupId>commons-logging</groupId>
  <artifactId>commons-logging</artifactId>
  <version>1.1.1</version>
  <scope>provided</scope>
</dependency>

<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>jcl-over-slf4j</artifactId>
  <version>1.6.1</version>
</dependency>

Based on: http://www.slf4j.org/faq.html#excludingJCL

0

精彩评论

暂无评论...
验证码 换一张
取 消