Commit Graph

333 Commits

Author SHA1 Message Date
eugene yokota 96558930c3 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 46598ea575 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 d8ee16c600 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 e8dd19cb92 Remove JDK7 features from Resolver shim. 2014-04-04 20:25:37 -04:00
Josh Suereth 60a457d083 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 6e72324b88 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 f58fbb8d7d CustomPomParser compatibility with 0.13.1. #1191 #1192 2014-03-21 23:53:06 -04:00
Dan Sanduleac 6588ac1b62 sbtTransformHash -> e:sbtTransformHash 2014-03-19 11:08:17 +00:00
Josh Suereth 875562f3db 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 f06948a4af 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 5486daf700 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 21da87c4e7 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 8cd44646b7 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 ba4d57b120 Fix binary compatibility with 0.13 2014-01-23 12:07:37 +00:00
Dan Sanduleac 0199a93ffb 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 3a1ad44c45 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 57306e6257 Better representation of no cross-version suffix in suffix conflict error message. 2013-10-23 09:46:43 -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 77ed899a96 '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 743ce99315 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 8ff424711c 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 6a293c4efe 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 31f6f9905d do custom pom processing when reading from cache, fixes #876 2013-09-13 23:18:13 -04:00
Mark Harrah d279f2ed76 Move some logic in custom pom parser to separate methods 2013-09-13 16:37:22 -04:00
William Benton c6cee694ab 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 2a3462ac12 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 d847d4ea2f API docs for CrossVersion 2013-08-16 14:21:44 -04:00
Mark Harrah 89d15ed1f9 Use repo.scala-sbt.org everywhere to be more independent of hosting details. 2013-08-07 18:24:19 -04:00
Mark Harrah d8b3118ba4 Revert packaging='pom' behavior change introduced in c5823ad1e7. Fixes #810. Ref #636. 2013-07-11 18:49:30 -04:00
Mark Harrah 544565bf98 clean up some ConvertResolver parameter lists 2013-07-11 18:49:30 -04:00
Mark Harrah ce1c8b0ebc 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 7796715e88 Move deprecated scala-tools conveniences to private[sbt] accessibility 2013-06-19 17:15:22 -04:00
Mark Harrah 133ff84ae8 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 268ae565f6 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 cbe6c96564 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 8823df4fbc additional docs on ModuleID.extra 2013-06-01 10:56:30 -04:00
Mark Harrah ea52e2c034 Test case and comment fixes #760.
The actual fix was introduced in 6d5d641dd7.
2013-05-28 15:08:13 -04:00
Mark Harrah 04a5a01005 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 6d5d641dd7 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 b5dc5c1ddd account for localOnly when cache subclass overrides isChanging 2013-05-05 15:42:15 -04:00
Mark Harrah a4c059cb7e 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 dce2853ae7 Correct data constructor for CrossVersion.binaryMapping. Fixes #716. 2013-03-27 09:17:54 -04:00
Mark Harrah 2f13b7a8c7 add publish-m2 task for publishing to ~/.m2/repository. Fixes #485. 2013-03-27 09:17:53 -04:00
Mark Harrah e69df1ae9c use separate ivy home directories in component provider test so tests can run concurrently 2013-03-18 09:52:57 -04:00
Mark Harrah fcfa51c2ab 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 718fa91772 Publish test artifacts in Test configuration and corrects classifier to 'tests'. Fixes #683 2013-03-08 20:11:53 -05:00
Mark Harrah 56b85522b7 ivy cache: ignore the original resolver in more places. Fixes #704 2013-03-08 14:23:31 -05:00
Brendan W. McAdams 77310ac2b6 Resolves #645: Added 'xml:space="preserve"' attribute to extraDependencyAttributes XML Block * This will keep PrettyPrinter from clobbering and breaking pom files for plugins dependent on other plugins 2013-02-28 18:00:40 -05:00
Mark Harrah f6d73128fc deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah cbaef8a6f8 Use Ivy's default name for the resolution report.
Ivy hardcodes the resolution report name in the stylesheet that renders the
HTML from the XML report.  This means that the links to other configurations
are broken when using a custom name.
2013-02-19 14:33:22 -05:00
Eugene Yokota 125727ba83 support binary version in launcher 2013-01-29 16:55:13 -05:00
Eugene Yokota d7779ec96e add more CrossVersionTest 2013-01-24 13:03:40 -05:00
Eugene Yokota fedd43922a add CrossVersionTest 2013-01-24 13:03:40 -05:00
Eugene Yokota 6c24d1a8b8 deprecate binaryVersion 2013-01-24 13:03:40 -05:00
Eugene Yokota b929d778e9 adds sbtApiVersion and scalaApiVersion
sbtApiVersion and scalaApiVersion each calculates the API
version of release builds as well as milestones and RCs.

scalaBinaryVersion and sbtBinaryVersion are now aware of
scalaApiVersion and sbtApiVersion respectively.
For example, sbtBinaryVersion for "0.13.0-SNAPSHOT" now evaluates to
"0.13.0-SNAPSHOT" instead of "0.13".
2013-01-24 08:21:11 -05:00
Paolo G. Giarrusso d64a0e078d Silence boring Eclipse warnings: catching all exceptions, part 2
These warning fixes are new since my last pull request, please verify.
2013-01-22 09:05:15 -05:00
Paolo G. Giarrusso 40bc141058 Silence boring Eclipse warnings: @SuppressWarnings("rawtypes")
Add @SuppressWarnings("rawtypes") to ResolverAdapter, since it has a comment
making pretty clear that using raw types is intended.
2013-01-22 09:05:15 -05:00
Mark Harrah 960af4244a Only include standard scopes in pom.xml. 2013-01-16 10:26:33 -05:00
Mark Harrah 1cdaf530cb follow-up to invalidating changing artifacts: super.cacheModuleDescriptor can be null 2013-01-16 10:26:33 -05:00
Mark Harrah 37f937402f Ivy Artifact needs wildcard configuration added if no explicit ones are defined. Fixes #439. 2013-01-16 10:26:33 -05:00
Mark Harrah 0f28164b53 Invalidate artifacts not recorded in the original metadata when a module marked as changing changes. Fixes #637, #641. 2013-01-15 08:22:00 -05:00
Mark Harrah dd008e4dc5 Warn and optionally error when multiple cross version suffixes for a module are detected. Fixes #639. 2013-01-15 08:21:53 -05:00
Mark Harrah a9ac6b3983 Configurable conflict manager and corresponding documentation on conflictManager, dependencyOverrides, and force(). Fixes #603. 2013-01-11 16:01:31 -05:00
Mark Harrah c5823ad1e7 Don't try to automatically detect a main artifact when packaging=pom. Fixes #636.
For the rare case where a main artifact is expected, add an explicit jar()
to the dependency declaration.
2013-01-11 16:01:30 -05:00
Mark Harrah 4af9b70bf9 Split IvyInterface into Artifact, Configuration, ModuleID, and Resolver source files 2013-01-10 16:06:13 -05:00
Mark Harrah caa1a4c583 API documentation for ModuleID methods 2013-01-10 16:06:12 -05:00
Mark Harrah a152965933 Option to automatically manage API documentation mappings
Set autoAPIMappings := true to enable.

Then, set apiURL to the base URL of the API documentation for a project.
This will get stored in an extra attribute in the ivy.xml or as a property
a pom.xml.

When using managed dependencies that have set their apiURL, the -doc-external-doc
setting for scaladoc will be automatically configured.  Note that this option
will only be available in Scala 2.10.1 and so enabling autoAPIMappings for
earlier versions will result in an error from scaladoc.

For unmanaged dependencies or dependencies without an automatic apiURL, add the
(File,URL) mapping to apiMappings.  The File is the classpath entry and the URL
is the location of the API documentation.
2013-01-10 16:06:12 -05:00
Mark Harrah 6a7540cf6f Disable Ivy debug-level logging (see elaboration below). Fixes #635.
The verbose-level logging is what usually contains relevant information for the user.
Persisting the debug logging slows down update noticeably and clutters the more useful
debug logging output from verbose.
2013-01-10 16:06:12 -05:00
Mark Harrah ce439efab3 Convert references to harrah/xsbt to sbt/sbt 2013-01-04 17:22:40 -05:00
Mark Harrah e3745540c9 More cleanup of Scala version handling, including managedScalaInstance to control automatic 'scala-tool' configuration and dependencies. 2012-12-09 20:40:41 -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
Mark Harrah 769ecbace5 add scala-tool configuration and dependencies when configuring via pom.xml/ivy.xml 2012-12-06 07:25:41 -05: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 5a45faf41b ConflictWarning cleanup, added strict convenience method for failing on any conflicts 2012-12-02 03:17:19 -05:00
Mark Harrah e47a357ab7 Resolve Scala version for projects in the normal `update` task.
1. Scala jars won't be copied to the boot directory, except for those needed to run sbt.
2. Scala SNAPSHOTs behave like normal SNAPSHOTs.  In particular, running `update` will properly re-resolve the dynamic revision.
3. Scala jars are resolved using the same repositories and configuration as other dependencies.
4. Classloaders (currently, Scala classloaders) are cached by the timestamps of entries instead of Scala class loaders being cached by version.

TODO: Support external dependency configuration
2012-11-17 20:23:06 -05:00
Mark Harrah 1c1e5c4977 taking care of deprecations removed in Scala master 2012-11-14 11:48:06 -05:00
Mark Harrah ce0284e187 Fixes #582. Don't merge dependencies with mismatched transitive/force/changing values.
This avoids the assertion, but note that Ivy is unlikely to work properly in this situation.
2012-11-12 14:45:36 -05:00
Mark Harrah e532d20732 cleanup of #585: compatible with earlier launchers 2012-10-29 09:52:10 -04:00
Eric Bowman 835ee0d1b3 XSBT-5: maven-style ivy repo support in the launcher config
Change-Id: I22c1ff126961d61d92e2e45a5b7eff329d3def90
Reviewed-on: https://gerrit.gilt.com/10950
Reviewed-by: Eric Bowman <ebowman@gilt.com>
Tested-by: Eric Bowman <ebowman@gilt.com>
2012-10-29 09:04:42 -04:00
Mark Harrah 5500d38367 invalidate cache when metadata deleted from local repository 2012-09-23 15:46:26 -04:00
Mark Harrah b15fb72727 Fail publishing when artifacts to publish do not exist. 2012-09-11 11:37:41 -04:00
Mark Harrah ea6bf368db use context logger instead of initial logger for Resolving messages 2012-09-01 09:56:09 -04:00
Mark Harrah 3dd3a18996 Force update on change to last modified time of artifacts or cached descriptor.
This is part 2 of the fix for #532.  It may also fix issues when working with
multiple local projects via 'publish-local' and binary dependencies.
2012-08-29 11:13:48 -04:00
Mark Harrah 14952e00b6 Second part of resolution cache work. Fixes #532.
Replaces the standard Ivy resolution cache:
 1. Separate the cached resolved Ivy files from resolution reports,
    making resolution reports easier to find (target/resolution-cache/reports/)
 2. Cache location includes extra attributes so that cross builds of a plugin
    do not overwrite each other.
2012-08-29 11:13:48 -04:00
Mark Harrah 7a7acce621 don't write <scope> section of pom if scope is 'compile' 2012-08-28 11:55:24 -04:00
Mark Harrah c7f6ce4aec per-project resolution cache that deletes cached files before each update
These are the ivy files, properties, and resolve reports for the project,
not dependencies and their artifacts.
2012-08-28 11:55:24 -04:00
Mark Harrah 74c07c64a7 Merge multiple dependency definitions for the same ID. Fixes #468, #285, #419, #480.
This is only a workaround.  Multiple dependency definitions should be avoided
in general.
2012-08-27 10:49:13 -04:00
Thomas Lockney 8045731500 Actually pass in the artifact, rather than just a global match 2012-07-17 15:20:26 -04:00
Mark Harrah 5a93605d75 'orbit' packaging should be handled like a standard jar. fixes #499. ref #463 2012-07-06 10:28:51 -04:00
Mark Harrah 53ee1c5adf hk2-jar packaging should be handled like a standard jar. fixes #463 2012-05-16 07:34:15 -04:00
Mark Harrah 80500b5ca5 remove duplicate conflict warnings 2012-05-06 15:11:46 -04:00
Mark Harrah 1c1d7b41a5 change Scala binary version check to a warning 2012-05-06 14:15:03 -04:00
Mark Harrah e8b8be7547 more scala-tools replacements 2012-05-05 20:35:04 -04:00
Mark Harrah 361027127e deprecations backported to 0.11.3 2012-05-05 20:35:04 -04:00
Mark Harrah 3f92b33350 bump to Ivy 2.3.0-RC1 2012-05-02 19:56:35 -04:00
Mark Harrah 59a7432cf8 update-classifiers fixes: mark modules intransitive and don't exclude sources/docs for scala jars 2012-05-02 19:56:35 -04:00
Mark Harrah dfac015eb3 exclude should apply to any artifact type, not just jars. fixes #436 2012-04-28 18:58:52 -04:00
Mark Harrah 8594e4443d reorganize compilation modules 2012-04-18 08:08:25 -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