Commit Graph

1507 Commits

Author SHA1 Message Date
Martin Duhem 8e333984f2 Create default artifact for deps from POM files
Dependency descriptors that are created from POM files do not specify
their artifacts. In those cases, it is correct to create a default
artifact.
2016-05-06 07:10:42 +02:00
Martin Duhem bd082a562b Check that default artifact exists when trying to retrieve it.
When concatenating the artifacts coming from two modules, we sometimes
attempted to create a default artifact from the organization and name of
the module.

However, this may fail because a module a % b "1.0" may not have an
artifact named "b.jar" (see sbt/sbt#2431).

Fixes sbt/sbt#2431.
2016-05-06 07:08:33 +02:00
Eugene Yokota d304a95b24 Bump dependencies 2016-05-04 22:49:03 -04:00
eugene yokota 27bf18f7a3 Merge pull request #31 from JD557/fix-sorrting-typo
Fix small typo ("Sorrting" should be "Sorting")
2016-05-01 03:15:09 -04:00
eugene yokota 95cfb32fb8 Merge pull request #34 from Duhemm/fport/static-launcher
FPORT: Off the grid installation + repositories override
2016-05-01 03:14:44 -04:00
Martin Duhem ed0f2af66b Fix warning with Scala 2.11
We get a warning about the exhaustivity check, but the warning
disappears if we increase the maximum recursion depth.
2016-04-27 11:09:00 +02:00
Martin Duhem 65adc869d4 Implement static launcher for sbt
This is a combination of 13 commits. I squashed these 13 commits to make
forward porting those changes easier, since some commit undo the changes
of other commits.

The PRs that include these changes can be found at
https://github.com/sbt/sbt/pull/2564 and
https://github.com/sbt/sbt/pull/2576.

Static launcher, get bridge sources from resources

This commit introduces a new "static" launcher that does not use Ivy to
gather all the artifacts that it requires, but rather expect them to be
immediately available.

To be able to use sbt without Internet access, we add a new
`ComponentCompiler` that is able to retrieve the bridge sources from the
resources on classpath and compile it.

Fix classpath issues in static launcher

The launcher defines a top classloader that willbe used by all
`ScalaInstance`s. Previously, this top classloader had a parent that
contained the scala library 2.10, which prevented the correct
compilation of the compiler bridge for scala 2.11.

Also, we no longer need the scala-reflect JAR.

Tests for FakeResolver

Add `scala-reflect.jar` to JARs of `StaticScalaProvider`

It turns out we need to have `scala-reflect.jar` on classpath to compile
the compiler bridge for the static scala instance of the launcher.

Comply to Ivy's specification in `FakeResolver`

Remove `CompilerBridgeProvider` and `ResourceBridgeProvider`

It turns out that we can leverage the`FakeResolver` that has been
implemented to use with the static launcher, and resolve a "fake
compiler bridge" using it, rather than copying it from the resources.

This also has the advantage of not requiring to change the build
definition.

Fix NPE in FakeResolver

Add compiler bridge sources to fake resolver

This allows sbt to resolve the compiler bridge sources when using the
static launcher

Don't hardcode sbt version in static launcher

Add scala compiler and library to fake resolver

This allows us to still resolve them if we have no other resolver
configured.

Add `RepositoriesParser`

This parser is used by the static launcher to parse the definition of
resolvers that override the build resolvers.

Support repositories override in static launcher

The static launcher will now parse user-defined repositories like the
usual launcher does.

Specifically, the static launcher now uses the following configuration:

 - `sbt.boot.directory`: specifies the boot directory that sbt will use.
   Defaults to `~/.sbt/boot`.
 - `sbt.override.build.repos`: indicate whether we want to override the
   build resolvers. Defaults to false.
 - `sbt.repository.config`: specifies the path to the files that
   contains repositories definition. Defaults to
   `${sbt.boot.directory}/repositories`.

Notes for sbt/sbt#2564 & sbt/sbt#2576
2016-04-27 10:14:47 +02:00
João Costa 195d35c07d Fix typo ("Sorrting" should be "Sorting") 2016-03-23 11:34:33 +00:00
eugene yokota 66520bff35 Merge pull request #29 from dansanduleac/inlineConfigurationWithExcludes
Rename InlineConfigurationWithExcludes -> InlineConfiguration
2016-03-03 22:40:02 +01:00
Dan Sanduleac 19c7a85cd7 Rename InlineConfigurationWithExcludes -> InlineConfiguration 2016-02-24 12:02:23 +00:00
Dan Sanduleac 9e78b1cd9c Get rid of InlineConfiguration 2016-02-24 12:01:13 +00:00
eugene yokota 596354beae Merge pull request #28 from sbt/wip/merge-25
Merge "Handle source, docs artifacts correctly for Ivy"
2016-02-23 01:06:49 -05:00
Eugene Yokota 7edd4a954a Manually merged #25 2016-02-23 00:49:04 -05:00
eugene yokota 3d5dea5d4d Merge pull request #26 from oxbowlakes/branches
Add Ivy `branch` support to ModuleID
2016-02-23 00:36:14 -05:00
eugene yokota 62c12f16cd Merge pull request #24 from Duhemm/fport/inter-project-dependency-tracking
FPORT: Inter-project dependency tracking
2016-02-23 00:34:12 -05:00
eugene yokota 0b61e3c7b7 Merge pull request #22 from Duhemm/fport/adds-compatibilitywarningoptions
FPORT: Adds CompatibilityWarningOptions
2016-02-23 00:33:52 -05:00
eugene yokota aea1a76ce3 Merge pull request #27 from dwijnand/bump-sbt-houserules-for-mima
Bump sbt-houserules to add MiMa
2016-02-15 15:15:09 -05:00
Dale Wijnand 1bcefc6686 Bump sbt-houserules to add MiMa
See sbt/sbt#2383
2016-02-14 21:16:34 +00:00
Dan Sanduleac 2324c720c4 Set branch onto the ModuleID when constructing a ModuleReport 2016-02-10 17:25:59 +00:00
Dan Sanduleac 797fe0aa63 Fix IvyActions.restrictedCopy to respect branch 2016-02-10 17:25:59 +00:00
Dan Sanduleac 0fd248a19b Add [branch] to pattern for sbt's resolution cache 2016-02-10 17:25:59 +00:00
Dan Sanduleac 5ea0e0e07a [branch] as part of Resolver.localBasePattern 2016-02-10 17:25:58 +00:00
Dan Sanduleac a9b2154092 ModuleID to have a branch now, that ends up in the ModuleRevisionId too.
Also, add branch when converting ModuleID -> Ivy XML and include it in
IvyActions.substitute.
2016-02-10 17:25:58 +00:00
Dan Sanduleac 01030a197a Add IvyRepoSpec which tests that source artifacts (in this case, with type=src, though in the same "compile" configuration) are resolved correctly when using IvyActions.updateClassifiers, and NOT resolved when using the normal IvyActions.updateEither. 2016-02-10 14:44:49 +00:00
Dan Sanduleac fcd52ee283 Expose the default UpdateConfiguration in BaseIvyConfiguration 2016-02-10 13:21:22 +00:00
Dan Sanduleac 0d4336bbaa Apply style fixes 2016-02-10 13:21:22 +00:00
Dan Sanduleac 31440bb147 Fix BaseIvySpeficiation's init of UpdateConfiguration with a sensible default ArtifactTypeFilter 2016-02-10 13:21:22 +00:00
Dan Sanduleac dc81a1813d Fix UpdateReport.substitute to not drop missing artifacts 2016-02-10 13:21:22 +00:00
Dan Sanduleac 55d13bd8cd Fix artifact, deprecate stuff 2016-02-10 13:21:22 +00:00
Dan Sanduleac 055859ea9a [2/2] updateClassifiers to 1) filter artifacts by type 2) ALSO retrieve artifacts defined in Ivy publications 2016-02-10 13:21:21 +00:00
Dan Sanduleac 9db3e86fd9 [1/2] Add {source,doc}ArtifactTypes settings, use them in update* tasks in conjunction with ArtifactTypeFilter 2016-02-10 13:21:21 +00:00
Dan Sanduleac 789ebee0f1 ModuleID + inclusions 2016-02-10 13:17:23 +00:00
Dan Sanduleac 00bcd222e6 ExclusionRule -> InclExclRule 2016-02-10 13:17:23 +00:00
Dan Sanduleac c7dfbbf705 Add ArtifactTypeFilter 2016-02-10 13:17:21 +00:00
Dan Sanduleac 83fbb212d9 Add include rules to ModuleID 2016-02-08 15:46:58 +00:00
Dan Sanduleac 565acc4e2a Get rid of sources/docs configurations 2016-02-08 15:46:51 +00:00
Eugene Yokota cf0fef5a85 Inter-project dependency tracking. Fixes #2266
Adds `trackInternalDependencies` and `exportToInternal` settings. These
can be used to control whether to trigger compilation of a dependent
subprojects when you call `compile`. Both keys will take one of three
values: `TrackLevel.NoTracking`, `TrackLevel.TrackIfMissing`, and
`TrackLevel.TrackAlways`. By default they are both set to
`TrackLevel.TrackAlways`.

When `trackInternalDependencies` is set to `TrackLevel.TrackIfMissing`,
sbt will no longer try to compile internal (inter-project) dependencies
automatically, unless there are no `*.class` files (or JAR file when
`exportJars` is `true`) in the output directory. When the setting is
set to `TrackLevel.NoTracking`, the compilation of internal
dependencies will be skipped. Note that the classpath will still be
appended, and dependency graph will still show them as dependencies.
The motivation is to save the I/O overhead of checking for the changes
on a build with many subprojects during development. Here's how to set
all subprojects to `TrackIfMissing`.

    lazy val root = (project in file(".")).
      aggregate(....).
      settings(
        inThisBuild(Seq(
          trackInternalDependencies := TrackLevel.TrackIfMissing,
          exportJars := true
        ))
      )

The `exportToInternal` setting allows the dependee subprojects to opt
out of the internal tracking, which might be useful if you want to
track most subprojects except for a few. The intersection of the
`trackInternalDependencies` and `exportToInternal` settings will be
used to determine the actual track level. Here's an example to opt-out
one project:

    lazy val dontTrackMe = (project in file("dontTrackMe")).
      settings(
        exportToInternal := TrackLevel.NoTracking
      )
2016-01-25 13:56:17 +01:00
Eugene Yokota 8f88a35922 Adds CompatibilityWarningOptions. Fixes #2347
This addresses 0.13.10 regression, which currently warns users about
Maven incompatibility on a private configuration. This adds a config
class so the build user can control the level of the warning as well as
the target configuration to be monitored.
By default, we are only going to look at `Compile` and `Runtime`.
2016-01-25 12:11:56 +01:00
Dale Wijnand 4f2729c0b0 Merge pull request #16 from dwijnand/travis-jdks
Travis JDKs
2016-01-18 07:29:59 +00:00
Dale Wijnand 77a1e5d871 Target Oracle JDK 7 & 8 in Travis 2016-01-17 22:17:54 +00:00
Dale Wijnand d017e2603e Merge pull request #21 from dwijnand/move-CompatibilityWarning
Move CompatibilityWarning to sbt.internal.librarymanagement
2016-01-17 21:22:27 +00:00
Dale Wijnand ffcec2fa35 Commit auto-formatted code 2016-01-17 21:12:36 +00:00
Dale Wijnand 0a8402a8a9 Add missing imports 2016-01-17 21:12:27 +00:00
Dale Wijnand d693d0cde9 Move CompatibilityWarning to sbt.internal.librarymanagement 2016-01-17 19:58:57 +00:00
eugene yokota 598ac3c34c Merge pull request #20 from dwijnand/fport/refix-snapshots
FPORT: Refix snapshots
2016-01-17 14:08:08 -05:00
eugene yokota 1c4e67fda7 Merge pull request #19 from dwijnand/fport/maven-compatibility-changes
FPORT: Maven compatibility changes (intransitive warnings and "configuration not public")
2016-01-17 14:07:56 -05:00
eugene yokota 7d7787bd83 Merge pull request #18 from dwijnand/fport/make-sbt-dotty-aware
FPORT: Make sbt aware of Dotty
2016-01-17 14:07:31 -05:00
Eugene Yokota 660d66ef1f Bump up ivy to 2.3.0-sbt-2cc8d2761242b072cedb0a04cb39435c4fa24f9a 2016-01-17 18:53:42 +00:00
Eugene Yokota bd792c3bb8 Fixes #1616. Fixes the "latest snapshot" chain resolver
The "latest snapshot" chain resolver was assuming that there's at least
one artifact per module. I think that was the root cause of #1616.
2016-01-17 18:53:06 +00:00
Eugene Yokota 33ae444041 Bump up ivy to 2.3.0-sbt-39ece6f17e1af62c2e89a9d88b59c0c3aad56145
Ref sbt/ivy#21
2016-01-17 18:53:03 +00:00