sbt/util
Mark Harrah 0cd8849ec1 Work around various issues with Maven local repositories. Fixes #321.
* when mvn does a local 'install', it doesn't update the pom.xml last modified time if the pom.xml content hasn't changed
* an ivy.xml includes publicationDate, so an ivy.xml will always be touched even if the other content hasn't changed
* when Ivy checks if a snapshot is uptodate
  + it sees a SNAPSHOT, so it knows the module metadata and artifacts might change
  + it then checks the lastModified time of the metadata
  + if unchanged, it uses the cached information
  + if useOrigin is effectively false (either it is explicitly false or a resource is remote/isLocal=false),
    this means that a new artifact won't be retrieved
* the Ivy IBiblioResolver
  + must be used for Maven repositories for proper behavior (no FileResolver, for example)
  + only returns URLResources, even for file: URLs
  + a FileResource is needed in combination with useOrigin to avoid copying artifacts from .m2/repository/

This commit fixes the above by setting a custom URLRepository on a constructed IBiblioResolver.
This URLRepository returns FileResources for file: URLs and standard URLResources for others.
The returned FileResource has isLocal=true and sbt sets useOrigin=true by default, so the artifacts
are used from the origin.

If it turns out a similar situation happens when mvn publishes to remote repositories, it is likely the fix for
that would be to figure out how to disable the lastModified check on the metadata and always download the metadata.
This would be slower, however.
2013-10-10 21:36:11 -04:00
..
appmacro/src/main/scala/sbt/appmacro specify explicit type to work around 2.11 volatile override error 2013-07-18 22:38:16 -04:00
classfile Minimal support for class file formats 51.0, 52.0 in incremental compiler. Fixes #842. 2013-09-26 08:14:40 -04:00
classpath More API docs for the classpath module 2013-08-16 14:22:14 -04:00
collection String upper/lower case no longer locale dependent 2013-09-24 08:14:15 -04:00
complete API docs for Parser(s). 2013-08-16 14:22:14 -04:00
control Silence boring Eclipse warnings: catching all exceptions 2013-01-22 09:05:15 -05:00
cross/src/main/input_sources -Xlint 2013-02-04 17:30:31 -05:00
datatype drop unused mutable data type generator 2013-10-08 13:38:33 -04:00
io Work around various issues with Maven local repositories. Fixes #321. 2013-10-10 21:36:11 -04:00
log TrapExit support for multiple, concurrent managed applications. Fixes #831. 2013-10-02 09:13:45 -04:00
process The Process methods that are redirection-like should not discard the exit code of the input. 2013-09-19 12:38:16 -04:00
relation/src Cleaned up API docs for Relation. 2013-08-16 14:22:14 -04:00