I added the following to the 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:
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?
The publish action is used to publish your project to a remote repository. To use publishing, you need to specify the repository to publish to and the credentials to use. Once these are set up, you can run publish .
Typically, if a key has no associated value in a more-specific scope, sbt will try to get a value from a more general scope, such as the ThisBuild scope. This feature allows you to set a value once in a more general scope, allowing multiple more-specific scopes to inherit the value.
Use 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With