Gradle Drools 6.2无法解析配置的所有依赖:'compile' [英] Gradle Drools 6.2 Could not resolve all dependencies for configuration ':compile'

查看:309
本文介绍了Gradle Drools 6.2无法解析配置的所有依赖:'compile'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用gradle插入Drools 6.2并继续收到以下错误。我读到,这可能是一个回购问题,有poms,但不是罐子,但似乎并非如此。坦率地说,我有点卡住,不知道如何在这里继续。

I'm trying to pull in Drools 6.2 using gradle and keep getting the following error. I read that it could be an issue with repos that have poms, but not jars, but that doesn't seem to be the case. Frankly I'm a bit stuck and don't know how to proceed here.

Could not resolve all dependencies for configuration ':compile'.
> Could not resolve org.kie:kie-api:6.2.0.Final.
  Required by:
      1:1:1
   > Could not resolve org.kie:kie-api:6.2.0.Final.
      > Could not parse POM http://repo1.maven.org/maven2/org/kie/kie-api/6.2.0.Final/kie-api-6.2.0.Final.pom
         > Could not resolve org.kie:kie-api-parent:6.2.0.Final.
            > Could not resolve org.kie:kie-api-parent:6.2.0.Final.
               > Could not parse POM http://repo1.maven.org/maven2/org/kie/kie-api-parent/6.2.0.Final/kie-api-parent-6.2.0.Final.pom
                  > Could not resolve org.kie:kie-parent-with-dependencies:6.2.0.Final.
                     > Could not resolve org.kie:kie-parent-with-dependencies:6.2.0.Final.
                        > Could not parse POM http://repo1.maven.org/maven2/org/kie/kie-parent-with-dependencies/6.2.0.Final/kie-parent-with-dependencies-6.2.0.Final.pom
                           > Could not find org.jboss.dashboard-builder:dashboard-builder-bom:6.2.0.Final.
                             Searched in the following locations:
                                 http://repo1.maven.org/maven2/org/jboss/dashboard-builder/dashboard-builder-bom/6.2.0.Final/dashboard-builder-bom-6.2.0.Final.pom
                                 http://repo1.maven.org/maven2/org/jboss/dashboard-builder/dashboard-builder-bom/6.2.0.Final/dashboard-builder-bom-6.2.0.Final.jar

这是我的build.gradle:

Here is my build.gradle:

apply plugin: 'java'
apply plugin: 'eclipse'

group = '1'
version = '1'

description = ""

repositories {
  maven {
    url 'http://repo1.maven.org/maven2'
    artifactUrls 'http://repository.jboss.org/nexus/content/groups/public-jboss'
  }
}
ext {
 droolsVersion = '6.2.0.Final'
}
dependencies {
 compile "org.kie:kie-api:$droolsVersion"
 compile "org.drools:drools-core:$droolsVersion"
 compile "org.drools:drools-compiler:$droolsVersion"
}



我也试过:

I've also tried:

repositories {
    mavenCentral()
}



编辑:



对于未来的googlers,我们确定Drools对Gradle来说是一场糟糕的比赛。我们必须拼凑一些黑客来保持它的工作,并最终切换到Maven。和所有东西一样,YMMV。

For future googlers, we determined that Drools is a very poor match for Gradle. We had to cobble together a number of hacks to keep it working, and ended up switching to Maven. As with all things, YMMV.

推荐答案

如果你想告诉gradle看看不同的位置,你应该写这样的仓库:

If you want to tell gradle to look at different locations you should write the repositories like this:

repositories {
    maven {
    name 'central'
    url 'http://repo1.maven.org/maven2'
    }
    maven {
    name 'jboss'
    url 'http://repository.jboss.org/nexus/content/groups/public-jboss'
    }
  }

这篇关于Gradle Drools 6.2无法解析配置的所有依赖:'compile'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆