“如何使用命令”;出版本地刊物;SBT对maven回购协议的影响?
第一个项目是SBT项目。命令“publishlocal”只将jar发布到local.ivy存储库。但是,另一个项目是maven项目。我希望SBT“发布本地”到maven存储库。所以另一个项目可以从.m2存储库中引用它们。我不知道该怎么办 下面是build.sbt:“如何使用命令”;出版本地刊物;SBT对maven回购协议的影响?,maven,sbt,scala-breeze,Maven,Sbt,Scala Breeze,第一个项目是SBT项目。命令“publishlocal”只将jar发布到local.ivy存储库。但是,另一个项目是maven项目。我希望SBT“发布本地”到maven存储库。所以另一个项目可以从.m2存储库中引用它们。我不知道该怎么办 下面是build.sbt: organization := "org.scalanlp" name := "breeze-parent" lazy val root = project.in( file(".") ) .aggregate(math, nat
organization := "org.scalanlp"
name := "breeze-parent"
lazy val root = project.in( file(".") )
.aggregate(math, natives, viz, macros).dependsOn(math, viz)
lazy val macros = project.in( file("macros"))
lazy val math = project.in( file("math")).dependsOn(macros)
lazy val natives = project.in(file("natives")).dependsOn(math)
lazy val viz = project.in( file("viz")).dependsOn(math)
lazy val benchmark = project.in(file("benchmark")).dependsOn(math, natives)
scalaVersion := Common.scalaVersion
crossScalaVersions := Common.crossScalaVersions
addCompilerPlugin("org.scalamacros" %% "paradise" % "2.0.1" cross CrossVersion.full)
publishMavenStyle := true
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
publishArtifact in Test := false
pomIncludeRepository := { _ => false }
pomExtra := (
<url>http://scalanlp.org/</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:scalanlp/breeze.git</url>
<connection>scm:git:git@github.com:scalanlp/breeze.git</connection>
</scm>
<developers>
<developer>
<id>dlwh</id>
<name>David Hall</name>
<url>http://www.dlwh.org/</url>
</developer>
</developers>)
organization:=“org.scalanlp”
名称:=“微风之父”
lazy val root=project.in(文件(“.”)
.aggregate(数学、本机、即宏)。dependsOn(数学、即宏)
lazy val macros=project.in(文件(“宏”))
lazy val math=project.in(文件(“数学”)).dependsOn(宏)
lazy val natives=project.in(文件(“natives”).dependsOn(数学)
lazy val viz=project.in(文件(“viz”).dependsOn(数学)
lazy val benchmark=project.in(文件(“benchmark”).dependsOn(数学,本地人)
scalaVersion:=普通。scalaVersion
crossScalaVersions:=常见。crossScalaVersions
addCompilerPlugin(“org.scalamacros”%%“paradise”%%“2.0.1”cross CrossVersion.full)
publishMavenStyle:=真
publishTo false}
波美克斯特拉:=(
http://scalanlp.org/
阿帕奇2
http://www.apache.org/licenses/LICENSE-2.0.html
回购
git@github.com:scalanlp/breeze.git
scm:git:git@github.com:scalanlp/breeze.git
dlwh
大卫霍尔
http://www.dlwh.org/
)
请使用publishM2
任务。其文档称“将工件发布到本地Maven存储库”
根据Ajay的回答,以下是说明
publishM2
的文档:
你能检查一下“publishM2”任务吗?它的文档说“将工件发布到本地Maven存储库”@AjayPadala Yep我想这就是答案。在某些情况下,最好用评论来回答?我仍在学习StackOverflow礼仪,但我敢肯定,在你以评论的形式提供了同样的答案之后,用同样的答案来回答是不礼貌的。我也不确定,我自己对此也很陌生。改为答案:)
sbt publishM2