Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish zip created by sbt-native-packager

I am trying to publish to a repository the zip file generated by the sbt-native-packager plugin through universal:packageBin task.

I configured my project like this:

publishTo := Some("Repo" at "http://repo")

publishMavenStyle := true

packagerSettings

packageArchetype.java_application

I am struggling trying to create a new sbt task (named publishZip) using publish task and packageBin task to publish the zip file. How can I achieve this ?

like image 927
JLM Avatar asked Feb 04 '14 16:02

JLM


1 Answers

Add the following line to your sbt build (around packagerSettings should be fine)

deploymentSettings

Depending on what you want to do you may not need to define the publishZip task you could run

  • sbt universal:publish which should only publish the zip
  • redefine publish so it depends on universal:publish which would publish all the projects artifacts publish <<= publish.dependsOn(publish in config("universal"))

Then run sbt publish.

For completeness sake deploymentSettings (and packagerSettings) come from com.typesafe.sbt.SbtNativePackager which is useful to know if you use a scala build :)

like image 171
Jean Avatar answered Oct 03 '22 19:10

Jean