如何从圣杯应用程序中挑选专家罐



我有一个 grails 2.4.3 应用程序,现在我想从 maven 获取一个 jar,虽然我已经添加了存储库位置,但在构建应用程序时,grails 总是查看 grailscentral,如何从 maven 获取 jar?

CXF罐子在Maven的位置(常春藤类型(是

<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-bundle -->
<dependency org="org.apache.cxf" name="cxf-bundle" rev="2.3.1"/>

我在存储库中添加了 mavenRepo ,但依赖项未被拾取并显示错误

构建配置代码段:

    repositories {
        inherits true // Whether to inherit repository definitions from plugins
        grailsPlugins()
       grailsHome()
        mavenLocal()
       grailsCentral()
        mavenCentral()
        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://repository.codehaus.org"
        mavenRepo "https://mvnrepository.com/artifact/org.apache.cxf/cxf-bundle"


        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }
    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
        // runtime 'mysql:mysql-connector-java:5.1.29'
        // runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
        test "org.grails:grails-datastore-test-support:1.0-grails-2.4"
        <!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-bundle -->
        <dependency org="org.apache.cxf" name="cxf-bundle" rev="2.3.1"/>
    }

虽然 Grails 2 在内部使用 ivy 来解决依赖关系 - 这不是您在 BuildConfig.groovy 中使用的格式。您已将 xml 粘贴到一个无法正常工作的时髦文件中。

遵循其正上方的依赖项的约定,例如:

compile "org.apache.cxf:cxf-bundle:2.3.1"

最新更新