Vote count:
0
I have included a scala library built with sbt in a java maven project. The jar was built using sbt publishM2. I can use the scala classes within the library just fine, but the transitive dependencies of those classes are not added to the classpath by maven. For example one of those scala classes uses the joda-time, and this is specified in its build.sbt file as follows:
libraryDependencies += "joda-time" % "joda-time" % "2.0"
Yet when running a test with mvn test from the java project I get a class-not-found exception:
java.lang.NoClassDefFoundError: org/joda/time/DateTime
When looking at the pom built by sbt and placed into the ~/.m2/... subdirectory, I can find the following entry for joda-time:
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.0</version>
</dependency>
My understanding is that maven should resolve these transitive dependencies and add them to the classpath of my current project. What am I missing?
asked 1 min ago
transitive dependencies of scala project built with sbt within a different java maven project
Aucun commentaire:
Enregistrer un commentaire