我有下一个配置:
lazy val mainProject = Project(
id = "project-helper",
base = file("."),
settings = Project.defaultSettings ++ Seq(
name := "my-first-project",
version := "0.1-SNAPSHOT",
scalaVersion := "2.10.2",
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
publishMavenStyle := false,
pomExtra := pomXml,
publishArtifact in Test := false,
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % "2.10.3",
"org.scalamacros" % "quasiquotes_2.10.3" % "2.0.0-M3"
),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.0.0-M3" cross CrossVersion.full)
)
)
我想把它发布成一个bintray。
我做publish
但是我收到了错误:
java.lang.RuntimeException: Repository for publishing is not specified.
at scala.sys.package$.error(package.scala:27)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1203)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1203)
at scala.Option.getOrElse(Option.scala:120)
由于
答案 0 :(得分:6)
参见自述文件:
出版
要将包发布到bintray,您需要一个bintray帐户。你可以在这里这样做。创建bintray帐户后,您可以添加
seq(bintrayPublishSettings:_*)
你可能需要这样的东西。
import bintray.Plugin._
lazy val mainProject = Project(id = "project-helper", base = file(".")).
settings(bintrayPublishSettings: _*).
settings(
name := "my-first-project",
version := "0.1-SNAPSHOT",
scalaVersion := "2.10.2",
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
publishMavenStyle := false,
pomExtra := pomXml,
publishArtifact in Test := false,
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % "2.10.3",
"org.scalamacros" % "quasiquotes_2.10.3" % "2.0.0-M3"
),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.0.0-M3" cross CrossVersion.full)
)
答案 1 :(得分:0)
相同的方式(但不同)可能只是附加到设置:
++ bintray.Plugin.bintraySettings