मैं एक एसबीटी प्लगइन को एक भंडार में प्रकाशित करने की कोशिश कर रहा हूं। मुझे यकीन है कि नहीं करता है, तो यह किसी भी प्रासंगिकता है, लेकिन हमारे प्लगइन लोड करता है sbt-twirl
प्लगइन हूँ - चारों ओर Googling, यह publishConfiguration की तरह लगता है ओवरराइड किया जा सकता है:प्रकाशन प्लगइन प्रोजेक्ट क्यों प्रकाशित करता है RuntimeException: प्रकाशन के लिए रिपोजिटरी निर्दिष्ट नहीं है?
new PublishConfiguration(None, "dotM2", arts, Seq(), level)
जब मैं प्रकाशित कार्य चलाने के लिए, कलाकृतियों रेपो के लिए तैनात किया गया है , लेकिन एसबीटी कार्य तो विफल रहता है:
sbt (my-sbt-plugin)> publish
[info] Loading global plugins from ...
...
[info] Done packaging.
[info] published sbt-my-sbt-plugin to http://my.repo.com/.../sbt-my-sbt-plugin-0.1-SNAPSHOT.jar
java.lang.RuntimeException: Repository for publishing is not specified.
.... stack trace here ....
[error] (my-sbt-plugin/*:publishConfiguration) Repository for publishing is not specified.
क्या त्रुटि पैदा हुआ है, और मैं नाकाम रहने से प्रकाशन को रोकने के लिए क्या कर सकता है?
** अद्यतन ** यहाँ inspect publish
sbt (my-sbt-plugin)> inspect publish
[info] Task: Unit
[info] Description:
[info] Publishes artifacts to a repository.
[info] Provided by:
[info] {file:/path/to/my-sbt-plugin/}my-sbt-plugin/*:publish
[info] Defined at:
[info] (sbt.Classpaths) Defaults.scala:988
[info] Dependencies:
[info] my-sbt-plugin/*:ivyModule
[info] my-sbt-plugin/*:publishConfiguration
[info] my-sbt-plugin/*:publish::streams
[info] Delegates:
[info] my-sbt-plugin/*:publish
[info] {.}/*:publish
[info] */*:publish
[info] Related:
[info] plugin/*:publish
है यहाँ कैसे मैं प्रकाशन (प्लगइन सेटिंग्स में से कुछ को छोड़कर libraryDependencies और 1 या 2 के साथ अन्य सेटिंग्स) कॉन्फ़िगर किया है
lazy val plugin = project
.settings(publishSbtPlugin: _*)
.settings(
name := "my-sbt-plugin",
sbtPlugin := true,
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.0.2")
)
def publishSbtPlugin = Seq(
publishMavenStyle := true,
publishTo := {
val myrepo = "http://myrepo.tld/"
if (isSnapshot.value) Some("The Realm" at myrepo + "snapshots")
else Some("The Realm" at myrepo + "releases")
},
credentials += Credentials(Path.userHome/".ivy2"/".credentials")
)