Commit Graph

3667 Commits

Author SHA1 Message Date
Josh Suereth 3576baa76c Split Defaults.scala into three plugins: Global,Ivy,Jvm.
* GlobalPlugin has defaults for controlling parallelism on tasks, basic command stuff.
* IvyModule has the configuration for resolving/publishing modules to ivy, assuming
  each project is a single module.
* JvmModule has the configuration for compiling/running/testing/packaging Java/Scala
  projects.
2014-03-10 09:45:25 -04:00
Josh Suereth a44a14f2c8 AutoPlugins appropriately participate in AddSettings.
* Add new AutoPlugins type to AddSettings.
* Ensure any Plugins filter doesn't just automatically always add
  autoplugins every time.
* Load.scala can now adjust AutoPlugins ordering

Note: Adjusting autoplugin ordering is dangerous BUT doing a glob
      of "put autoplugin settings here" is generally ok.
2014-03-10 09:45:25 -04:00
Josh Suereth ac9391066b Allow Build.scala project settings to be ordered via AddSettings.
* Create new AddSettings.ProjectSettings that can be used in the Addsettings order.
* Update Load.scala to correctly abide by AddSettings orderings.
2014-03-10 09:45:25 -04:00
Josh Suereth 7f8d21c2f1 Remove Natures from AutoPlugins feature.
* remove the notion of Natures from Autoplugins.
* Update tests to use AutoPlugins with no selection for inclusion.
* Rename exisitng Natures code to Plugins/PluginsDebug.
2014-03-10 09:45:25 -04:00
Josh Suereth 75282195f4 Merge pull request #1168 from retronym/ticket/1107
Fix NPE in task macro accessing q"{...}".symbol.pos
2014-03-10 08:38:23 -04:00
Jason Zaugg af7eca1080 Fix NPE in task macro accessing q"{...}".symbol.pos
We shouldn't assume that the qualifier of a `Select` is a
`SymTree`; it may be a `Block`. One place that happens
is after the transformation of named/defaults applications.
That causes the reported `NullPointerException'.

In any case, using `qual.symbol.pos` sense here; it yields the
position of the defintions *referred to* by `qual`, not the
position of `qual` itself.

Both problems are easily fixed: use `qual.pos` instead.

Fixes #1107
2014-03-10 10:28:19 +01:00
Josh Suereth 361c34324e Merge pull request #1166 from retronym/ticket/1150
Fix task macro's handling of Symbol owners in <qual>.value
2014-03-09 09:48:33 -04:00
Jason Zaugg 563415aa6a Fix task macro's handling of Symbol owners in <qual>.value
The qualifier of the `.value` call may contain `DefTree`s (e.g.
vals, defs) or `Function` trees. When we snip them out of the
tree and graft them into a new context, we must also call
`changeOwner`, so that the symbol owner structure and the tree
structure are coherent.

Failure to do so resulted in a crash in the compiler backend.

Fixes #1150
2014-03-09 12:20:24 +01:00
Josh Suereth b02248a560 Merge pull request #1160 from sbt/wip/issue-1156
Don't fail publishing on overwrite, but issue a warning.
2014-03-08 16:03:50 -05:00
Josh Suereth 5b7ea8d93f Merge pull request #1158 from sbt/wip/issue-1155
Updates `last` and `export` commands to read from correct key.
2014-03-08 15:50:43 -05:00
Josh Suereth dbb47b3ce8 Updates `last` and `export` commands to read from correct key.
Fixes #1155.

It seems that somehow during the 0.13.{1 -> 2 } transition, we
stopped pointing at the correct key for TaskKeys (either that or
task streams are now all associated with the `streams` key).  I
think this may have been inadvertently caused from several
refactorings to enable greater control over the execution of tasks.

This points the `last*` methods at the correct key for tasks,
fixing both `last <key>` and `export <key>` commands.
2014-03-08 14:09:44 -05: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 1626226b06 Merge pull request #1162 from sbt/wip/fix-deprecated-ivy-in-test
Removing deprecated "re-publish release artifacts" behavior from tests.
2014-03-08 13:07:32 -05:00
Josh Suereth 4a7f5aa92f Split scripted tests into matrix so we run on parallel virtual machines. 2014-03-08 10:50:33 -05:00
Josh Suereth c09c78a9b5 For now only run integration tests from travis (OoM errors). 2014-03-08 10:22:03 -05:00
Josh Suereth bc067694ae Merge branch 'wip/travis-test' into wip/fix-deprecated-ivy-in-test 2014-03-08 10:08:07 -05:00
Josh Suereth 56232e2025 First attempt at travis-ci integration for sbt. 2014-03-08 10:07:17 -05:00
Josh Suereth dff52ce11e Removing deprecated "re-publish release artifacts" behavior from tests.
In sbt 1.0 republishing released artifacts will be removed, causing these tests
to fail.  We migrate to SNAPSHOT version now, to prevent suprises.
2014-03-08 09:30:23 -05:00
Josh Suereth a4b288f35b Revert "Fix task macro's handling of Symbol owners in <qual>.value"
This reverts commit 3017bfcd07.

This was causing sbt to be unable to compile.  Reverting temporarily until
we have a shot at a full fix.
2014-03-07 22:25:29 -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 4237ea5342 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
Jason Zaugg 3017bfcd07 Fix task macro's handling of Symbol owners in <qual>.value
The qualifier of the `.value` call may contain `DefTree`s (e.g.
vals, defs) or `Function` trees. When we snip them out of the
tree and graft them into a new context, we must also call
`changeOwner`, so that the symbol owner structure and the tree
structure are coherent.

Failure to do so resulted in a crash in the compiler backend.

Fixes #1150
2014-03-07 17:53:14 +01:00
Havoc Pennington ea878eeaf9 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 34d8168f75 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 0a8d844071 Fix merge conflicts in pulling doc fixes from 0.13.1 into 0.13 branch. 2014-03-06 10:10:38 -05:00
Josh Suereth 0e2d789290 Merge pull request #1153 from sbt/security-manager-avoid-file-permission
Override certain SecurityManager methods to avoid filesystem performance hit
2014-03-06 08:13:46 -05:00
Mark Harrah 32d28ab85b Override certain SecurityManager methods to avoid filesystem performance hit. 2014-03-06 07:39:06 -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 a8ab2f3db9 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 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
Josh Suereth 71c9ec0e55 Adding quick test for #1136.
* Just checks to see if + in version numbers are removed from pom files.
2014-03-03 10:20:15 -05:00
Josh Suereth 3944955d62 Merge pull request #1139 from lucamilanesio/0.13
Completed a full example of forked tests with grouping
2014-02-28 10:33:34 -05:00
Luca Milanesio bedfb12163 Making example specific to build.sbt
(see discussion on https://github.com/sbt/sbt/pull/1139)
2014-02-28 15:19:17 +00:00
Luca Milanesio 63583d2544 Removed redundant semicolon 2014-02-27 10:51:44 +00:00
Luca Milanesio c9208a4719 Completed a full example of forked tests with grouping
The previous example of how to fork group of tests in different
JVMs was incomplete and not fully working.

a) The "testGrouping in Test" is needed, otherwise the grouping is
   not known to which phase to apply
b) Added a more complete Project definition to explain what the curly
   brackets section refers to and where the settings need to be included

The new complete example works out of the box :-)
2014-02-27 10:41:06 +00:00
Josh Suereth 27b83e7d59 Merge pull request #1137 from gourlaysama/wip/forking
update doc: javaHome is not File but Option[File].
2014-02-25 20:53:36 -05:00
Antoine Gourlay 0f6fe85d3f update doc: javaHome is not File but Option[File]. 2014-02-26 01:23:32 +01:00
Josh Suereth 44c62094b8 Merge pull request #1133 from cfeduke/0.13-doc-using-sonatype-publish-key
updated doc to include publishing PGP keys to the key server pool
2014-02-21 16:57:42 -05:00
Josh Suereth ab65e6b3cb Merge pull request #1135 from retronym/ticket/SI-7788
SI-7788 Adapt to renamed implict Predef.conforms
2014-02-21 16:57:06 -05:00
Jason Zaugg 8c4527317f SI-7788 Adapt to renamed implict Predef.conforms
In 2.11, the implicit version is named `$conforms` so as to avoid
accidental shadowing by user code, which renders methods using
views and subtype bounds inexplicable unusable.

But, SBT intentionally needs to hide it to make the implicits
in this file line up.

This commit opts-in the the required identifiers from Predef,
rather than opting out of conforms. This makes the same code
source compatible with 2.10 and 2.11.
2014-02-21 22:14:13 +01:00
Charles Feduke 1baa672275 updated doc to include publishing PGP keys to the key server pool 2014-02-21 16:12:34 -05:00
Josh Suereth 7221890b3d Merge pull request #1132 from sbt/wip/use-bintray-for-plugins
Migrate docs to use bintray for plugins.
2014-02-21 13:50:21 -05:00
Josh Suereth ba8a22679a Migrate docs to use bintray for plugins. 2014-02-21 13:19:00 -05:00
Josh Suereth 0e337b8cbd Fix binary-plugin scripted test so it can run more than once. 2014-02-21 09:26:32 -05:00
Josh Suereth 2ee2576cb9 Fix auto-plugin test from removal of unary_! on Nature but not AutoPlugin. 2014-02-20 20:04:13 -05:00
Josh Suereth c9f83dde47 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 a8acc11fb5 Merge pull request #1130 from sbt/wip/auto-plugins
AUTO PLUGIN FEATURE!!!!
2014-02-20 16:08:01 -05:00
Mark Harrah 90134b3af0 'plugins' and 'plugin <name>' commands to inspect plugins
* 'plugins' displays the list of plugins available for each build along with the project IDs each is enabled on
* 'plugin <name>' displays information about a specific plugin in the context of the current project
 - if the plugin is activated on the current project and if so, information about the keys/configurations it provides
 - how the plugin could be activated if possible
* tries to detect when it is run on an aggregating project and adjusts accordingly
 - indicates if an aggregated project has the plugin activated
 - indicates to change to the specific project to get the right context

This is a rough implementation and needs lots of polishing and deduplicating.
The help for the commands needs to be added/expanded.
2014-02-20 13:56:50 -05:00
Mark Harrah 2bf127aaf6 Make BuildDependencies construction a proper function outside of the settings sytem. 2014-02-20 13:28:02 -05:00