我们用 maven 编译一个 Adobe CQ 项目(服务、taglib、视图、内容等)。在某个时间点,我们引入了以下依赖项:
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>resources</artifactId>
<version>3.3.0-v20070604</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>registry</artifactId>
<version>3.3.0-v20070522</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>jobs</artifactId>
<version>3.3.0-v20070423</version>
</dependency>
这导致了以下依赖关系,例如 org.eclipse.resources (使用 mvn dependency:tree -Dverbose 提取):
[INFO] +- org.eclipse.core:resources:jar:3.3.0-v20070604:compile
[INFO] | +- org.eclipse.core:expressions:jar:3.3.0-v20070606-0010:compile
[INFO] | | \- (org.eclipse.core:runtime:jar:3.3.100-v20070530:compile - omitted for duplicate)
[INFO] | +- org.eclipse.core:filesystem:jar:1.1.0-v20070606:compile
[INFO] | | +- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | | +- (org.eclipse.equinox:registry:jar:3.3.0-v20070522:compile - omitted for duplicate)
[INFO] | | \- (org.eclipse:osgi:jar:3.3.0-v20070530:compile - omitted for duplicate)
[INFO] | \- org.eclipse.core:runtime:jar:3.3.100-v20070530:compile
[INFO] | +- (org.eclipse:osgi:jar:3.8.2.v20130124-134944:compile - omitted for duplicate)
[INFO] | +- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | +- (org.eclipse.core:jobs:jar:3.3.0-v20070423:compile - omitted for duplicate)
[INFO] | +- (org.eclipse.equinox:registry:jar:3.3.1:compile - omitted for duplicate)
[INFO] | +- org.eclipse.equinox:preferences:jar:3.2.100-v20070522:compile
[INFO] | | \- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | +- org.eclipse.core:contenttype:jar:3.2.100-v20070319:compile
[INFO] | | +- (org.eclipse.equinox:preferences:jar:3.2.100-v20070522:compile - omitted for duplicate)
[INFO] | | +- (org.eclipse.equinox:registry:jar:3.3.1:compile - omitted for duplicate)
[INFO] | | \- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | \- org.eclipse.equinox:app:jar:1.0.0-v20070606:compile
[INFO] | +- (org.eclipse.equinox:registry:jar:3.3.1:compile - omitted for duplicate)
[INFO] | \- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
然后,从 2013 年 8 月 19 日星期一到 8 月 20 日,org.eclipse:osgi 依赖项突然从 3.3.0-something 更改为 3.8.2-something,没有任何明显的原因(这严重破坏了我们的构建):
[INFO] +- org.eclipse.core:resources:jar:3.3.0-v20070604:compile
[INFO] | +- org.eclipse.core:expressions:jar:3.3.0-v20070606-0010:compile
[INFO] | | \- (org.eclipse.core:runtime:jar:3.3.100-v20070530:compile - omitted for duplicate)
[INFO] | +- org.eclipse.core:filesystem:jar:1.1.0-v20070606:compile
[INFO] | | +- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | | +- (org.eclipse.equinox:registry:jar:3.3.0-v20070522:compile - omitted for duplicate)
[INFO] | | \- org.eclipse:osgi:jar:3.8.2.v20130124-134944:compile
[INFO] | \- org.eclipse.core:runtime:jar:3.3.100-v20070530:compile
[INFO] | +- (org.eclipse:osgi:jar:3.8.2.v20130124-134944:compile - omitted for duplicate)
[INFO] | +- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | +- (org.eclipse.core:jobs:jar:3.3.0-v20070423:compile - omitted for duplicate)
[INFO] | +- (org.eclipse.equinox:registry:jar:3.3.1:compile - omitted for duplicate)
[INFO] | +- org.eclipse.equinox:preferences:jar:3.2.100-v20070522:compile
[INFO] | | \- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | +- org.eclipse.core:contenttype:jar:3.2.100-v20070319:compile
[INFO] | | +- (org.eclipse.equinox:preferences:jar:3.2.100-v20070522:compile - omitted for duplicate)
[INFO] | | +- (org.eclipse.equinox:registry:jar:3.3.1:compile - omitted for duplicate)
[INFO] | | \- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
[INFO] | \- org.eclipse.equinox:app:jar:1.0.0-v20070606:compile
[INFO] | +- (org.eclipse.equinox:registry:jar:3.3.1:compile - omitted for duplicate)
[INFO] | \- (org.eclipse.equinox:common:jar:3.3.0-v20070426:compile - omitted for duplicate)
我们能够通过显式添加依赖项来解决这个问题:
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>osgi</artifactId>
<version>3.3.0-v20070530</version>
</dependency>
但是,我们仍然没有任何线索,为什么依赖项发生了变化。有人知道原因或遇到过同样的问题吗?