2016-07-15 5 views
0

Ich habe folgende in meiner build.sbt Datei Java-basierte .deb Paket Gebäude zu nutzen und zu einem Artifactory Repository veröffentlichen:Wie löst man changelog error zum Aufbau von deb mit sbt-native-packager?

enablePlugins(JavaAppPackaging, DebianPlugin, JDebPackaging, DebianDeployPlugin) 

aber wenn ich versuche, debian:publish zu tun, erhalte ich die Fehlermeldung:

Creating changes file: /foo/bar/target/bar_1.0.0-SNAPSHOT_all.changes 
java.lang.RuntimeException: Cannot generate .changes file without a changelog 
    at scala.sys.package$.error(package.scala:27) 
    at com.typesafe.sbt.packager.debian.DebianNativePackaging$$anonfun$debianNativeSettings$1.apply(NativePackaging.scala:49) 
    at com.typesafe.sbt.packager.debian.DebianNativePackaging$$anonfun$debianNativeSettings$1.apply(NativePackaging.scala:47) 
    at scala.Function6$$anonfun$tupled$1.apply(Function6.scala:35) 
    at scala.Function6$$anonfun$tupled$1.apply(Function6.scala:34) 
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) 
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40) 
    at sbt.std.Transform$$anon$4.work(System.scala:63) 
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228) 
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228) 
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17) 
    at sbt.Execute.work(Execute.scala:237) 
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228) 
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228) 
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159) 
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
[error] (debian:genChanges) Cannot generate .changes file without a changelog 
[error] Total time: 1 s, completed 15-Jul-2016 09:47:53 

ich versuchte

changelog in Debian := "" 

meiner build.sbt hinzufügen, wie zu tun in the sbt native packager documentation dokumentiert (na ja, die Dokumentation gab nicht an, um welchen Typ es sich handelte, aber ich dachte, sbt würde mir sagen, ob ich den falschen Typ hätte, also wäre das in Ordnung). Aber dann erhielt ich:

/foo/bar/build.sbt:31: error: not found: value changelog 
changelog in Debian := "" 
^ 
[error] Type error in expression 
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

ich für ein Beispiel gesucht, welche die Changelog-Einstellung, aber ich konnte nicht finden.

Antwort

1

DebianDeployPlugin scheint nicht mit JDebPackaging zu arbeiten, und ich bin nicht genug von einem sbt Guru, um herauszufinden, warum.

Aber nur die .deb-Datei zu erstellen, ist es genug, um hinzuzufügen:

debianChangelog in Debian := Some(file("debian/changelog")) 

und eine Datei debian/changelog enthält

project-name (x.y.z) UNRELEASED; urgency=low 

    * Initial no-op application. 

-- Your Name <[email protected]> Fri, 15 Jul 2016 12:18:00 +0100 
-1

Versuchen Sie changelog in Debian := None.

1

ignorieren Changelog Einstellungen erstellen. Bitte fügen Sie folgende Zeilen

import com.typesafe.sbt.packager.SettingsHelper._ 
makeDeploymentSettings(Debian, packageBin in Debian, "deb") 

folgende Zeile sagt dpkg-deb build.sbt läuft nur deb building phase, ohne changelog generation phase