我正在使用 sbt-native-packager 为我的 Scala Play 2 项目创建 Debian 包并将其发布到 Artifactory 存储库。
到目前为止,我能够生成.deb
包,但无法将其发布到工件 URL。唯一发布的工件是 debian.changes
文件,而不是实际.deb
文件。
我最近升级到使用 sbt 0.13.5 和 sbt-native-packager 0.7.4 的 Play 2.3.2。这可能是相关的,因为将 .deb 文件发布到工件确实曾经与 sbt-native-packager 0.7.1 一起使用。
我已经努力理解这个问题,并且确实发现我必须将最新版本添加debianChangelog in Debian := Some(file("src/debian/changelog"))
到我的.sbt
文件中,但我现在被卡住了。
我的问题只是.deb
当我这样做时没有文件被发布debian:publish
。只有.changes
文件被发布:
[info] published atk to http:...:8081/artifactory/atk-snapshots/atk/atk/1.0-SNAPSHOT/atk-1.0-SNAPSHOT.changes
有人知道我应该做什么来解决我的发布问题吗?
我在项目的 .sbt 文件中将以下设置作为导入和版本:
import com.typesafe.sbt.SbtNativePackager._
import com.typesafe.sbt.SbtNativePackager.NativePackagerKeys._
import com.typesafe.sbt.packager.archetypes.ServerLoader.SystemV
import NativePackagerKeys._
name := """atk"""
scalacOptions += "-target:jvm-1.7"
javacOptions ++= Seq("-source", "1.7", "-target", "1.7")
version := "1.1-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.1"
对于包装部分:
// Packaging info
debianChangelog in Debian := Some(file("src/debian/changelog"))
serverLoading in Debian := SystemV
packageDescription in Debian := "Parlis Elvis Adapter"
packageSummary in Debian := "Parlis Elvis Adapter"
maintainer in Debian := "Daan Hoogenboezem"
daemonUser in Linux := "ape"
daemonGroup in Linux := "ape"
sourceDirectory in Debian <<= (sourceDirectory) apply (_ / "debian")
mappings in Universal <+= (packageBin in Compile, sourceDirectory ) map { (_, src) =>
// we are using the reference.conf as default application.conf
// the user can override settings here
val conf = src / "linux" / "atk" / "startup.conf"
conf -> "etc/atk/startup.conf"
}
linuxPackageMappings in Debian <+= (name in Universal, sourceDirectory in Debian) map { (name, dir) =>
(packageMapping(
(dir / "etc/changelog") -> "/usr/share/doc/atk/changelog.gz"
) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs()
}
defaultLinuxLogsLocation in Linux := "/var/log/atk"
deploymentSettings
// Publishing
publishTo := {
val artifactory = "http://...:8081/artifactory/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at artifactory + "atk-snapshots")
else
Some("releases" at artifactory + "atk-releases")
}
publish in Debian <<= (publish in Debian).triggeredBy(publish in Compile)