[英]Publishing from sbt to a local maven repo
I added the following to the build.sbt
我在build.sbt
添加了以下build.sbt
publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository")))
publishMavenStyle := true
Publishing does not seem to have been affected: the following 出版似乎没有受到影响:以下内容
sbt publishLocal
The result is apparently still going to the ivy
instead of .m2
repo: 结果显然仍然是ivy
而不是.m2
回购:
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
What is missing/incorrect to publish to maven instead? 发布到maven的缺失/错误是什么?
Use publishM2
. 使用publishM2
。 I've looked through the docs, but I can't find any reference to this command. 我查看了文档,但是找不到任何对此命令的引用。 I've discovered it simply by writing publish
in the sbt console and then hitting the tab key a couple of times. 我只是通过在sbt控制台中编写publish
然后多次点击Tab键就发现了它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.