SNAPSHOT dependency not updating

450 views
Skip to first unread message

James Douglas

unread,
Dec 5, 2011, 6:04:12 PM12/5/11
to simple-build-tool
I have a project named "bar" with an external Ivy file, which includes
a dependency named "foo" of version "1.0-SNAPSHOT".

If I update "foo" and publish it to my repository, rebuilding "bar"
does not cause the latest "foo" to be retrieved.

After scouring the wiki and looking through the xsbt source, I can't
figure out why the latest version of "foo" is not being retrieved. It
appears that ".*-SNAPSHOT" is set as the changing pattern, so what
could be going wrong? Could this have anything to do with my project
using an external ivy.xml?

James Douglas

unread,
Dec 5, 2011, 7:48:57 PM12/5/11
to simple-build-tool
I read through this thread:

http://groups.google.com/group/simple-build-tool/browse_thread/thread/7464cbe97565463b

...and I made sure to set changing="true" on my "foo" dependency.
Still no luck getting sbt to check the repo for a newer version during
build.

James Douglas

unread,
Dec 5, 2011, 8:24:09 PM12/5/11
to simple-build-tool
I don't think the external ivy.xml is the culprit -- I made a test
project with only a build.sbt, adding:

libraryDependencies += "mycompany" % "foo" % "1.0-SNAPSHOT"

When I update "foo" in my repo, it is not re-retrieved when compiling
or updating the test project.

On Dec 5, 4:48 pm, James Douglas <jamesdoug...@gmail.com> wrote:
> I read through this thread:
>

> http://groups.google.com/group/simple-build-tool/browse_thread/thread...

James Douglas

unread,
Dec 5, 2011, 9:37:18 PM12/5/11
to simple-build-tool
If I perform a `clean`, then upon next compile my snapshot dependency
*is* updated as expected. Is this the workflow I should follow?

Evan Chan

unread,
Dec 6, 2011, 12:19:05 AM12/6/11
to simple-build-tool
I've found a similar behavior with sub-projects reference by uri
(in Build.scala, using dependsOn( uri( "http://github.com/userA/
projectB..." )) )

sbt will never update the subproject code in the cache if the github
project is updated, unless I do
"rm -rf ~/.sbt/staging".

-Evan

Sciss

unread,
Dec 6, 2011, 5:15:38 AM12/6/11
to simple-b...@googlegroups.com
i have the exactly the same problem. i'm just pushing around a project locally (publish-local), and the project in which i use the dependency needs needs a 'clean' all the time, 'update' doesn't do anything. it's quite annoying as it means, i change one line in the project, i need to rebuild the other project completely which takes like a minute.

http://groups.google.com/group/simple-build-tool/browse_thread/thread/5b59604bb08114b3#

best, -sciss-

> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To post to this group, send email to simple-b...@googlegroups.com.
> To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
>

dave

unread,
Dec 9, 2011, 10:13:39 AM12/9/11
to simple-b...@googlegroups.com
On Monday, December 5, 2011 8:37:18 PM UTC-6, James Douglas wrote:
If I perform a `clean`, then upon next compile my snapshot dependency
*is* updated as expected.  Is this the workflow I should follow?
 
I've also had a problem with snapshots not updating as expected.  It's good to know that they'll update after a clean!

It would be nice if snapshot updates were more predictable.  Updating snapshots only after a clean violates the Principle of Least Surprise, IMO.

dave
<><

Robin Green

unread,
Mar 22, 2012, 3:07:45 PM3/22/12
to simple-b...@googlegroups.com
On Friday, 9 December 2011 15:13:39 UTC, dave wrote:
I've also had a problem with snapshots not updating as expected.  It's good to know that they'll update after a clean!

It would be nice if snapshot updates were more predictable.  Updating snapshots only after a clean violates the Principle of Least Surprise, IMO.

Odd. I've started to experience this, but I'm pretty sure I didn't used to. The thing that changed was I started using an external ivySettings file...

Reply all
Reply to author
Forward
0 new messages