Gradle cannot find Scala tests when upgraded to 4.2 - scala

I have a project relying on Scala and Gradle as a build tool that was on hold for a while. I got back to it, and first upgrade Gradle to 4.2 ( the previous version was 3.2).
After this upgrade, I cannot build my project anymore and it always fails on tests. For example, this is the output I get:
kbreconstruction.TestBiasComponents > initializationError FAILED
java.lang.NoSuchMethodError at TestBiasComponents.scala:23
where the line 23 is simply a
describe("...")
statement of scalatest.
The only thing that has changed from a few months ago is that I removed some of the maven repositories that are not working anymore (and weren't used actually before).
The actual error that I get is this
java.lang.NoSuchMethodError: scala.runtime.ObjectRef.create(Ljava/lang/Object;)Lscala/runtime/ObjectRef;
This looks like there is a Scala version mismatch, but I'm then wondering how is it possible it worked before?
Did anyone have a similar issue before?
My build.gradle looks like this
version '1.2'
apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin:'application'
mainClassName = 'CommandLine'
ext {
scalaVersion = '2.11.11'
scalaLibVersion = '2.11.11'
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}
apply plugin: 'com.github.johnrengelman.shadow'
repositories {
mavenCentral()
maven {
url "http://artifactory.info.ucl.ac.be/artifactory/libs-release"
}
flatDir {
dirs 'libs'
}
}
dependencies {
compile 'org.scala-lang:scala-library:2.11.8'
//parsing
compile 'com.github.scopt:scopt_2.11:3.5.0'
//tweety and it's missing dependencies
compile'net.sf.tweety:tweety-full:1.8'
compile 'org.ojalgo:ojalgo:35.0.1'
// logging
compile 'ch.qos.logback:logback-classic:1.1.7'
compile 'ch.qos.logback:logback-core:1.1.7'
compile'org.slf4j:slf4j-api:1.7.21'
//compile 'org.slf4j:slf4j-simple:1.7.21'
//compile 'org.clapper:grizzled-scala_2.11:3.0.0'
compile 'org.clapper:grizzled-slf4j_2.11:1.2.0'
// JaCoP library
compile 'org.jacop:jacop:4.4.0'
//OscaR
compile 'oscar:oscar-cp_2.11:3.1.0'
//missing libraries directory
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile group: 'junit', name: 'junit', version: '4.+'
testCompile "org.scalatest:scalatest_2.11:3.0.0"
}
compileScala {
scalaCompileOptions.additionalParameters = [ '-feature' ]
}
idea {
module {
excludeDirs += file('.idea')
inheritOutputDirs = true
downloadJavadoc = true
downloadSources = true
}
}
task scalatest(dependsOn: ['testClasses'], type: JavaExec) {
main = 'org.scalatest.tools.Runner'
args = ['-R', 'build/classes/test', '-o']
classpath = sourceSets.test.runtimeClasspath
}
task wrapper(type: Wrapper) {
gradleVersion = '4.2' //version required
}
jar {
manifest {
attributes 'Main-Class': mainClassName
}
}
It's the same with IntelliJ - it cannot execute tests anymore.
Looking into output of gradle dependencies pointed me out to this
+--- net.sf.tweety:action:1.9
| | +--- net.sf.tweety:commons:1.9
| | | +--- ch.qos.logback:logback-core:0.9.30 -> 1.1.7
| | | +--- ch.qos.logback:logback-classic:0.9.30 -> 1.1.7
| | | | +--- ch.qos.logback:logback-core:1.1.7
| | | | \--- org.slf4j:slf4j-api:1.7.20 -> 1.7.21
| | | \--- org.slf4j:log4j-over-slf4j:1.6.3
| | | \--- org.slf4j:slf4j-api:1.6.3 -> 1.7.21
| | +--- net.sf.tweety.logics:fol:1.9
| | | +--- net.sf.tweety.logics:commons:1.9
| | | | +--- net.sf.tweety:commons:1.9 (*)
| | | | \--- net.sf.tweety:math:1.9
| | | | +--- net.sf.tweety:commons:1.9 (*)
| | | | +--- org.apache.commons:commons-math:2.1
| | | | +--- org.apache.commons:commons-math3:3.2
| | | | +--- gov.nist.math:jama:1.0.3
| | | | +--- org.slf4j:log4j-over-slf4j:1.6.3 (*)
| | | | +--- org.ojalgo:ojalgo:35.0 -> 35.0.1
| | | | \--- com.dbtsai.lbfgs:lbfgs:0.1
| | | | \--- org.scala-lang:scala-library:2.10.3 -> 2.11.11
but it seems that dependency has already replaced the old scala library version.

Related

Spring Boot 2.2.4 error after upgrading: scala error: "java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)[Ljava/lang/Object;"

After upgrading to Spring Boot 2.2.4, I have a strange compilation error:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.databind.ObjectMapper]: Factory method 'jacksonObjectMapper' threw exception; nested exception is java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)[Ljava/lang/Object;
I have no scala dependency in my classpath.
Running a gradlew dependencies --configurationruntimeClasspath gives me:
> Task :dependencies
------------------------------------------------------------
Root project
------------------------------------------------------------
runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.scala-lang:scala-library -> 2.12.10
+--- org.springframework.boot:spring-boot-starter-webflux -> 2.2.4.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE
| | +--- org.springframework.boot:spring-boot:2.2.4.RELEASE
| | | +--- org.springframework:spring-core:5.2.3.RELEASE
| | | | \--- org.springframework:spring-jcl:5.2.3.RELEASE
| | | \--- org.springframework:spring-context:5.2.3.RELEASE
| | | +--- org.springframework:spring-aop:5.2.3.RELEASE
| | | | +--- org.springframework:spring-beans:5.2.3.RELEASE
| | | | | \--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | | | \--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.2.3.RELEASE
| | | \--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.2.4.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE
| | | +--- ch.qos.logback:logback-classic:1.2.3
| | | | +--- ch.qos.logback:logback-core:1.2.3
| | | | \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.12.1
| | | | +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | | | \--- org.apache.logging.log4j:log4j-api:2.12.1
| | | \--- org.slf4j:jul-to-slf4j:1.7.30
| | | \--- org.slf4j:slf4j-api:1.7.30
| | +--- jakarta.annotation:jakarta.annotation-api:1.3.5
| | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | \--- org.yaml:snakeyaml:1.25
| +--- org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
| | +--- org.springframework:spring-web:5.2.3.RELEASE
| | | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | | \--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
| | | \--- com.fasterxml.jackson.core:jackson-core:2.10.2
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-core:2.10.2
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-core:2.10.2
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2
| | +--- com.fasterxml.jackson.core:jackson-core:2.10.2
| | \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| +--- org.springframework.boot:spring-boot-starter-reactor-netty:2.2.4.RELEASE
| | +--- io.projectreactor.netty:reactor-netty:0.9.4.RELEASE
| | | +--- io.netty:netty-codec-http:4.1.44.Final -> 4.1.45.Final
| | | | +--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-buffer:4.1.45.Final
| | | | | \--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-transport:4.1.45.Final
| | | | | +--- io.netty:netty-common:4.1.45.Final
| | | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | | \--- io.netty:netty-resolver:4.1.45.Final
| | | | | \--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-codec:4.1.45.Final
| | | | | +--- io.netty:netty-common:4.1.45.Final
| | | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | | \--- io.netty:netty-transport:4.1.45.Final (*)
| | | | \--- io.netty:netty-handler:4.1.45.Final
| | | | +--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | +--- io.netty:netty-transport:4.1.45.Final (*)
| | | | \--- io.netty:netty-codec:4.1.45.Final (*)
| | | +--- io.netty:netty-codec-http2:4.1.44.Final -> 4.1.45.Final
| | | | +--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | +--- io.netty:netty-transport:4.1.45.Final (*)
| | | | +--- io.netty:netty-codec:4.1.45.Final (*)
| | | | +--- io.netty:netty-handler:4.1.45.Final (*)
| | | | \--- io.netty:netty-codec-http:4.1.45.Final (*)
| | | +--- io.netty:netty-handler:4.1.44.Final -> 4.1.45.Final (*)
| | | +--- io.netty:netty-handler-proxy:4.1.44.Final -> 4.1.45.Final
| | | | +--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | +--- io.netty:netty-transport:4.1.45.Final (*)
| | | | +--- io.netty:netty-codec:4.1.45.Final (*)
| | | | +--- io.netty:netty-codec-socks:4.1.45.Final
| | | | | +--- io.netty:netty-common:4.1.45.Final
| | | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | | +--- io.netty:netty-transport:4.1.45.Final (*)
| | | | | \--- io.netty:netty-codec:4.1.45.Final (*)
| | | | \--- io.netty:netty-codec-http:4.1.45.Final (*)
| | | +--- io.netty:netty-transport-native-epoll:4.1.44.Final -> 4.1.45.Final
| | | | +--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | +--- io.netty:netty-transport:4.1.45.Final (*)
| | | | \--- io.netty:netty-transport-native-unix-common:4.1.45.Final
| | | | +--- io.netty:netty-common:4.1.45.Final
| | | | +--- io.netty:netty-buffer:4.1.45.Final (*)
| | | | \--- io.netty:netty-transport:4.1.45.Final (*)
| | | \--- io.projectreactor:reactor-core:3.3.2.RELEASE
| | | \--- org.reactivestreams:reactive-streams:1.0.3
| | \--- org.glassfish:jakarta.el:3.0.3
| +--- org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
| | +--- jakarta.validation:jakarta.validation-api:2.0.2
| | \--- org.hibernate.validator:hibernate-validator:6.0.18.Final
| | +--- org.jboss.logging:jboss-logging:3.3.2.Final -> 3.4.1.Final
| | \--- com.fasterxml:classmate:1.3.4 -> 1.5.1
| +--- org.springframework:spring-web:5.2.3.RELEASE (*)
| +--- org.springframework:spring-webflux:5.2.3.RELEASE
| | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-web:5.2.3.RELEASE (*)
| | \--- io.projectreactor:reactor-core:3.3.2.RELEASE (*)
| \--- org.synchronoss.cloud:nio-multipart-parser:1.1.0
| +--- org.slf4j:slf4j-api:1.7.12 -> 1.7.30
| \--- org.synchronoss.cloud:nio-stream-storage:1.1.3
| \--- org.slf4j:slf4j-api:1.7.12 -> 1.7.30
+--- org.springframework.integration:spring-integration-webflux -> 5.2.3.RELEASE
| +--- org.springframework.integration:spring-integration-http:5.2.3.RELEASE
| | \--- org.springframework.integration:spring-integration-core:5.2.3.RELEASE
| | +--- io.projectreactor:reactor-core:3.3.2.RELEASE (*)
| | +--- org.springframework.retry:spring-retry:1.2.5.RELEASE
| | +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-context:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-messaging:5.2.3.RELEASE
| | | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | | \--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | \--- org.springframework:spring-tx:5.2.3.RELEASE
| | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | \--- org.springframework:spring-core:5.2.3.RELEASE (*)
| \--- org.springframework:spring-webflux:5.2.3.RELEASE (*)
+--- org.springframework.boot:spring-boot-starter-actuator -> 2.2.4.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
| +--- org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.4.RELEASE
| | +--- org.springframework.boot:spring-boot-actuator:2.2.4.RELEASE
| | | +--- org.springframework.boot:spring-boot:2.2.4.RELEASE (*)
| | | \--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2 (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-context:5.2.3.RELEASE (*)
| | \--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2 (*)
| \--- io.micrometer:micrometer-core:1.3.2
| +--- org.hdrhistogram:HdrHistogram:2.1.11
| \--- org.latencyutils:LatencyUtils:2.0.3
+--- org.springframework.boot:spring-boot-starter-security -> 2.2.4.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
| +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
| +--- org.springframework.security:spring-security-config:5.2.1.RELEASE
| | +--- org.springframework.security:spring-security-core:5.2.1.RELEASE
| | | +--- org.springframework:spring-aop:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-context:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-core:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | +--- org.springframework:spring-aop:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | +--- org.springframework:spring-beans:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | +--- org.springframework:spring-context:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| | \--- org.springframework:spring-core:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| \--- org.springframework.security:spring-security-web:5.2.1.RELEASE
| +--- org.springframework.security:spring-security-core:5.2.1.RELEASE (*)
| +--- org.springframework:spring-aop:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| +--- org.springframework:spring-beans:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| +--- org.springframework:spring-context:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| +--- org.springframework:spring-core:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| +--- org.springframework:spring-expression:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
| \--- org.springframework:spring-web:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.2.4.RELEASE
| +--- org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
| | +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
| | \--- org.aspectj:aspectjweaver:1.9.5
| +--- org.springframework.boot:spring-boot-starter-jdbc:2.2.4.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
| | +--- com.zaxxer:HikariCP:3.4.2
| | | \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | \--- org.springframework:spring-jdbc:5.2.3.RELEASE
| | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | \--- org.springframework:spring-tx:5.2.3.RELEASE (*)
| +--- jakarta.activation:jakarta.activation-api:1.2.1
| +--- jakarta.persistence:jakarta.persistence-api:2.2.3
| +--- jakarta.transaction:jakarta.transaction-api:1.3.3
| +--- org.hibernate:hibernate-core:5.4.10.Final
| | +--- org.jboss.logging:jboss-logging:3.3.2.Final -> 3.4.1.Final
| | +--- org.javassist:javassist:3.24.0-GA
| | +--- net.bytebuddy:byte-buddy:1.10.2 -> 1.10.6
| | +--- antlr:antlr:2.7.7
| | +--- org.jboss:jandex:2.1.1.Final
| | +--- com.fasterxml:classmate:1.5.1
| | +--- org.dom4j:dom4j:2.1.1
| | +--- org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
| | | \--- org.jboss.logging:jboss-logging:3.3.2.Final -> 3.4.1.Final
| | \--- org.glassfish.jaxb:jaxb-runtime:2.3.1 -> 2.3.2
| | +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
| | | \--- jakarta.activation:jakarta.activation-api:1.2.1
| | +--- org.glassfish.jaxb:txw2:2.3.2
| | +--- com.sun.istack:istack-commons-runtime:3.0.8
| | | \--- jakarta.activation:jakarta.activation-api:1.2.1
| | +--- org.jvnet.staxex:stax-ex:1.8.1
| | | +--- jakarta.activation:jakarta.activation-api:1.2.1
| | | \--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2 (*)
| | +--- com.sun.xml.fastinfoset:FastInfoset:1.2.16
| | \--- jakarta.activation:jakarta.activation-api:1.2.1
| +--- org.springframework.data:spring-data-jpa:2.2.4.RELEASE
| | +--- org.springframework.data:spring-data-commons:2.2.4.RELEASE
| | | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | | \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
| | +--- org.springframework:spring-orm:5.2.3.RELEASE
| | | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-jdbc:5.2.3.RELEASE (*)
| | | \--- org.springframework:spring-tx:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-context:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-tx:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
| | +--- org.springframework:spring-core:5.2.3.RELEASE (*)
| | \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
| \--- org.springframework:spring-aspects:5.2.3.RELEASE
| +--- org.aspectj:aspectjweaver:1.9.5
| \--- org.springframework:spring-orm:5.2.3.RELEASE (*)
+--- org.liquibase:liquibase-core -> 3.8.5
| +--- javax.xml.bind:jaxb-api:2.3.0 -> 2.3.1
| | \--- javax.activation:javax.activation-api:1.2.0
| +--- org.slf4j:slf4j-api:1.7.28 -> 1.7.30
| \--- ch.qos.logback:logback-classic:1.2.3 (*)
+--- org.postgresql:postgresql -> 42.2.9
+--- net.javacrumbs.shedlock:shedlock-spring:2.3.0
| +--- net.javacrumbs.shedlock:shedlock-core:2.3.0
| | \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
| +--- org.springframework:spring-context:5.0.6.RELEASE -> 5.2.3.RELEASE (*)
| \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
+--- net.javacrumbs.shedlock:shedlock-provider-jdbc-template:2.3.0
| +--- net.javacrumbs.shedlock:shedlock-core:2.3.0 (*)
| +--- org.springframework:spring-jdbc:5.0.6.RELEASE -> 5.2.3.RELEASE (*)
| +--- net.javacrumbs.shedlock:shedlock-provider-jdbc-internal:2.3.0
| | +--- net.javacrumbs.shedlock:shedlock-core:2.3.0 (*)
| | \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
| \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
+--- org.apache.commons:commons-lang3 -> 3.9
+--- com.fasterxml.jackson.module:jackson-module-afterburner -> 2.10.2
| +--- com.fasterxml.jackson.core:jackson-core:2.10.2
| \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
+--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations -> 2.10.2
| +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
| +--- com.fasterxml.jackson.core:jackson-core:2.10.2
| +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2 (*)
| \--- jakarta.activation:jakarta.activation-api:1.2.1
+--- net.logstash.logback:logstash-logback-encoder:4.11
| +--- ch.qos.logback:logback-core:1.2.3
| \--- com.fasterxml.jackson.core:jackson-databind:2.8.9 -> 2.10.2 (*)
+--- io.sentry:sentry-logback:1.7.27
| +--- io.sentry:sentry:1.7.27
| | +--- org.slf4j:slf4j-api:1.7.24 -> 1.7.30
| | \--- com.fasterxml.jackson.core:jackson-core:2.9.9 -> 2.10.2
| +--- org.slf4j:slf4j-api:1.7.24 -> 1.7.30
| +--- ch.qos.logback:logback-core:1.2.1 -> 1.2.3
| \--- ch.qos.logback:logback-classic:1.2.1 -> 1.2.3 (*)
+--- io.springfox:springfox-swagger2:3.0.0-SNAPSHOT
| +--- io.swagger:swagger-annotations:1.5.20
| +--- io.swagger:swagger-models:1.5.20
| | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.5 -> 2.10.2
| | +--- org.slf4j:slf4j-api:1.7.22 -> 1.7.30
| | \--- io.swagger:swagger-annotations:1.5.20
| +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT
| | \--- io.springfox:springfox-core:3.0.0-SNAPSHOT
| | +--- net.bytebuddy:byte-buddy:1.9.10 -> 1.10.6
| | +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
| | +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE
| | | +--- org.springframework:spring-beans:5.2.0.RELEASE -> 5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-context:5.2.0.RELEASE -> 5.2.3.RELEASE (*)
| | | +--- org.springframework:spring-aop:5.2.0.RELEASE -> 5.2.3.RELEASE (*)
| | | \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | \--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE
| | +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
| | \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| +--- io.springfox:springfox-schema:3.0.0-SNAPSHOT
| | +--- io.springfox:springfox-core:3.0.0-SNAPSHOT (*)
| | \--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
| +--- io.springfox:springfox-swagger-common:3.0.0-SNAPSHOT
| | +--- io.swagger:swagger-annotations:1.5.20
| | +--- io.swagger:swagger-models:1.5.20 (*)
| | +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
| | +--- io.springfox:springfox-schema:3.0.0-SNAPSHOT (*)
| | +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT
| | | +--- io.github.classgraph:classgraph:4.1.7
| | | +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
| | | +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | | +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
| | | +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
| | | \--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
| | +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
| | +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
| | \--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
| +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
| +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
| +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
| +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
| \--- org.mapstruct:mapstruct:1.3.0.Final
+--- io.springfox:springfox-spring-webflux:3.0.0-SNAPSHOT
| +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
| +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
| +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
| +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
| \--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
+--- io.springfox:springfox-spring-integration-webflux:3.0.0-SNAPSHOT
| +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
| +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
| +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
| +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
| +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
| +--- io.springfox:springfox-spring-webflux:3.0.0-SNAPSHOT (*)
| \--- io.springfox:springfox-spring-integration:3.0.0-SNAPSHOT
| +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
| +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
| +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
| +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
| +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
| \--- com.athaydes.rawhttp:rawhttp-core:2.0
+--- io.springfox:springfox-swagger-ui:3.0.0-SNAPSHOT
+--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
+--- org.springframework.kafka:spring-kafka -> 2.4.1.RELEASE
| +--- org.apache.kafka:kafka-clients:2.4.0
| | +--- com.github.luben:zstd-jni:1.4.3-1
| | +--- org.lz4:lz4-java:1.6.0
| | +--- org.xerial.snappy:snappy-java:1.1.7.3
| | \--- org.slf4j:slf4j-api:1.7.28 -> 1.7.30
| +--- org.springframework.retry:spring-retry:1.2.4.RELEASE -> 1.2.5.RELEASE
| +--- org.springframework:spring-context:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
| +--- org.springframework:spring-messaging:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
| \--- org.springframework:spring-tx:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
+--- org.springframework.kafka:spring-kafka-test -> 2.4.1.RELEASE
| +--- org.apache.kafka:kafka-clients:2.4.0 (*)
| +--- org.apache.kafka:kafka-streams:2.4.0 -> 2.3.1
| | +--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
| | +--- org.apache.kafka:connect-json:2.3.1
| | | +--- org.apache.kafka:connect-api:2.3.1
| | | | +--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
| | | | \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.10.0 -> 2.10.2 (*)
| | | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.0 -> 2.10.2 (*)
| | | \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
| | +--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
| | \--- org.rocksdb:rocksdbjni:5.18.3
| +--- org.apache.kafka:kafka-streams-test-utils:2.4.0 -> 2.3.1
| | +--- org.apache.kafka:kafka-streams:2.3.1 (*)
| | \--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
| +--- org.apache.kafka:kafka_2.12:2.4.0 -> 2.3.1
| | +--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.10.0 -> 2.10.2 (*)
| | +--- com.fasterxml.jackson.module:jackson-module-scala_2.12:2.10.0 -> 2.10.2
| | | +--- org.scala-lang:scala-library:2.12.10
| | | +--- com.fasterxml.jackson.core:jackson-core:2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| | | \--- com.fasterxml.jackson.module:jackson-module-paranamer:2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| | | \--- com.thoughtworks.paranamer:paranamer:2.8
| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.10.0 -> 2.10.2
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
| | | \--- com.fasterxml.jackson.core:jackson-core:2.10.2
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.0 -> 2.10.2 (*)
| | +--- net.sf.jopt-simple:jopt-simple:5.0.4
| | +--- com.yammer.metrics:metrics-core:2.2.0
| | | \--- org.slf4j:slf4j-api:1.7.2 -> 1.7.30
| | +--- org.scala-lang:scala-library:2.12.8 -> 2.12.10
| | +--- org.scala-lang:scala-reflect:2.12.8
| | | \--- org.scala-lang:scala-library:2.12.8 -> 2.12.10
| | +--- com.typesafe.scala-logging:scala-logging_2.12:3.9.0
| | | +--- org.scala-lang:scala-library:2.12.4 -> 2.12.10
| | | +--- org.scala-lang:scala-reflect:2.12.4 -> 2.12.8 (*)
| | | \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | +--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
| | +--- com.101tec:zkclient:0.11
| | | \--- org.slf4j:slf4j-api:1.6.1 -> 1.7.30
| | \--- org.apache.zookeeper:zookeeper:3.4.14
| | +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | +--- com.github.spotbugs:spotbugs-annotations:3.1.9
| | | \--- com.google.code.findbugs:jsr305:3.0.2
| | \--- org.apache.yetus:audience-annotations:0.5.0
| +--- org.junit.jupiter:junit-jupiter-api:5.5.2
| | +--- org.apiguardian:apiguardian-api:1.1.0
| | +--- org.opentest4j:opentest4j:1.2.0
| | \--- org.junit.platform:junit-platform-commons:1.5.2
| | \--- org.apiguardian:apiguardian-api:1.1.0
| +--- org.springframework.retry:spring-retry:1.2.4.RELEASE -> 1.2.5.RELEASE
| +--- org.springframework:spring-context:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
| \--- org.springframework:spring-test:5.2.2.RELEASE -> 5.2.3.RELEASE
| \--- org.springframework:spring-core:5.2.3.RELEASE (*)
+--- org.apache.kafka:kafka-clients:2.4.0 (*)
(*) - dependencies omitted (listed previously)
A web-based, searchable dependency report is available by adding the --scan option.
BUILD SUCCESSFUL in 5s
1 actionable task: 1 executed
You have several Scala dependencies, both a direct one and some that are pulled in via Kafka. There appears to be a mixture of versions (2.3.1 and 2.4.0) of Spring Kafka which may be contributing to the problem. I'd recommend reviewing your build.gradle and tidying up your dependencies so that you’re using a consistent set of versions.
Andy was right. We do have some problems of mixing dep versions. Details can be found here:
https://docs.spring.io/spring-kafka/reference/html/#deps-for-24x
Specifically, we do this:
dependencies {
compile 'org.scala-lang:scala-library'
compile ('org.springframework.kafka:spring-kafka-test') {
exclude module: 'kafka_2.11'
}
compile 'org.apache.kafka:kafka-clients:2.4.0'
compile 'org.apache.kafka:kafka-clients:2.4.0:test'
compile 'org.apache.kafka:kafka_2.12:2.4.0'
compile 'org.apache.kafka:kafka_2.12:2.4.0:test'
...
}

java.lang.NoSuchMethodError: breeze.linalg.tile$.tile_DM_Impl2

I have a spark code that use breeze. I can se the breeze version of my project:
$ gradle dependencies | grep breeze
| | +--- org.scalanlp:breeze_2.11:0.12
| | | +--- org.scalanlp:breeze-macros_2.11:0.12
+--- org.scalanlp:breeze_2.11:0.12 (*)
| | +--- org.scalanlp:breeze_2.11:0.12
| | | +--- org.scalanlp:breeze-macros_2.11:0.12
+--- org.scalanlp:breeze_2.11:0.12 (*)
| | +--- org.scalanlp:breeze_2.11:0.12
| | | +--- org.scalanlp:breeze-macros_2.11:0.12
+--- org.scalanlp:breeze_2.11:0.12 (*)
| | | +--- org.scalanlp:breeze_2.11:0.12
| | | | +--- org.scalanlp:breeze-macros_2.11:0.12
| +--- org.scalanlp:breeze_2.11:0.12 (*)
| | | +--- org.scalanlp:breeze_2.11:0.12
| | | | +--- org.scalanlp:breeze-macros_2.11:0.12
| +--- org.scalanlp:breeze_2.11:0.12 (*)
The version of breeze included in spark 2.1.1 is 0.12. I can see this looking in the spark jars directory:
spark-2.1.1-bin-hadoop2.4$ find . -name *.jar | grep breeze
./jars/breeze_2.11-0.12.jar
./jars/breeze-macros_2.11-0.12.jar
But when I submit the job to spark (even local) I get this error:
java.lang.NoSuchMethodError: breeze.linalg.tile$.tile_DM_Impl2(Lscala/reflect/ClassTag;Lbreeze/storage/Zero;Lbreeze/generic/UFunc$InPlaceImpl2;)Lbreeze/generic/UFunc$UImpl2;
at mypackage.MyClass.calcOne(MyClass.scala:51)
at mypackage.MyClass$$anonfun$1.apply(MyClass.scala:36)
at mypackage.MyClass$$anonfun$1.apply(MyClass.scala:35)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:409)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:157)
at scala.collection.AbstractIterator.foldLeft(Iterator.scala:1336)
at scala.collection.TraversableOnce$class.fold(TraversableOnce.scala:212)
at scala.collection.AbstractIterator.fold(Iterator.scala:1336)
at org.apache.spark.rdd.RDD$$anonfun$fold$1$$anonfun$20.apply(RDD.scala:1044)
The command line used:
spark-2.1.1-bin-hadoop2.4/bin/spark-submit --class my.Main myjar.jar
Found the problem:
My SPARK_HOME environment variable was setting to an old spark version.
So bin/spark-class was looking for jars dependencies in this other path

gradle dependency for RESTful jersey

Adding RESTful support to an existing web app using jersey:
compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.25.1'
has the following huge dependencies
\--- org.glassfish.jersey.containers:jersey-container-servlet:2.25.1
+--- org.glassfish.jersey.containers:jersey-container-servlet-core:2.25.1
| +--- org.glassfish.hk2.external:javax.inject:2.5.0-b32
| +--- org.glassfish.jersey.core:jersey-common:2.25.1
| | +--- javax.ws.rs:javax.ws.rs-api:2.0.1
| | +--- javax.annotation:javax.annotation-api:1.2
| | +--- org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1
| | +--- org.glassfish.hk2:hk2-api:2.5.0-b32
| | | +--- javax.inject:javax.inject:1
| | | +--- org.glassfish.hk2:hk2-utils:2.5.0-b32
| | | | \--- javax.inject:javax.inject:1
| | | \--- org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32
| | +--- org.glassfish.hk2.external:javax.inject:2.5.0-b32
| | +--- org.glassfish.hk2:hk2-locator:2.5.0-b32
| | | +--- org.glassfish.hk2.external:javax.inject:2.5.0-b32
| | | +--- org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32
| | | +--- org.glassfish.hk2:hk2-api:2.5.0-b32 (*)
| | | +--- org.glassfish.hk2:hk2-utils:2.5.0-b32 (*)
| | | \--- org.javassist:javassist:3.20.0-GA
| | \--- org.glassfish.hk2:osgi-resource-locator:1.0.1
| +--- org.glassfish.jersey.core:jersey-server:2.25.1
| | +--- org.glassfish.jersey.core:jersey-common:2.25.1 (*)
| | +--- org.glassfish.jersey.core:jersey-client:2.25.1
| | | +--- javax.ws.rs:javax.ws.rs-api:2.0.1
| | | +--- org.glassfish.jersey.core:jersey-common:2.25.1 (*)
| | | +--- org.glassfish.hk2:hk2-api:2.5.0-b32 (*)
| | | +--- org.glassfish.hk2.external:javax.inject:2.5.0-b32
| | | \--- org.glassfish.hk2:hk2-locator:2.5.0-b32 (*)
| | +--- javax.ws.rs:javax.ws.rs-api:2.0.1
| | +--- org.glassfish.jersey.media:jersey-media-jaxb:2.25.1
| | | +--- org.glassfish.jersey.core:jersey-common:2.25.1 (*)
| | | +--- org.glassfish.hk2:hk2-api:2.5.0-b32 (*)
| | | +--- org.glassfish.hk2.external:javax.inject:2.5.0-b32
| | | +--- org.glassfish.hk2:hk2-locator:2.5.0-b32 (*)
| | | \--- org.glassfish.hk2:osgi-resource-locator:1.0.1
| | +--- javax.annotation:javax.annotation-api:1.2
| | +--- org.glassfish.hk2:hk2-api:2.5.0-b32 (*)
| | +--- org.glassfish.hk2.external:javax.inject:2.5.0-b32
| | +--- org.glassfish.hk2:hk2-locator:2.5.0-b32 (*)
| | \--- javax.validation:validation-api:1.1.0.Final
| \--- javax.ws.rs:javax.ws.rs-api:2.0.1
+--- org.glassfish.jersey.core:jersey-common:2.25.1 (*)
+--- org.glassfish.jersey.core:jersey-server:2.25.1 (*)
\--- javax.ws.rs:javax.ws.rs-api:2.0.1
Too much. I expected several jars only. The web app is running within tomcat.
Do I need to include the jersey container? What is minimum dependencies for adding jersey to an existing web app?
jersey-container-servlet is the minimum for the server API if you're pulling it in with Maven. I've tried it without maven in the past and ended up having to hunt down almost all of those jars manually. Stick with maven.

Groovy version mismatch running spock test in Gradle project in Eclipse

I have a Groovy and Gradle project in Eclipse Kepler with a few classes and a single Spock spec. I can run the Gradle build from the shell, and it works fine, including the Spock spec.
I now wanted to try running the Spock spec in Eclipse, either in the debugger or not. When I run it, I see the following:
Conflicting module versions. Module [groovy-all is loaded in version 2.3.9 and
you are trying to load version 2.3.10
Here is my "dependencies" block from 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"
}
}
I can see in the Project Explorer that my Gradle dependencies has groovy-all-2.3.9.jar and my Groovy dependencies has groovy-all-2.3.10.jar.
This is a bit of a mess. Can I safely edit my Groovy dependencies of the project and change the jar to the 2.3.9 version?
Update:
Here is what "groovy dependencies" from the command line says. This is irrelevant to what Eclipse is using.
: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
When using kepler and gradle each one places its groovy module on the classpath. Lets not use kepler's one:
I suggest to use the dependency below instead of localGroovy(), in order to avoid troubles with team members. Let the dependency management work to gradle
compile "org.codehaus.groovy:groovy-all:2.3.9"
Edit 01
Check this link, in order to switch de groovy version
http://groovy.codehaus.org/Compiler+Switching+within+Groovy-Eclipse

Eclipse not updating referenced libraries for my Play framework application

Since I'm eager to use Elastic Search in my Play 2 project I have read through
http://www.elasticsearch.org/guide/reference/java-api/ and
added the dependency:
Build.scala:
import sbt._
import Keys._
import PlayProject._
object ApplicationBuild extends Build {
val appName = "test"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
"mysql" % "mysql-connector-java" % "5.1.18",
"org.elasticsearch" % "elasticsearch" % "0.19.10"
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
// Add your own project settings here
resolvers += Resolver.url("GitHub Play2-elasticsearch Repository", url("http://cleverage.github.com/play2-elasticsearch/releases/"))(Resolver.ivyStylePatterns)
)
}
The dependecy is found and downloaded, checking with play dependencies:
Here are the resolved dependencies of your application:
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| Module | Required by | Note |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| org.elasticsearch:elasticsearch:0.19.10 | test:test_2.9.1:1.0-SNAPSHOT | As elasticsearch-0.19.10.jar |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| org.apache.lucene:lucene-highlighter:3.6.1 | org.elasticsearch:elasticsearch:0.19.10 | As lucene-highlighter-3.6.1.jar |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| org.apache.lucene:lucene-memory:3.6.1 | org.elasticsearch:elasticsearch:0.19.10 | As lucene-memory-3.6.1.jar |
| | org.apache.lucene:lucene-highlighter:3.6.1 | |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| org.apache.lucene:lucene-queries:3.6.1 | org.elasticsearch:elasticsearch:0.19.10 | As lucene-queries-3.6.1.jar |
| | org.apache.lucene:lucene-highlighter:3.6.1 | |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| jakarta-regexp:jakarta-regexp:1.4 | org.apache.lucene:lucene-queries:3.6.1 | |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| org.apache.lucene:lucene-analyzers:3.6.1 | org.elasticsearch:elasticsearch:0.19.10 | As lucene-analyzers-3.6.1.jar |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| org.apache.lucene:lucene-core:3.6.1 | org.apache.lucene:lucene-analyzers:3.6.1 | As lucene-core-3.6.1.jar |
| | org.apache.lucene:lucene-queries:3.6.1 | |
| | org.elasticsearch:elasticsearch:0.19.10 | |
| | org.apache.lucene:lucene-memory:3.6.1 | |
| | org.apache.lucene:lucene-highlighter:3.6.1 | |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| mysql:mysql-connector-java:5.1.18 | test:test_2.9.1:1.0-SNAPSHOT | As mysql-connector-java-5.1.18.jar |
+-------------------------------------------------------------------+---------------------------------------------------------+------------------------------------+
| play:play_2.9.1:2.0.3 | test:test_2.9.1:1.0-SNAPSHOT | As play_2.9.1.jar |
...
But in eclipse I can't use elasticsearch since it can't find the libraries. I'm not
even able to import it.
What am I missing here?
You have to redo an eclipsify in the Play console after adding your new dependency (ie after updating your Build.scala file).
It will generate a new .classpath file for Eclipse containing your new dependency.
If there is Build.scala set up properly, and an info about required library found in newly-generated .classpath file, than try to run play eclipsify and if it works NOT, simply restart Eclipse. It worked for me.