我尝试使用universal:publish
命令发布SBT插件(版本2.10)
我目前收到此错误:
Running with tar -pcvf /tmp/sbt_4d2c5ced/my-plugin-0.1.0.tar my-plugin-0.1.0
java.io.IOException: Cannot run program "tar" (in directory "/tmp/sbt_4d2c5ced/my-plugin-0.1.0"): error=2, No such file or directory
我还有其他SBT项目,但是它们不是SBT插件,所以不确定这是否有所作为。
以下是我的SBT插件中的Build.scala
:
val pluginName = "my-plugin"
val organisationId = "org.me"
val pluginVersion = envOrElse(s"""${pluginName.toUpperCase.replace("-", "_")}_VERSION""", "999-SNAPSHOT")
lazy val plugin = Project(pluginName, file("."))
.enablePlugins(UniversalPlugin, UniversalDeployPlugin)
.settings(sbtPlugin := true)
.settings(version := pluginVersion)
.settings(organization := organisationId)
.settings(scalacOptions := Seq("-deprecation"))
.settings(crossVersion := CrossVersion.binary)
.settings(crossPaths := false)
.settings(libraryDependencies ++= Seq())
.settings(UniversalPlugin.projectSettings)
.settings(UniversalDeployPlugin.projectSettings)
.settings(PublishingSettings.publishingSettings)
关于如何使这项工作的任何建议都会很棒,这会阻止我发布工件。提前致谢