Maven:找到循环依赖

时间:2016-04-15 03:28:27

标签: maven

这是我在Maven中添加docx4j 3.2.2时得到的结果。

:: problems summary ::
:::: WARNINGS

circular dependency found: org.apache.xmlgraphics#batik-svg-dom;1.7->org.apache.xmlgraphics#batik-anim;1.7->...

circular dependency found: org.apache.xmlgraphics#batik-anim;1.7->org.apache.xmlgraphics#batik-svg-dom;1.7->...

circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-gvt;1.7->...

circular dependency found: org.apache.xmlgraphics#batik-gvt;1.7->org.apache.xmlgraphics#batik-bridge;1.7->...

circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-script;1.7->...

circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-script;1.7->...

circular dependency found: org.apache.xmlgraphics#batik-script;1.7->org.apache.xmlgraphics#batik-bridge;1.7->...

circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-gvt;1.7->...

因为我正在使用grails,所以我知道循环依赖意味着什么。我只是不知道如何解决它,因为它是一个库。我该怎么办才能修复它?或者我应该使用不同的版本?

请注意我使用的是grails,我对maven一无所知。 这是我在BuildConfig中添加它的方式

repositories {
        inherits true // Whether to inherit repository definitions from plugins

        grailsPlugins()
        grailsHome()
        mavenLocal()
        grailsCentral()
        mavenCentral()

        mavenRepo "http://repo.grails.org/grails/core"
        mavenRepo "http://repo.grails.org/grails/plugins"
        mavenRepo "http://repo1.maven.org/maven2"
        mavenRepo "http://dev.plutext.org/svn/docx4j/trunk/docx4j/m2"
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.

        runtime 'mysql:mysql-connector-java:5.1.27'
//        compile 'com.sun.jersey:jersey-core:1.17.1'
//        compile 'com.sun.jersey:jersey-client:1.17.1'
//        compile ('org.jxls:jxls:2.0.0') { excludes "logback-classic" }
//        compile ('org.jxls:jxls-poi:1.0.0') { excludes "logback-classic" }

        compile('org.jxls:jxls-poi:1.0.1') {
            excludes "logback-classic"
            excludes([group: "org.jxls", name: "jxls"])
        }
        compile('org.jxls:jxls:2.1.1') { excludes "logback-classic" }

        compile('net.sf.jasperreports:jasperreports:4.7.1')
//        compile 'com.metrixa.accounting:metrixa-accounting-ws-client:1.0-SNAPSHOT'
        compile("org.docx4j:docx4j:3.2.2") { excludes "slf4j-log4j12" }
    }

0 个答案:

没有答案