我正在尝试通过sonatype向maven-central发布https://repo1.maven.org/maven2/de/otto/jetty-ldap_2.11/0.1.1/jetty-ldap_2.11-0.1.1.pom。
通过sbt +release
发布时,我成功上传了jar。
但文件夹结构错误:
https://repo1.maven.org/maven2/de/otto/jetty-ldap_2.10_0.13/0.1.1/
路径中有sbt版本(0.13)。
使用这种结构,我无法使用jar作为依赖。我这样使用它:
libraryDependencies ++= Seq(
"de.otto" %% "jetty-ldap" % "0.1.1")
发生错误:
试图 [警告] db.collection.insertOne()
路径显然不匹配。 有人有什么想法吗?我有点迷失在这里..
我的build.sbt缩短了:
lazy val root = (project in file(".")).
settings(
name := "jetty-ldap",
organization := "de.otto",
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://dev.otto.de/")),
sbtPlugin := true
)
scalaVersion in ThisBuild := "2.12.5"
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { _ => false }
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT")) {
Some("snapshots" at nexus + "content/repositories/snapshots")
} else {
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
}
crossSbtVersions := Vector("0.13.17", "1.1.0")
// From: https://github.com/xerial/sbt-sonatype#using-with-sbt-release-plugin
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
releaseCrossBuild := true
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
releaseStepCommandAndRemaining("^ test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("^ publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
答案 0 :(得分:1)
sbtPlugin := true
您发布了sbt插件,对不对?
Sbt插件在路径中以sbt版本发布