Gradle问题排除了传递依赖关系

时间:2016-12-28 07:52:30

标签: java gradle

我正在使用Gradle 3.0。使用gradle我正在尝试加载JasperReports 6.3.0。这是相同的依赖配置。

dependencies {
    compile "org.springframework:spring-core:3.2.9.RELEASE"
    compile "org.springframework:spring-beans:3.2.9.RELEASE"
    compile "org.springframework:spring-context:3.2.9.RELEASE"

    //
    // JasperReports
    //
    compile group: 'org.olap4j', name: 'olap4j', version: '1.2.0'
    compile group: 'org.codehaus.castor', name: 'castor-xml', version: '1.4.1'
    compile ('net.sf.jasperreports:jasperreports:6.3.0') {
        exclude group: 'org.codehaus.castor'
    }
}

我面临的问题是因为JasperReports 6.3.0与Castor XML 1.3.3的传递依赖性,它正在加载Spring Framework 3.0.6版本,这是相当陈旧的。相反,我想加载Spring Framework 3.2.9。为了避免使用castor 1.3.3,我已从依赖列表中排除。但它仍然加载Castor 1.3.3等Spring Framework 3.0.6。以下是Gradle依赖报告中的一些片段。

11:34:55.175 [QUIET] [system.out] |Downloading: org/codehaus/castor/castor-xml/1.3.3/castor-xml-1.3.3.pom
11:34:56.175 [QUIET] [system.out] |Downloading: org/codehaus/castor/castor/1.3.3/castor-1.3.3.pom
11:34:57.429 [QUIET] [system.out] |Downloading: org/codehaus/castor/castor-core/1.3.3/castor-core-1.3.3.pom
11:34:58.545 [QUIET] [system.out] |Downloading: org/springframework/spring-context/3.0.6.RELEASE/spring-context-3.0.6.RELEASE.pom
11:34:59.626 [QUIET] [system.out] |Downloading: org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
11:35:00.659 [QUIET] [system.out] |Downloading: org/springframework/spring-aop/3.0.6.RELEASE/spring-aop-3.0.6.RELEASE.pom
11:35:01.697 [QUIET] [system.out] |Downloading: org/springframework/spring-asm/3.0.6.RELEASE/spring-asm-3.0.6.RELEASE.pom
11:35:02.687 [QUIET] [system.out] |Downloading: org/springframework/spring-beans/3.0.6.RELEASE/spring-beans-3.0.6.RELEASE.pom
11:35:03.723 [QUIET] [system.out] |Downloading: org/springframework/spring-core/3.0.6.RELEASE/spring-core-3.0.6.RELEASE.pom
11:35:04.525 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:35:04.526 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:35:04.526 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:35:04.527 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
11:35:04.780 [QUIET] [system.out] |Downloading: org/springframework/spring-expression/3.0.6.RELEASE/spring-expression-3.0.6.RELEASE.pom
11:35:06.729 [QUIET] [system.out] |Downloading: org/springframework/spring-test/3.1.4.RELEASE/spring-test-3.1.4.RELEASE.pom
11:35:07.703 [QUIET] [system.out] |Downloading: org/springframework/spring-parent/3.1.4.RELEASE/spring-parent-3.1.4.RELEASE.pom
11:35:11.694 [QUIET] [system.out] |Downloading: org/codehaus/castor/castor-xml/1.3.3/castor-xml-1.3.3.jar
11:35:11.700 [QUIET] [system.out] |Downloading: org/springframework/webflow/spring-binding/2.0.8.RELEASE/spring-binding-2.0.8.RELEASE.jar
11:35:11.710 [QUIET] [system.out] |Downloading: org/springframework/spring-orm/3.2.8.RELEASE/spring-orm-3.2.8.RELEASE.jar
11:35:11.711 [QUIET] [system.out] |Downloading: org/springframework/webflow/spring-webflow/2.0.8.RELEASE/spring-webflow-2.0.8.RELEASE.jar
11:35:11.717 [QUIET] [system.out] |Downloading: org/springframework/webflow/spring-js/2.0.8.RELEASE/spring-js-2.0.8.RELEASE.jar
11:35:12.585 [QUIET] [system.out] |Downloading: org/codehaus/castor/castor-core/1.3.3/castor-core-1.3.3.jar
11:35:12.790 [QUIET] [system.out] |Downloading: org/springframework/spring-test/3.1.4.RELEASE/spring-test-3.1.4.RELEASE.jar
11:35:14.525 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:35:14.529 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:35:14.529 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:35:14.532 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.

有任何解决此问题的建议吗?

0 个答案:

没有答案