我正在尝试从 Nexus maven repo 迁移到使用https://github.com/jcaddel/maven-s3-wagon。上马车?我已经阅读了一些关于 SBT 构建脚本的内容,但这似乎不是我想要的……我错过了什么吗?文档很少。
这是我的游戏!2.0 构建.scala 文件:
import sbt._
import Keys._
import PlayProject._
object ApplicationBuild extends Build {
val appName = "my-play-app"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
"org.fusesource.mqtt-client" % "mqtt-client" % "1.0")
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
resolvers ++= Seq(
"Maven Repository" at "http://repo1.maven.org/maven2/",
"fusesource.snapshots" at "http://repo.fusesource.com/nexus/content/repositories/snapshots",
"fusesource.releases" at "http://repo.fusesource.com/nexus/content/groups/public"))
}
这是我需要从 pom.xml 文件转换为 Build.scala 的内容(通过 wagon wiki):
<build>
<extensions>
<extension>
<groupId>org.kuali.maven.wagons</groupId>
<artifactId>maven-s3-wagon</artifactId>
<version>[S3 Wagon Version]</version>
</extension>
</extensions>
</build>
和
<distributionManagement>
<site>
<id>s3.site</id>
<url>s3://[AWS Bucket Name]/site</url>
</site>
<repository>
<id>s3.release</id>
<url>s3://[AWS Bucket Name]/release</url>
</repository>
<snapshotRepository>
<id>s3.snapshot</id>
<url>s3://[AWS Bucket Name]/snapshot</url>
</snapshotRepository>
</distributionManagement>
我想我了解如何将分发部分添加到 Build.scala:
import sbt._
import Keys._
import PlayProject._
object ApplicationBuild extends Build {
val appName = "my-play-app"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
"org.fusesource.mqtt-client" % "mqtt-client" % "1.0")
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
resolvers ++= Seq(
"Maven Repository" at "http://repo1.maven.org/maven2/",
"fusesource.snapshots" at "http://repo.fusesource.com/nexus/content/repositories/snapshots",
"fusesource.releases" at "http://repo.fusesource.com/nexus/content/groups/public",
"s3.site" at "s3://[AWS Bucket Name]/site",
"s3.release" at "s3://[AWS Bucket Name]/release",
"s3.snapshot" at "s3://[AWS Bucket Name]/snapshot"))
}