How do I get the 'package' task in my project
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开发者_JAVA百科) 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?
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
精彩评论