Fixes #1514. Enable latest SNAPSHOT option by default

to check all resolvers to find the latest snapshot artifacts.
This behavior did not work well with Maven repositories where sbt was
failing to calculate the correct publication dates.
Now that #2075 fixes the Maven integration issue we should enable this
flag back again.

The build user can opt out by:

    updateOptions := updateOptions.value.withLatestSnapshots(false)
This commit is contained in:
Eugene Yokota 2015-12-14 16:59:55 -05:00
parent e79f1b3a15
commit 0fca1a9ff4
2 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1,12 @@
[@eed3si9n]: https://github.com/eed3si9n
[1514]: https://github.com/sbt/sbt/issues/1514
### Fixes with compatibility implications
### Improvements
### Bug fixes
- Turns update option's `withLatestSnapshots` flag `true` by default.
[#1514][1514] by [@eed3si9n][@eed3si9n]

View File

@ -25,8 +25,8 @@ lazy val common = project.
case _ => false // TODO - Handle chain repository?
}
case _ => true
}),
updateOptions := updateOptions.value.withLatestSnapshots(true)
})
// updateOptions := updateOptions.value.withLatestSnapshots(true)
)
lazy val dependent = project.
@ -37,9 +37,9 @@ lazy val dependent = project.
// Ignore the inter-project resolver, so we force to look remotely.
resolvers += sharedResolver,
fullResolvers := fullResolvers.value.filterNot(_==projectResolver.value),
libraryDependencies += "com.badexample" % "badexample" % "1.0-SNAPSHOT",
libraryDependencies += "com.badexample" % "badexample" % "1.0-SNAPSHOT"
// Setting this to false fails the test
updateOptions := updateOptions.value.withLatestSnapshots(true)
// updateOptions := updateOptions.value.withLatestSnapshots(true)
)
TaskKey[Unit]("dumpResolvers") := {