Commit Graph

287 Commits

Author SHA1 Message Date
Josh Suereth 5ea556a397 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 fc5da1fa65 Scalariforming test code 2014-05-07 11:52:23 -04:00
Eugene Yokota e64165ce9e added scalariform 2014-05-01 12:50:07 -04:00
Antonio Cunei be3ff51f0a Do not attempt to publish if no artifacts are present
Ivy transactional publishing will abort if no artifacts
are published, either because the temporary directory is
not being created, or because Ivy will detect an anomalous
condition.

Therefore, skip publishing altogether if there is
nothing to publish to begin with.
2014-04-30 17:40:58 +02:00
eugene yokota 15fce3f84f Merge pull request #1226 from sbt/wip/bump-to-latest-ivy
Bump to our own release of ivy 2.4.x
2014-04-10 10:15:26 -07:00
eugene yokota 0215b14fb8 Merge pull request #1232 from sbt/wip/fix-1156
Ensure that if artifact is published, we overwrite default checksums.
2014-04-07 08:36:16 -07:00
Eugene Yokota 1742e837c4 Roll back sbt/sbt@482f99 (aggressive deletion of cache). Fixes #1091.
* sbt 0.12.3 introduced sbt/sbt@482f99 to fix #637 and #641.
* The underlying issue of #641 was an incorrect classifier, and it was
  fixed in sbt/sbt@718fa9 for #683 and shipped as sbt 0.13.0.
2014-04-05 01:53:31 -07:00
Josh Suereth 8bd930cbe5 Remove JDK7 features from Resolver shim. 2014-04-04 20:25:37 -04:00
Josh Suereth 80c09619bf Ensure that if artifact is published, we overwrite default checksums.
Fixes # 1233

* Add a new "shim" for RepositoryResolvers that modifies the "put"
  method so that it will ignore the overwrite flag for checksums.
2014-04-04 17:19:56 -04:00
Josh Suereth b95759a138 Bump to our own nightly of ivy 2.4.0 (RC1+).
* Testing the infrastructure to use our own instance of ivy
* Allow us to push bug-fixes/performance directly into ivy
  on our own pace, as we submit patches back to ivy master
2014-03-29 13:06:27 -04:00
Eugene Yokota 51d0df004f CustomPomParser compatibility with 0.13.1. #1191 #1192 2014-03-21 23:53:06 -04:00
Dan Sanduleac efab62e89e sbtTransformHash -> e:sbtTransformHash 2014-03-19 11:08:17 +00:00
Josh Suereth 95e9b5cda7 Don't fail publishing on overwrite, but issue a warning.
Workaround for #1156.

* Creates a new FileRepository that will stil allow local files
  to be transfered if overwrite is true (non-snapshot module),
  but will issue a warning about deprecated behavior.
* Ensure warning is long enough to annoy people into asking
  what it's about.
2014-03-08 14:08:25 -05:00
Josh Suereth 7532ec1e97 Merge pull request #1145 from sbt/wip/issue-1136
Fix #1136 - Ivy's + dependency ranges not converted appropriately to maven.
2014-03-07 17:22:29 -05:00
Josh Suereth ee28011dfc Pull in @cunei's suggestion for a more complete Ivy->Maven dynamic revision convertor.
We attempt to convert these constructs to maven:
   * 1.+
   * ]1,2]
   * [2,3[
   * 1+  - Albeit this one is a heuristic for accuracy.

This should help ivy users which prefer the nicer 1.2.+ syntax.

Also adds tests/improves exisitng tests.
2014-03-05 19:14:21 -05:00
Josh Suereth 25400a11d3 Fixes #429 - Add better error messages when credentials are not found.
* Create hackery to inspect registered credentials in the IvyCredentialStore.
* Create a new authenticator which inserts itself *after* the ivy authenticator.
  - Will issue an error message detailing host/realm required if credentials are
    not found.
  - Also lists out configured Realms with a 'is misspelled' message.
  - Ignores proxy-related authentication errors, for now.
2014-03-04 11:36:34 -05:00
Josh Suereth b25fc2bd00 Fix #1136 - Ivy's `+` dependencies not converted to maven style syntax.
* Attempt to convert dependencies that end in `+` into maven-style version range
* if a failure occurs, just use the original version (could be bad...).
2014-03-03 12:10:37 -05:00
Dan Sanduleac 1e549eb3dc Fix binary compatibility with 0.13 2014-01-23 12:07:37 +00:00
Dan Sanduleac fda1d25350 Expose overwrite flag in IvyActions.publish, and by default only overwrite if it's a snapshot 2014-01-17 10:45:57 +00:00
William Benton 8f74dc5524 Support Ivy 2.3.0-final.
This entailed modifying ResolutionCache and the CustomPomParser
to reflect changes to the ResolutionCacheManager interface and
DefaultExtendsDescriptor class between Ivy 2.3.0-rc1 and
2.3.0-rc2. Specifically,

1. ResolutionCacheManager now includes two additional methods
that needed implementations in ResolutionCache:
getResolvedModuleDescriptor(mrid: ModuleRevisionId) and
saveResolvedModuleDescriptor(md: ModuleDescriptor). I adapted
the implementations for these (which are expressed primarily in
terms of other interface methods) from Ivy 2.3.0's
DefaultResolutionCacheManager.

2. Instead of taking a ModuleRevisionIdentifier and a resolved
ModuleRevisionIdentifier as its first two arguments, the
DefaultExtendsDescriptor constructor now takes a
ModuleDescriptor. This was a trivial change.

Note that ResolutionCache.getResolvedModuleDescriptor does not
appear to be used by Ivy as sbt uses Ivy and there is thus no
test coverage for its implementation. Also note that the
DefaultResolutionCacheManager object created in
Update.configureResolutionCache now requires a reference to an
IvySettings object; DRCM expects this to be non-null.
2013-12-13 14:24:37 -06:00
Mark Harrah 28c189e4e2 Better representation of no cross-version suffix in suffix conflict error message. 2013-10-23 09:46:43 -04:00
Mark Harrah dba8bd28cf 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 e1cd7ebde0 'makePom' should not generate <type> elements for standard classifiers. Fixes #728.
The <type> element was generated for any explicit Artifact with a type other than "jar".
withSources() and withJavadoc() create explicit Artifacts of this kind, but shouldn't
have <type> elements.  They are primarily artifacts with classifiers- the type is an
Ivy aspect.  So, when writing to a pom, don't use write a type for known classifiers.
2013-10-02 19:39:17 -04:00
James Roper 5755689a8c String upper/lower case no longer locale dependent
Fixed many instances of the Turkish i bug.

Spare a thought for the poor Turks!
2013-09-24 08:14:15 -04:00
Mark Harrah b7770bc52e parse external pom.xml with CustomPomParser to handle multiple definitions.
Fixes #758.  This is the same issue fixed by 74c07c64a7
but in this case the cause was the top-level pom.xml, which didn't go through CustomPomParser.
2013-09-16 11:58:13 -04:00
Mark Harrah d9ce0a0a04 don't transform a module descriptor after it has already been processed by this sbt version. Ref #876. 2013-09-13 23:19:06 -04:00
Mark Harrah da1b8e1f55 do custom pom processing when reading from cache, fixes #876 2013-09-13 23:18:13 -04:00
Mark Harrah b408a9f057 Move some logic in custom pom parser to separate methods 2013-09-13 16:37:22 -04:00
William Benton ba7f3db5a0 Add factory methods to PatternsBasedRepository
This commit adds convenience methods to PatternsBasedRepository that
produce a copy of the repository with metadata optional or with
consistency checking disabled.
2013-08-26 14:06:21 -04:00
William Benton 298292c8c5 Additional options for Ivy resolvers.
Specify an Ivy resolver with ", descriptorOptional" to make Ivy
descriptor files optional for that repository or with
", skipConsistencyCheck" to disable Ivy consistency checks for
that repository.
2013-08-26 14:06:21 -04:00
Mark Harrah 8463792b99 API docs for CrossVersion 2013-08-16 14:21:44 -04:00
Mark Harrah a76f59c575 Use repo.scala-sbt.org everywhere to be more independent of hosting details. 2013-08-07 18:24:19 -04:00
Mark Harrah ae0b9457b2 Revert packaging='pom' behavior change introduced in c5823ad1e7. Fixes #810. Ref #636. 2013-07-11 18:49:30 -04:00
Mark Harrah c2724510e5 clean up some ConvertResolver parameter lists 2013-07-11 18:49:30 -04:00
Mark Harrah c924862d1c Better auto project ID handling. Ref #776.
* Consolidate project ID validation and normalization into Project methods
* Provide an earlier and more detailed error message when the directory
  name can't be used for the project ID
2013-06-23 19:57:30 -04:00
Mark Harrah 141d608ed7 Move deprecated scala-tools conveniences to private[sbt] accessibility 2013-06-19 17:15:22 -04:00
Mark Harrah 64dc140e48 Invalidate cache when metadata came from ProjectResolver. Based on the core idea in #770 by @ezh.
Fixes #768, closes #770, fixes #773.
2013-06-05 19:55:24 -04:00
Mark Harrah 7440613ec2 Fix regression in 0.12.3 where artifacts without an explicit configuration wouldn't be listed in ivy.xml. 2013-06-04 11:10:12 -04:00
Mark Harrah d7e85f5877 ProjectResolver should throw an exception when called to retrieve dependency.
As suggested by @ezh, ref #770.
2013-06-03 22:49:48 -04:00
Mark Harrah 0051af6a48 additional docs on ModuleID.extra 2013-06-01 10:56:30 -04:00
Mark Harrah 64257e427c Test case and comment fixes #760.
The actual fix was introduced in 6d5d641dd7.
2013-05-28 15:08:13 -04:00
Mark Harrah 7cdb83693f Use publication date from metadata instead of original file's last modified time. Fixes #764. 2013-05-28 11:08:49 -04:00
Mark Harrah cee19a157e Fix for cache issues when developing sbt itself.
Ivy still seems to remember the resolver that found the metadata
and records that as the resolver to use for the artifact.  Previous
fixes have attempted to ignore or blank this resolver.  The issue
this fix addresses comes from inter-project not being ignored/blanked.
inter-project can't provide artifacts because it is only for projects
in the current build under development and not for modules in a repository.
The symptom is that compiling a build definition fails because the
sbt jars aren't on the classpath, but it is ultimately due to the
inter-project resolver incorrectly being used to resolve artifacts.
2013-05-05 15:42:15 -04:00
Mark Harrah 48f9ff2ec3 account for localOnly when cache subclass overrides isChanging 2013-05-05 15:42:15 -04:00
Mark Harrah 7bda0fad17 Better auto-generated IDs for default projects. Fixes #554.
For the global plugins project, the default ID is "global-plugins".
For a normal project, the default ID is the name of the build directory.
The ID of a build definition for one of the above appends -build.
2013-04-10 20:15:28 -04:00
Mark Harrah ea48770534 Correct data constructor for CrossVersion.binaryMapping. Fixes #716. 2013-03-27 09:17:54 -04:00
Mark Harrah bd134f1f27 add publish-m2 task for publishing to ~/.m2/repository. Fixes #485. 2013-03-27 09:17:53 -04:00
Mark Harrah f728912f12 use separate ivy home directories in component provider test so tests can run concurrently 2013-03-18 09:52:57 -04:00
Mark Harrah 55b986e6ec Remove the conflict warnings based on the evicted modules. Ref #709.
This aspect is better served by a standard Ivy conflict manager.
2013-03-14 16:17:12 -04:00
Mark Harrah 364e469947 Publish test artifacts in Test configuration and corrects classifier to 'tests'. Fixes #683 2013-03-08 20:11:53 -05:00