Gradle - 从Maven(快照)存储库获取jar和本机库

时间:2014-04-17 03:05:06

标签: maven gradle repository

https://maven.java.net/content/repositories/public/com/oracle/avatar-js/0.10.25-SNAPSHOT/

中有jar

https://maven.java.net/content/repositories/public/com/oracle/libavatar-js-win-x64/0.10.25-SNAPSHOT/

中的dll

build.gradle 即使是jar也可以获得这些依赖项。

repositories {
    maven {
        url "https://maven.java.net/content/repositories/public/"
    }
}

dependencies {
    compile "com.oracle.avatar-js:avatar-js:0.10.+"
}

有错误

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find any version that matches com.oracle.avatar-js:avatar-js:0.10.+.

如何从Maven存储库中的路径转换为Gradle依赖规范?

Gradle task to put jars from Maven repository into project lib folder

相关

1 个答案:

答案 0 :(得分:1)

您的依赖关系声明行不正确。

  

编译“com.oracle.avatar-js:avatar-js:0.10。+”

存储库不包含该名称下的工件。组ID应为com.oracle

我做了一个快速测试,以下行:

  

编译“com.oracle:avatar-js:0.10.25-SNAPSHOT”