У меня есть проект Groovy and Gradle в Eclipse Kepler с несколькими классами и одной спецификацией Spock. Я могу запустить Gradle build из оболочки, и он отлично работает, в том числе Spock spec.Ошибка несоответствия версии Groovy в проекте Gradle в Eclipse
Теперь я хотел попробовать запустить Spock spec в Eclipse, либо в отладчике, либо нет. Когда я бегу, я вижу следующее:
Conflicting module versions. Module [groovy-all is loaded in version 2.3.9 and
you are trying to load version 2.3.10
Вот мой «зависимости» от блока build.gradle:
dependencies {
compile localGroovy()
compile gradleApi()
compile "org.opendaylight.yangtools:yang-parser-impl:0.7.0-SNAPSHOT"
testCompile("org.spockframework:spock-core:1.0-groovy-2.3") {
exclude group: "org.codehaus.groovy"
}
}
можно увидеть в Project Explorer, что мои Gradle зависимостей имеет groovy- all-2.3.9.jar и мои зависимости Groovy имеют groovy-all-2.3.10.jar.
Это немного беспорядок. Могу ли я безопасно редактировать мои зависимости Groovy от проекта и менять банку на версию 2.3.9?
Update:
Вот что "заводная зависимость" из командной строки говорит. Это не имеет никакого отношения к тому, что использует Eclipse.
:dependencies
------------------------------------------------------------
Root project
------------------------------------------------------------
archives - Configuration for archive artifacts.
No dependencies
compile - Compile classpath for source set 'main'.
+--- org.codehaus.groovy:groovy-all:2.3.9
\--- org.opendaylight.yangtools:yang-parser-impl:0.7.0-SNAPSHOT
+--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT
| +--- com.google.guava:guava:18.0
| +--- org.slf4j:slf4j-api:1.7.2
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| +--- org.slf4j:slf4j-api:1.7.2
| \--- com.google.guava:guava:18.0
+--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT (*)
| +--- org.opendaylight.yangtools:util:0.7.0-SNAPSHOT
| | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | +--- com.google.code.findbugs:jsr305:2.0.3
| | +--- org.slf4j:slf4j-api:1.7.2
| | +--- com.google.guava:guava:18.0
| | \--- com.github.romix:java-concurrent-hash-trie-map:0.2.23
| +--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT (*)
| +--- com.google.guava:guava:18.0
| \--- com.google.code.findbugs:jsr305:2.0.3
+--- org.opendaylight.yangtools:yang-parser-api:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
+--- org.opendaylight.yangtools:yang-model-util:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
+--- org.antlr:antlr4-runtime:4.0
| \--- org.abego.treelayout:org.abego.treelayout.core:1.0.1
+--- com.google.guava:guava:18.0
+--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
+--- commons-io:commons-io:2.4
\--- com.google.code.findbugs:jsr305:2.0.3
default - Configuration for default artifacts.
+--- org.codehaus.groovy:groovy-all:2.3.9
\--- org.opendaylight.yangtools:yang-parser-impl:0.7.0-SNAPSHOT
+--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT
| +--- com.google.guava:guava:18.0
| +--- org.slf4j:slf4j-api:1.7.2
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| +--- org.slf4j:slf4j-api:1.7.2
| \--- com.google.guava:guava:18.0
+--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT (*)
| +--- org.opendaylight.yangtools:util:0.7.0-SNAPSHOT
| | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | +--- com.google.code.findbugs:jsr305:2.0.3
| | +--- org.slf4j:slf4j-api:1.7.2
| | +--- com.google.guava:guava:18.0
| | \--- com.github.romix:java-concurrent-hash-trie-map:0.2.23
| +--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT (*)
| +--- com.google.guava:guava:18.0
| \--- com.google.code.findbugs:jsr305:2.0.3
+--- org.opendaylight.yangtools:yang-parser-api:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
+--- org.opendaylight.yangtools:yang-model-util:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
+--- org.antlr:antlr4-runtime:4.0
| \--- org.abego.treelayout:org.abego.treelayout.core:1.0.1
+--- com.google.guava:guava:18.0
+--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
+--- commons-io:commons-io:2.4
\--- com.google.code.findbugs:jsr305:2.0.3
runtime - Runtime classpath for source set 'main'.
+--- org.codehaus.groovy:groovy-all:2.3.9
\--- org.opendaylight.yangtools:yang-parser-impl:0.7.0-SNAPSHOT
+--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT
| +--- com.google.guava:guava:18.0
| +--- org.slf4j:slf4j-api:1.7.2
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| +--- org.slf4j:slf4j-api:1.7.2
| \--- com.google.guava:guava:18.0
+--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT (*)
| +--- org.opendaylight.yangtools:util:0.7.0-SNAPSHOT
| | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | +--- com.google.code.findbugs:jsr305:2.0.3
| | +--- org.slf4j:slf4j-api:1.7.2
| | +--- com.google.guava:guava:18.0
| | \--- com.github.romix:java-concurrent-hash-trie-map:0.2.23
| +--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT (*)
| +--- com.google.guava:guava:18.0
| \--- com.google.code.findbugs:jsr305:2.0.3
+--- org.opendaylight.yangtools:yang-parser-api:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
+--- org.opendaylight.yangtools:yang-model-util:0.7.0-SNAPSHOT
| \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
+--- org.antlr:antlr4-runtime:4.0
| \--- org.abego.treelayout:org.abego.treelayout.core:1.0.1
+--- com.google.guava:guava:18.0
+--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
+--- commons-io:commons-io:2.4
\--- com.google.code.findbugs:jsr305:2.0.3
testCompile - Compile classpath for source set 'test'.
+--- org.codehaus.groovy:groovy-all:2.3.9
+--- org.opendaylight.yangtools:yang-parser-impl:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT
| | +--- com.google.guava:guava:18.0
| | +--- org.slf4j:slf4j-api:1.7.2
| | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | \--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT
| | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | +--- org.slf4j:slf4j-api:1.7.2
| | \--- com.google.guava:guava:18.0
| +--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT
| | +--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT (*)
| | +--- org.opendaylight.yangtools:util:0.7.0-SNAPSHOT
| | | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | | +--- com.google.code.findbugs:jsr305:2.0.3
| | | +--- org.slf4j:slf4j-api:1.7.2
| | | +--- com.google.guava:guava:18.0
| | | \--- com.github.romix:java-concurrent-hash-trie-map:0.2.23
| | +--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT (*)
| | +--- com.google.guava:guava:18.0
| | \--- com.google.code.findbugs:jsr305:2.0.3
| +--- org.opendaylight.yangtools:yang-parser-api:0.7.0-SNAPSHOT
| | \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
| +--- org.opendaylight.yangtools:yang-model-util:0.7.0-SNAPSHOT
| | \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
| +--- org.antlr:antlr4-runtime:4.0
| | \--- org.abego.treelayout:org.abego.treelayout.core:1.0.1
| +--- com.google.guava:guava:18.0
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| +--- commons-io:commons-io:2.4
| \--- com.google.code.findbugs:jsr305:2.0.3
\--- org.spockframework:spock-core:1.0-groovy-2.3
\--- junit:junit:4.12
\--- org.hamcrest:hamcrest-core:1.3
testRuntime - Runtime classpath for source set 'test'.
+--- org.codehaus.groovy:groovy-all:2.3.9
+--- org.opendaylight.yangtools:yang-parser-impl:0.7.0-SNAPSHOT
| +--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT
| | +--- com.google.guava:guava:18.0
| | +--- org.slf4j:slf4j-api:1.7.2
| | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | \--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT
| | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | +--- org.slf4j:slf4j-api:1.7.2
| | \--- com.google.guava:guava:18.0
| +--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT
| | +--- org.opendaylight.yangtools:object-cache-api:0.7.0-SNAPSHOT (*)
| | +--- org.opendaylight.yangtools:util:0.7.0-SNAPSHOT
| | | +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| | | +--- com.google.code.findbugs:jsr305:2.0.3
| | | +--- org.slf4j:slf4j-api:1.7.2
| | | +--- com.google.guava:guava:18.0
| | | \--- com.github.romix:java-concurrent-hash-trie-map:0.2.23
| | +--- org.opendaylight.yangtools:yang-common:0.7.0-SNAPSHOT (*)
| | +--- com.google.guava:guava:18.0
| | \--- com.google.code.findbugs:jsr305:2.0.3
| +--- org.opendaylight.yangtools:yang-parser-api:0.7.0-SNAPSHOT
| | \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
| +--- org.opendaylight.yangtools:yang-model-util:0.7.0-SNAPSHOT
| | \--- org.opendaylight.yangtools:yang-model-api:0.7.0-SNAPSHOT (*)
| +--- org.antlr:antlr4-runtime:4.0
| | \--- org.abego.treelayout:org.abego.treelayout.core:1.0.1
| +--- com.google.guava:guava:18.0
| +--- org.opendaylight.yangtools:concepts:0.7.0-SNAPSHOT
| +--- commons-io:commons-io:2.4
| \--- com.google.code.findbugs:jsr305:2.0.3
\--- org.spockframework:spock-core:1.0-groovy-2.3
\--- junit:junit:4.12
\--- org.hamcrest:hamcrest-core:1.3
(*) - dependencies omitted (listed previously)
BUILD SUCCESSFUL
Total time: 2.041 secs
Бинго! Я об этом не думал. –