Create a maven project as part of the SBT build

I have an sbt project which depends on the maven project.
Is it possible to make this maven project into a submodule of the sbt project and put this maven project together as part of the SBT build?

+6
source share
2 answers

Try adding maven build.sbt to the project:

name := "mavenDep" scalaVersion in Global := "2.10.2" externalPom() 

See Sbt: Maven pom documentation (dependencies only) externalPom does not add maven repositories - just dependencies.

So, you need to manually add other repositories:

at Global ++ = Seq ("snapshots" at " http://oss.sonatype.org/content/repositories/snapshots ", "releases" at http://oss.sonatype.org/content/repositories/releases ")

+5
source

You can also try the following:

https://github.com/sbt/sbt-pom-reader

For limited sets of maven projects (i.e. those that don't use plugins), it can slightly improve information from maven to sbt. However, displaying maven plugins in sbt is almost an unfortunate task.

+3
source

Source: https://habr.com/ru/post/957004/


All Articles