So I have a job in my CI app that publishes to Nexus when a change pushed to develop on an app.
Is there a way to make ./sbt publish idempotent? Because occasionally we want to run the job again because of a temporary issue, and it'll error out with:
[16:31:24]java.io.IOException: destination file exists and overwrite == false
[16:31:24] at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:75)
[16:31:24] at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[16:31:24] at sbt.ConvertResolver$ChecksumFriendlyURLResolver$class.put(ConvertResolver.scala:78)
[16:31:24] at sbt.ConvertResolver$PluginCapableResolver$1.put(ConvertResolver.scala:103)
[16:31:24] at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
Because we've not bumped the version number. Right now I'm going with a hacky:
./sbt publish || true
So the job doesnt exit 1 and error in CI. Is there a better way?