首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法生成gradle项目,因为javaml依赖失败

无法生成gradle项目,因为javaml依赖失败
EN

Stack Overflow用户
提问于 2019-10-18 02:34:38
回答 1查看 331关注 0票数 0

我有一个运行在eclipse上的gradle Java项目,它直接使用Javaml库,但是每次我尝试使用项目根文件夹中的gradle clean build编译项目时,我都会得到以下错误:

代码语言:javascript
复制
 Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find net.sourceforge:javaml:0.1.5.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/net/sourceforge/javaml/0.1.5/javaml-0.1.5.pom
       - https://repo.maven.apache.org/maven2/net/sourceforge/javaml/0.1.5/javaml-0.1.5.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s

我的build.Gradle和依赖项的代码如下:

代码语言:javascript
复制
    plugins {
    id 'com.palantir.docker' version '0.22.1'
}
allprojects {apply plugin: 'idea'}
//and standard one
apply plugin: 'java'

repositories {
    mavenCentral()
}
docker {
        name "hig"
        dockerfile file('src/docker/Dockerfile')
        copySpec.from(jar).rename(".*","app.jar")
        buildArgs(['JAR_FILE' : "app.jar"])
}
dependencies {
    //compile project(':shared')
    // https://mvnrepository.com/artifact/org.apache.commons/commons-math3
    compile group: 'org.apache.commons', name: 'commons-math3', version: '3.0'
    // https://mvnrepository.com/artifact/org.ujmp/ujmp-core
    compile group: 'org.ujmp', name: 'ujmp-core', version: '0.3.0'
    // https://mvnrepository.com/artifact/com.datumbox/lpsolve
    compile group: 'com.datumbox', name: 'lpsolve', version: '5.5.2.0'
    // https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.1'
    // https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
    compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.7.2'
    // https://mvnrepository.com/artifact/junit/junit
    testCompile group: 'junit', name: 'junit', version: '4.4'
    // https://mvnrepository.com/artifact/net.sourceforge/javaml
    compile group: 'net.sourceforge', name: 'javaml', version: '0.1.5'


}

有人知道为什么java ml依赖不被识别吗?注意:我访问了maven存储库网站,但javaml不在Note2中:我也无法在本地获取依赖项。

EN

回答 1

Stack Overflow用户

发布于 2019-10-18 20:22:48

在mvnrepository页面下有provider repos选项卡。将http://maven.icm.edu.pl/artifactory/repo/添加到构建配置。

代码语言:javascript
复制
repositories {
  mavenCentral()
  maven {
    name "ICM"
    url "http://maven.icm.edu.pl/artifactory/repo/"
  }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58438819

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档