作为SBT构建的一部分构建Maven项目 [英] Build maven project as a part of SBT build
问题描述
我有一个依赖于Maven项目的sbt项目.
是否有可能使该Maven项目成为sbt项目的子模块,并将其作为SBT构建的一部分一起构建?
I have a sbt project that depends on a maven project.
Is it possible to make that maven project into a sub-module of sbt project, and build that maven project together as a part of SBT build?
推荐答案
尝试将其添加到您的Maven项目build.sbt中:
Try to add to your maven project build.sbt:
name := "mavenDep"
scalaVersion in Global := "2.10.2"
externalPom()
请参见 Sbt文档:Maven pom(仅依赖项) externalPom不会添加maven存储库-只是依赖项.
See Sbt documentation: Maven pom (dependencies only) externalPom does not add maven repositories - just dependencies.
因此,您必须手动添加其他存储库:
So you have to add manually other repositories:
解析器= Seq( 快照"位于" http://oss.sonatype.org/content/repositories/snapshots", 发布"位于" http://oss.sonatype.org/content/repositories/releases)
resolvers in Global ++= Seq( "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots", "releases" at "http://oss.sonatype.org/content/repositories/releases")
这篇关于作为SBT构建的一部分构建Maven项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!