bitcoin-s
bitcoin-s copied to clipboard
sbt publishLocal does not work
When running sbt publishLocal
we get artifacts that look like bitcoin-s-core_2.13.jar
. You can see what they looked like publish on sonatype for our CI builds, which also includes the scala version + application version suffix to look like
bitcoin-s-core_2.13-0.0.0+50-0bd60fd6-SNAPSHOT-javadoc.jar
https://oss.sonatype.org/content/repositories/snapshots/org/bitcoin-s/bitcoin-s-core_2.13/0.0.0+50-0bd60fd6-SNAPSHOT/
This isn't right and it fails to resolve on other projects trying to use those local deps
error] stack trace is suppressed; run last dlcWebApp / update for the full output [error] stack trace is suppressed; run last exchange / update for the full output [error] (dlcWebApp / update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts: [error] file://///home/suredbits/.ivy2//local/org.bitcoin-s/bitcoin-s-eclair-rpc_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-eclair-rpc.jar: not found: /home/suredbits/.ivy2/local/org.bitcoin-s/bitcoin-s-eclair-rpc_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-eclair-rpc.jar [error] file://///home/suredbits/.ivy2//local/org.bitcoin-s/bitcoin-s-core_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-core.jar: not found: /home/suredbits/.ivy2/local/org.bitcoin-s/bitcoin-s-core_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-core.jar [error] (exchange / update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts: [error] file://///home/suredbits/.ivy2//local/org.bitcoin-s/bitcoin-s-eclair-rpc_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-eclair-rpc.jar: not found: /home/suredbits/.ivy2/local/org.bitcoin-s/bitcoin-s-eclair-rpc_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-eclair-rpc.jar [error] file://///home/suredbits/.ivy2//local/org.bitcoin-s/bitcoin-s-core_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-core.jar: not found: /home/suredbits/.ivy2/local/org.bitcoin-s/bitcoin-s-core_2.13/0.4.0+35-e4a9c7b2+20200930-1253-ADAPTOR-ECDSA-DLC-SNAPSHOT/jars/bitcoin-s-core.jar [error] Total time: 1 s, completed Sep 30, 2020, 1:10:27 PM
Workaround
Ben suggests renaming the jar file to not have the scala veersion suffix so it looks like
bitcoin-s-core.jar
This seems to work, but obviously is not ideal. I have no idea why our remote publishing works, but local publishing doesn't.
So here is a stackoverflow issue: https://stackoverflow.com/questions/60164254/sbt-1-3-8-publishlocal-creates-a-jar-that-sbt-update-cant-resolve-scala-versio
The key thing here is removing withSources()
and withJavadoc()
in the dependency in Deps.scala
This is not fixed in the 1.4.x series of sbt #2119