我在build.sbt中添加了以下内容

publishTo := Some(Resolver.file("file",  new File(Path.userHome.absolutePath+"/.m2/repository")))

publishMavenStyle := true

发布似乎没有受到影响:
 sbt publishLocal

结果显然仍然是ivy而不是.m2 repo :
Packaging /git/msSCSCTEL/streaming-reconciler/target/scala-2.10/streaming-reconciler_2.10-0.1.0-SNAPSHOT-javadoc.jar ...
Done packaging.
    published streaming-reconciler_2.10 to /Users/myuser/.ivy2/local/com.mycomp/streaming-reconciler_2.10/0.1.0-SNAPSHOT/poms/streaming-reconciler_2.10.pom
    published streaming-reconciler_2.10 to /Users/myuser/.ivy2/local/com.mycomp/streaming-reconciler_2.10/0.1.0-SNAPSHOT/jars/streaming-reconciler_2.10.jar
    published streaming-reconciler_2.10 to /Users/myuser/.ivy2/local/com.mycomp/streaming-reconciler_2.10/0.1.0-SNAPSHOT/srcs/streaming-reconciler_2.10-sources.jar
    published streaming-reconciler_2.10 to /Users/myuser/.ivy2/local/com.mycomp/streaming-reconciler_2.10/0.1.0-SNAPSHOT/docs/streaming-reconciler_2.10-javadoc.jar
    published ivy to /Users/myuser/.ivy2/local/com.mycomp/streaming-reconciler_2.10/0.1.0-SNAPSHOT/ivys/ivy.xml

什么是缺少/不正确的发布到Maven?

最佳答案

使用publishM2。我已经浏览了文档,但是找不到对该命令的任何引用。通过在sbt控制台中编写publish,然后按几次tab键,我已经发现了它。

09-25 22:20