Commit Graph

121 Commits

Author SHA1 Message Date
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
eugene yokota 57ca26fe77 Merge pull request #1401 from xuwei-k/watch
Triggered Execution should be aware of rename or move file
2014-06-27 12:05:59 -04:00
Vasya Novikov 33ee4a30c8 minor change: code style 2014-06-24 02:24:51 +04:00
Vasya Novikov 66c9314d20 make it possible to reference a branch of a local git repository
Reasoning on why this change is wanted can be found
on the "sbt-dev" mailing list,
topic "problem with referencing a local git repository"
2014-06-15 02:14:27 +04:00
xuwei-k dd628d2441 Triggered Execution should be aware of rename or move file 2014-06-09 00:49:45 +09:00
Josh Suereth abffc3e1bd Bump expected 2.11 module versions so we can compile with 2.11
Add scala 2.11 test/build verification.

* Add 2.11 build configuratoin to travis ci
* Create command which runs `safe` unit tests
* Create command to test the scala 2.11 build
* Update scalacheck to 1.11.4
* Update specs2 to 2.3.11
* Fix various 2.11/deprecation removals
  and other changes.

Fix eval test failure in scala 2.11 with XML not existing.
2014-05-14 19:08:05 -04:00
Josh Suereth 244abd3b6f Scalariforming test code 2014-05-07 11:52:23 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Jacek Laskowski 5c268bd9ea Follow deprecation - @deprecated says to use pair and so it's used in the body 2014-04-07 22:31:40 +02:00
Jacek Laskowski f77c4927bc deprecated says to use pair and so it's used in the body 2014-01-04 17:19:41 +01:00
Mark Harrah ca4b22e272 Generate an error when making a path string from paths containing the separator. Fixes #1038.
This is an attempt to provide a decent error message in some cases.  However, paths that include
the Java path separator character are just fundamentally problematic and aren't always going to
be cleanly detected.
2013-12-18 11:53:46 -05:00
Mark Harrah 715a5655ef Deprecate some methods replaced by PathFinder.pair 2013-10-17 15:00:48 -04:00
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
Mark Harrah 2ac8b045ad Extra access methods for IPC 2013-09-18 10:27:19 -04:00
Mark Harrah 9d1d18cd71 remove duplicate relativize implementation from Path 2013-08-16 14:22:14 -04:00
Mark Harrah 0c95e44ad5 API docs for DeferredWriter and RichURI 2013-08-16 14:22:13 -04:00
Mark Harrah 8b3fd453b8 more API docs for Hash.scala 2013-08-16 14:22:13 -04:00
Mark Harrah faa308fe9a more API docs for IO.scala 2013-08-16 14:22:13 -04:00
Mark Harrah 245e3cee7c API docs for File/NameFilters 2013-08-16 14:21:45 -04:00
Mark Harrah 81babda6f6 work around URI problems with encoding and resolving. Fixes #725 2013-04-12 12:47:44 -04:00
Mark Harrah f6d73128fc deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah ce439efab3 Convert references to harrah/xsbt to sbt/sbt 2013-01-04 17:22:40 -05:00
Grzegorz Kossakowski ef39aeb9c1 Follow source layout convention supported by Eclipse.
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Josh Suereth 0c08c1169e Bumped the Scalatest/Specs versions for 2.10.0-RC3
* Modified tests to use mutable Specs API
* Fixed a few minor specs issues.
2012-12-04 13:10:09 -05:00
Mark Harrah 1bc26fa488 When preserving last modified, convert negative values to 0
File.lastModified can return a negative number, but File.setLastModified doesn't accept
negative numbers.  See Java bug #6791812.
2012-11-16 09:56:01 -05:00
Eugene Vigdorchik 761a441805 Filter out null parent files when deleting empty directories. Closes #589. 2012-11-12 14:45:01 -05:00
Mark Harrah b451761478 fix broken commit 2012-11-05 10:09:39 -05:00
Mark Harrah b6ff789d44 Work around File constructor not accepting URIs for UNC paths. Fixes #564. 2012-11-05 10:02:33 -05:00
Mark Harrah 29dd76da85 defer opening logging output files until an actual write 2012-08-27 10:49:13 -04:00
Mark Harrah b6b78618f5 in IO.copyFile, limit maximum size transferred via NIO. fixes #491 2012-07-06 10:28:51 -04:00
Mark Harrah d8f5c39465 remove most occurrences of ScalaObject 2012-07-01 15:16:41 -04:00
Eugene Vigdorchik e6f858f292 Test RichURI. 2012-06-15 07:54:14 -04:00
Eugene Vigdorchik 945fdd5baa Use raw methods on URI where a single string representation is constructed. URI(String) assumes no special characters. 2012-06-15 07:54:14 -04:00
Eugene Vigdorchik 47c9645892 Use raw method not to unescape special characters. Fixes #478 2012-06-12 07:15:17 -04:00
Mark Harrah 4e6cbd7304 delete symlink and not its contents when recursively deleting a directory 2012-05-11 21:24:05 -04:00
Mark Harrah 9f80180859 buffer url input stream returned by Using. fixes #437 2012-04-30 20:50:28 -04:00
Mark Harrah 7109bc9637 configuration via ivysettings.xml: use URI instead of URL and make 'inter-project' resolver available for multi-project builds. ref #416 2012-04-11 22:40:45 -04:00
Michael Allman ba2e42287b Add support for loading Ivy settings from a URL 2012-04-08 20:22:15 -07:00
Mark Harrah f94eae15b6 merge test forking from vigdorchik/xsbt/wip_fork_test 2012-04-06 20:48:31 -04:00
Eugene Vigdorchik 7afc9e77c6 \'fork in test\' initial implementation. 2012-04-01 11:44:05 +04:00
Mark Harrah 6fb1934efa filter detected binary plugins by classpath now that plugin class loader is shared. fixes #412 2012-03-31 21:51:01 -04:00
Mark Harrah c6f28c650d option to preserve last modified time of files extracted from zip file. enabled by default. fixes #389 2012-03-10 14:26:09 -05:00
Mark Harrah 868196e652 delete empty parent directories of deleted class files. fixes #387 2012-03-05 13:40:17 -05:00
Sanjin Sehic 972acc871a Allow retrieving of non-standard git URIs
Non-standard git URIs are ones that do not start with 'git:' nor end
with '.git'. An example of non-standard git URI is
'ssh://server/home/user/repo'.

The mechanism for specifying a non-standard git URI is done by
prefixing the whole URI with 'git:' to signify that it should be
handled with the git resolver. For example, non-standard git URIs like
'git:ssh://server/user/repo' and 'git:https://server/user/repo' can
now be used.
2012-02-13 22:02:44 -05:00
Sanjin Sehic 77626f5232 Optimize retrieving from git repositories
Instead of cloning from a remote git repository for each branch,
revision or tag separately, the git resolver locally clones only once
the remote git repository and then creates further local clones from
this local copy of the remote repository.

First, optimization, of course, is execution speed, because cloning
local repository is much faster than remote repository. Furthermore,
because git uses hard-linking when a clone of local repository is
created, the second optimization is in space consumption.

For example, if we have one project that uses
https://github.com/harrah/xsbt.git#v0.11.1 and second project that
uses https://github.com/harrah/xsbt.git#v0.11.2, in previous git
resolver implementation it would require two separate clones of the
remote git repository at https://github.com/harrah/xsbt.git. But, the
new git resolver requires only one clone of the remote git repository
and two local clones which take no space because of hard-linking.
2012-02-13 22:02:44 -05:00
Sanjin Sehic 942427bfa3 Extract local, remote, and git BuildLoader.Resolver from ResolveUnit 2012-02-13 22:02:44 -05:00
Mark Harrah d82757f595 more IO API documentation 2012-01-26 21:28:19 -05:00
Mark Harrah f55d34f617 Add Path.allSubpaths and API documentation for mappers 2012-01-26 21:28:19 -05:00
Mark Harrah ec48779829 moved task axis before the key 2012-01-09 08:00:29 -05:00
Mark Harrah faa0809146 IO.touch operates on absolute file 2011-12-13 17:29:08 -05:00