Reputation: 6582
My Play/SBT project needs to depend on a third-party Java library that is distributed in source form and can be built with either Ant or Maven. Its root directory contains pom.xml
and build.xml
.
I am thinking of having this library added as a git submodule and have SBT build it as a subproject. I tried adding
externalPom(baseDirectory(_ / "pathToLibrary" / "pom.xml"))
to my build settings, but I ended up with the following compiler error:
[info] Compiling 32 Scala sources and 5 Java sources to /home/thesamet/project]
[error] (compile:compile) scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
[error] Total time: 1 s, completed Aug 23, 2013 11:46:20 AM
Upvotes: 1
Views: 514
Reputation: 7552
An external pom can only be used to obtain library dependencies of the maven project but not compile it.
You can add an sbt build configuration for the external project or easier, you can publish the third-party module to a corporate Maven or Ivy repository or just local with mvn install
and add ~/.m2 as file resolver to your SBT project.
Upvotes: 2