[英]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()
}
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.