Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot publish snapshots using universal:publish #292

Closed
matthughes opened this issue Jul 11, 2014 · 6 comments
Closed

Cannot publish snapshots using universal:publish #292

matthughes opened this issue Jul 11, 2014 · 6 comments
Labels
bug universal Zip, tar.gz, tgz and bash issues

Comments

@matthughes
Copy link
Contributor

Using SBT 0.13.5. Am able to publish regular artifacts on my Bamboo/Nexus system, but can't publish projects using 'universal' plugin.

These are snapshot builds and I took the same code he used to forcefully set isSnapshot, yet still getting the same error.

I double-checked 'isSnapshot' is set in consoleProject:
scala> (isSnapshot).eval
res0: Boolean = true

Here is the stack:

build   11-Jul-2014 12:10:09    java.io.IOException: destination file exists and overwrite == false
build   11-Jul-2014 12:10:09        at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:75)
build   11-Jul-2014 12:10:09        at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
build   11-Jul-2014 12:10:09        at sbt.ConvertResolver$ChecksumFriendlyURLResolver$class.put(ConvertResolver.scala:80)
build   11-Jul-2014 12:10:09        at sbt.ConvertResolver$PluginCapableResolver$1.put(ConvertResolver.scala:106)
build   11-Jul-2014 12:10:09        at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$$anonfun$publish$3.apply(IvyActions.scala:263)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$$anonfun$publish$3.apply(IvyActions.scala:262)
build   11-Jul-2014 12:10:09        at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
build   11-Jul-2014 12:10:09        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
build   11-Jul-2014 12:10:09        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
build   11-Jul-2014 12:10:09        at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$.publish(IvyActions.scala:262)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply$mcV$sp(IvyActions.scala:97)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply(IvyActions.scala:97)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply(IvyActions.scala:97)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$.withChecksums(IvyActions.scala:106)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$.sbt$IvyActions$$withChecksums(IvyActions.scala:101)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$$anonfun$publish$1.apply(IvyActions.scala:97)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$$anonfun$publish$1.apply(IvyActions.scala:91)
build   11-Jul-2014 12:10:09        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
build   11-Jul-2014 12:10:09        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
build   11-Jul-2014 12:10:09        at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
build   11-Jul-2014 12:10:09        at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
build   11-Jul-2014 12:10:09        at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
build   11-Jul-2014 12:10:09        at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
build   11-Jul-2014 12:10:09        at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
build   11-Jul-2014 12:10:09        at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
build   11-Jul-2014 12:10:09        at xsbt.boot.Using$.withResource(Using.scala:11)
build   11-Jul-2014 12:10:09        at xsbt.boot.Using$.apply(Using.scala:10)
build   11-Jul-2014 12:10:09        at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
build   11-Jul-2014 12:10:09        at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
build   11-Jul-2014 12:10:09        at xsbt.boot.Locks$.apply0(Locks.scala:31)
build   11-Jul-2014 12:10:09        at xsbt.boot.Locks$.apply(Locks.scala:28)
build   11-Jul-2014 12:10:09        at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
build   11-Jul-2014 12:10:09        at sbt.IvySbt.withIvy(Ivy.scala:98)
build   11-Jul-2014 12:10:09        at sbt.IvySbt.withIvy(Ivy.scala:94)
build   11-Jul-2014 12:10:09        at sbt.IvySbt$Module.withModule(Ivy.scala:115)
build   11-Jul-2014 12:10:09        at sbt.IvyActions$.publish(IvyActions.scala:91)
build   11-Jul-2014 12:10:09        at sbt.Classpaths$$anonfun$publishTask$1.apply(Defaults.scala:1173)
build   11-Jul-2014 12:10:09        at sbt.Classpaths$$anonfun$publishTask$1.apply(Defaults.scala:1172)
build   11-Jul-2014 12:10:09        at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
build   11-Jul-2014 12:10:09        at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
build   11-Jul-2014 12:10:09        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
build   11-Jul-2014 12:10:09        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
build   11-Jul-2014 12:10:09        at sbt.std.Transform$$anon$4.work(System.scala:64)
build   11-Jul-2014 12:10:09        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
build   11-Jul-2014 12:10:09        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
build   11-Jul-2014 12:10:09        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
build   11-Jul-2014 12:10:09        at sbt.Execute.work(Execute.scala:244)
build   11-Jul-2014 12:10:09        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
build   11-Jul-2014 12:10:09        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
build   11-Jul-2014 12:10:09        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
build   11-Jul-2014 12:10:09        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
build   11-Jul-2014 12:10:09        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
build   11-Jul-2014 12:10:09        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
build   11-Jul-2014 12:10:09        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
build   11-Jul-2014 12:10:09        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
build   11-Jul-2014 12:10:09        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
build   11-Jul-2014 12:10:09        at java.lang.Thread.run(Thread.java:744)
build   11-Jul-2014 12:10:09    [error] (dta-application-gateway/universal:publish) java.io.IOException: destination file exists and overwrite == false
@muuki88
Copy link
Contributor

muuki88 commented Jul 11, 2014

This looks more like a nexus/bamboo file naming issue. The exception states, that the file
already exists, but it's not allowed to overwrite it.

java.io.IOException: destination file exists and overwrite == false`

Can you post a minimal build.sbt reproducing this issue? And the version
of your nexus running?

@matthughes
Copy link
Contributor Author

Nexus version is 2.8.1-01.

I will have to get back to you at minimizing the issue.

@jsuereth
Copy link
Member

@muuki88 We're failing to appropriately set the "overwrite" flag if isSnapshot setting is true in our publish settings. I can probably issue a fix shortly.

@muuki88
Copy link
Contributor

muuki88 commented Jul 15, 2014

Nice, we already have some small fixes for a next release.

@jsuereth
Copy link
Member

K, I have the fix posted, but an issue: I know the settings/method doesn't exist in sbt 0.13.0 and previous, so this is a 0.13.1+ change....

Are we ok with that, or is master still the 0.7.x series?

@muuki88
Copy link
Contributor

muuki88 commented Jul 15, 2014

We should move on. I already created the v0.7.x branch, which we should no start to use to
release 0.7.x releases. So we drop scala 2.9.2 and sbt 0.12.x in master, right?
I also created a label v0.7.x, which marks pr/issues which changes are compatible with this branch.

muuki88 added a commit that referenced this issue Jul 18, 2014
Fixes #292 - Not feeding new isSnapshot value to ivy configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug universal Zip, tar.gz, tgz and bash issues
Projects
None yet
Development

No branches or pull requests

3 participants