Commit Graph

1121 Commits

Author SHA1 Message Date
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 fec3520e43 Merge pull request #1157 from retronym/ticket/1150
Fix task macro's handling of Symbol owners in <qual>.value
2014-03-07 12:02:04 -05:00
Havoc Pennington 1e99847879 Merge pull request #1154 from sbt/wip/merge-0.13.1-to-0.13
Merge doc fixes from 0.13.1 into 0.13 branch.
2014-03-07 10:35:35 -05:00
Josh Suereth 36859cd452 Merge pull request #1147 from sbt/wip/issue-429
Fixes #429 - Add better error messages when credentials are not found.
2014-03-06 10:52:12 -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 c5c6978c94 Merge pull request #1115 from metasim/Structure-docs
Added basic documentation for DefinableSetting, inferring behavior from implementation.
2014-03-03 14:16:21 -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
Josh Suereth c43d4fbcf4 Merge pull request #1127 from retronym/topic/2.11-2.10-source-compat
using compat._ to plug source compatibility breakages
2014-02-20 16:09:48 -05:00
Josh Suereth 63c2bce17c Merge pull request #1130 from sbt/wip/auto-plugins
AUTO PLUGIN FEATURE!!!!
2014-02-20 16:08:01 -05:00
Josh Suereth cd5a606cda Merge pull request #1126 from jozic/no-def-package
explicitly disapprove plugins using default package
2014-02-19 09:13:39 -05:00
Josh Suereth bcb8a0210f Merge pull request #1100 from dansanduleac/sessionSettings2
Fixed SessionSettings replacing existing setting
2014-02-02 04:24:49 -08:00
Josh Suereth 4104cc6b85 Merge pull request #1089 from dansanduleac/overwritePublish
Expose overwrite flag in IvyActions.publish
2014-02-01 07:56:41 -08: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
Grzegorz Kossakowski fe7f946ae2 Merge pull request #1069 from benjyw/0.13-format-v4-A
Make analysis file portable.
2014-01-07 15:50:23 -08:00
Grzegorz Kossakowski 0d3b94a93c Merge pull request #1042 from gkossakowski/name-hashing
Implement name hashing algorithm in incremental compiler
2014-01-06 15:40:18 -08: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 17056a6335 Merge remote-tracking branch 'gkossakowski/separate-dependency-phase' into 0.13 2013-10-24 16:57:32 -04:00
Mark Harrah 7498436443 Merge remote-tracking branch 'benjy/interned_files' into 0.13 2013-10-24 16:55:16 -04: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 7e19670872 Merge remote-tracking branch 'benjy/relations' into 0.13 2013-10-10 21:38:40 -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 0fde230314 Merge branch 'feature/inc-track-inherit' into 0.13 2013-05-01 19:25:01 -04:00
Mark Harrah cba7fb053d Merge remote-tracking branch 'scalatest/new-framework-api-12' into 0.13 2013-05-01 08:34:01 -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