Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the 'package' task in my project

Tags:

scala

sbt

In apparently the 0.7 format of sbt projects a user might create a project with the following information:

From a text editor, create a project file project/build/Project.scala with the following contents:

import sbt._ 
class Project(info: ProjectInfo) extends DefaultProject(info) {
  override def artifactID = "MyProj1"
}  

However, the new format of (0.10 and 0.11 versions of sbt) might look more like:

At project/Build.scala put:

import sbt._
object MyBuild extends Build {
  lazy val root = Project("root", file("."))
}

However, when I use this new format, this type of project doesn't give you the package and deploy tasks, so how can I get those back?

like image 701
ftravers Avatar asked Feb 01 '26 20:02

ftravers


1 Answers

I think package should work, but for deploy maybe you want to try publish: https://github.com/harrah/xsbt/wiki/Publishing

There is a migration guide for switching from 0.7 to 0.11: https://github.com/harrah/xsbt/wiki/Migrating-from-SBT-0.7.x-to-0.10.x

like image 113
eivindw Avatar answered Feb 04 '26 14:02

eivindw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!