简体   繁体   English

Gradle Drools 6.2无法解析配置':compile'的所有依赖项

[英]Gradle Drools 6.2 Could not resolve all dependencies for configuration ':compile'

I'm trying to pull in Drools 6.2 using gradle and keep getting the following error. 我正在尝试使用gradle引入Drools 6.2,并不断出现以下错误。 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. 我读到它可能是带有poms而不是jars的repos的问题,但事实并非如此。 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

Here is my build.gradle: 这是我的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()
}

EDIT: 编辑:

For future googlers, we determined that Drools is a very poor match for Gradle. 对于未来的Google员工,我们认为Drools与Gradle的匹配度非常差。 We had to cobble together a number of hacks to keep it working, and ended up switching to Maven. 我们不得不拼凑一些技巧以保持其正常运行,最终改用Maven。 As with all things, YMMV. 与所有事物一样,YMMV。

If you want to tell gradle to look at different locations you should write the repositories like this: 如果要告诉gradle查看不同的位置,则应这样编写存储库:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Gradle 构建失败 [无法解析配置 ':compile' 的所有依赖项。] - Gradle build is failing [Could not resolve all dependencies for configuration ':compile'.] Gradle:无法解析配置“:classpath”的所有依赖项 - Gradle: Could not resolve all dependencies for configuration ':classpath' 在 Gradle 中使用 SWT 无法解决所有依赖项 - Using SWT in Gradle could not resolve all dependencies 无法解析配置':app:_debugApkCopy'的所有依赖项 - Could not resolve all dependencies for configuration ':app:_debugApkCopy' 无法解析配置':app:debugCompileClasspath的所有依赖项 - Could not resolve all dependencies for configuration ':app:debugCompileClasspath 无法解析配置的所有依赖项:类路径' - Could not resolve all dependencies for configuration :classpath' 在Jersey / JAX-RS项目中,Gradle“无法解析配置的所有依赖项” - Gradle 'Could not resolve all dependencies for configuration' in Jersey/JAX-RS project Gradle 构建开始失败并出现错误 - 无法解析配置“:编译”的所有文件 - Gradle build started failing with error - Could not resolve all files for configuration ':compile' 具有依赖关系的Gradle多项目设置->无法解决所有依赖关系 - Gradle Multi-Project Setup with Dependencies -> Could not resolve all dependencies Android Gradle 同步失败:无法解析配置“:classpath”的所有工件 - Android Gradle Sync failed: Could not resolve all artifacts for configuration ':classpath'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM