Commit Graph

251 Commits

Author SHA1 Message Date
Eugene Yokota f42ddc8cfe Add three slashes (u3) for file URI
#3088 attemped to fix the #3086, but by putting no slashes in `sbt.boot.properties` the launcher created by 0.13.15-* becomes incompatible for all previous sbt versions.

The uglier but backward compatible fix for #3086 is to use u3 format with three slashes. This on Windows will resolve to `file:///C:/Users/foo/.sbt/preloaded`, and on Mac and Linux `file:////root/.sbt/preloaded/`. Mac and Linux are both tolerant of extra slashes on the front:

```
> eval new File(new URL("file:////Users/foo/.sbt/preloaded/").toURI)
[info] ans: java.io.File = /Users/foo/.sbt/preloaded
```
2017-04-09 03:11:38 -04:00
Eugene Yokota de3d711f06 Remove slashes from local-preloaded
On Mac and Linux, user.home should return `/home/foo`, resulting to `file:/home/foo`.

On Windows, user.home should return `C:\Users\foo`, resulting to `file:C:/Users/foo`.
2017-04-08 03:59:52 -04:00
Eugene Yokota 0500959003 Add local-preloaded repo 2017-03-08 09:00:22 -05:00
Eugene Yokota 585e727a97 Include sbt-ivy-snapshots to launchconfig
Include sbt-ivy-snapshots to launchconfig
Prior to this change, the launchconfig for sbt was generated using
Transform's resource generator so releases would include
`typesafe-ivy-releases` repo, and snapshot releases would include
`typesafe-ivy-snapshots` and `sonatype-snapshots` repos in addition.
This is no longer useful since nightly builds are now published to
`sbt-ivy-snapshots` instead, which is backed by Bintray.

This removes the switching logic, so both `typesafe-ivy-releases` and
`sbt-ivy-snapshots` repos are always included into the launchconfig.
This removes the step of needing to download a launcher just to try the
nightly builds.
2015-12-29 19:48:57 -05:00
Eugene Yokota b8b3252ca9 Remove JCenter from boot properties. #2217 2015-12-24 12:14:14 -05:00
Eugene Yokota 56cc49a6b0 Remove launcher tests 2015-06-20 14:21:59 -04:00
Josh Suereth a27bb97415 sbt-plugins don't copy over to bintray, so we still need to hit maven central, but last. 2015-03-25 07:40:46 -04:00
Josh Suereth 9261652d41 Make bintray the default/first remote resoler, for faster resolution times. 2015-03-24 16:17:15 -04:00
Josh Suereth 9380ca02eb Migrate to using the sbt/launcher module, rather than having the code embedded.
* Remove launch/* code/tests, as these are in the sbt/launcher project.
* Create a new project which will resolve launcher module from sonatype-snapshots,
  and repackage it for the currently building version of sbt.
* Remove ComponentManagerTest which was relying DIRECTLY on launcher classes.
  We'll need to reconfigure this shortly to enable the tests again.

Remaining TODOs -

* Update resolvers so people can find the launcher.
* Add ComponentManagerTest back.
* Re-publish the sbt-launch.jar in the location it used to be published.
2015-03-24 16:12:51 -04:00
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
Eugene Yokota 47583fd2d0 boot package has its own error method 2014-10-10 17:57:08 -04:00
Eugene Yokota 3f958a5bce enable -deprecation for Scala 2.10
Enable -deprecation flag to catch old code being use when we migrate
things.
In this commit I moved error to sys.error.
2014-10-10 15:42:26 -04:00
Eugene Yokota c648a31c59 #1541. Launcher uses HTTPS Maven Central by default 2014-08-23 17:47:47 -04:00
Ben McCann 6508429d81 Fetch tyesafe artifacts using https. See http://blog.ontoillogical.com/blog/2014/07/28/how-to-take-over-any-java-developer/ 2014-08-16 16:17:07 -07:00
eugene yokota 23f9dc26c7 Merge pull request #1535 from sbt/fix/670
Fixes #670. Exclude http.proxyPassword from update.log
2014-08-16 17:11:10 -04:00
Eugene Yokota 6b6332a069 Fixes #670. Exclude http.proxyPassword from update.log 2014-08-15 18:25:06 -04:00
Havoc Pennington 705b60dc11 Use java Pattern directly in launcher instead of Scala API
This keeps the launch jar smaller
2014-08-15 15:34:11 -04:00
Havoc Pennington d7ca9c5637 Server launcher: Print errors running java -version to stderr
We forward errors from the spawned server to stderr, so we are
already using stderr and this should save someone some pain
vs. just swallowing the fail.
2014-08-15 15:24:21 -04:00
Havoc Pennington 081f6bac07 Ignore "java -version" IOException when launching servers
process.start and reading from the stderr stream could in
theory throw IOException, we want to return None then
rather than crashing.
2014-08-15 15:24:09 -04:00
Havoc Pennington 3a065dc047 Set Java memory options for server applications
The defaults here are copied from Activator which
in turn are probably copied from somewhere else.
They are of course basically arbitrary, but the
JVM's defaults if we don't set memory options
are insufficient to run most apps.

If the user sets any memory options in the configuration,
we completely leave them alone and don't set any of
our own. So it's always possible to override.
2014-08-15 11:07:19 -04:00
Roberto Tyley 0bada62349 Update misc tests and doc to reflect HTTPS access for Maven Central 2014-08-08 17:07:44 -04:00
Jacek Laskowski d1dbdfc816 Message and since parameters in @deprecated properly placed 2014-06-24 22:35:34 +02:00
Havoc Pennington 506d06bf67 Don't delete the server config file if SBT_SERVER_SAVE_TEMPS ne null
This allows people to reproduce failures by running the command line
by hand.

Fixes #1394
2014-06-05 11:18:22 -04:00
Havoc Pennington a72448b793 Flush output every time we write to it in StreamDumper
To try harder to get our errors displayed.
2014-06-05 11:09:59 -04:00
Havoc Pennington 63d9b638c3 Wait 5 seconds instead of 2 seconds to read stderr from launched server 2014-06-05 11:07:37 -04:00
Havoc Pennington d57f5ac180 put backticks around `yield` in Thread.yield 2014-05-29 12:32:10 -04:00
Havoc Pennington 007a8f2a70 ServerApplication: yield before we check on the dumper thread 2014-05-28 10:07:35 -04:00
Havoc Pennington 1e80d811a1 Read stderr from server for a short time before exiting
Previously we exited immediately without waiting to get any
error output.

This patch also adds the command line and directory to the
exception message on failure, in case the failure is due to
getting one of those wrong, for example.
2014-05-27 18:36:08 -04:00
Josh Suereth abffc3e1bd 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 244abd3b6f Scalariforming test code 2014-05-07 11:52:23 -04:00
Josh Suereth 39b68a2dfd Bring scala provider test to modern age of scala releases. 2014-05-07 11:48:45 -04:00
Eugene Yokota 785b0274ee some more source getting formatted 2014-05-02 18:07:05 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Josh Suereth f92206b785 Fixes issue with deadlocking server discovery on windows.
It turns out windows blocks until a process is finished when
you try to close the stderr handle, but not stdout.  Therefore,
we leave stderr open when we shut down, which lets the server
continue to run on windows.
2014-04-16 08:44:03 -04:00
Josh Suereth e2225c3c25 Merge pull request #1064 from jaceklaskowski/javadoc-changes
Javadoc changes
2014-04-07 10:02:35 -04:00
Dan Sanduleac c4f6217a70 Fix URITests to work under Windows 2014-04-04 10:10:40 +01:00
Dan Sanduleac 6abac450ef Retrieve dynamic app versions correctly 2014-02-10 09:18:41 +00:00
Josh Suereth 4207978f89 Merge pull request #1066 from jsuereth/wip/launcher-improvements
Launcher can now load servers in addition to regular applications.
2014-01-06 13:57:28 -08:00
Josh Suereth 418b854907 Launcher can now load servers in addition to regular applications.
* Add new ServerMain interface
* AppProvider can now choose to load ServerMain or AppMain classes
* Explicitly document what happens if something doesn't match an
  expected interface
* Improve error message on inability to load something.
* Parse new [server] section that denotes a service and is lock file
* Ability to serialize launch configurations.
* Attempt to look for active listening server via the lock file
* Forks the launcher itself to run servers from serialized launch configuration.
* Testing echo server.
* Tests to detect basic server functionality will work.
* Revamp all the documentation for the launcher, giving it its own section.
* Full documentation on launcher configuration files.

Revamp launcher documentation to be a bit more in-depth, and split bits into sections.
2014-01-06 16:54:45 -05:00
Jacek Laskowski dc246cade7 Javadoc changes 2014-01-06 14:08:02 +01:00
Jacek Laskowski a5b8dffc74 Unify warning to other schemes and use string interpolation 2014-01-02 09:18:54 -05: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
Josh Suereth ff71bca75c Drop some of the stack size of the launcher.
* Remove needless chained methods
* Attempt to create re-usable parsing methods.
2013-12-12 10:16:48 -05:00
Josh Suereth cfe14444b8 Document ComponentProvider interface. 2013-12-12 09:51:58 -05:00
James Roper 7d27fc226a Allow specifying sbt.boot.properties as a URI
This allows straight forward system independent generation of the
property, since URIs are well specified and only support one file
separator.
2013-11-06 20:33:52 -05:00
Josh Suereth b0f6f94839 Add in the ability to launch non xsbti.AppMain classes.
* Deprecate old mainClass method on appProvider
* Create entryPoint method which represnets class used to launch instead.
* Create PlainApplication to wrap static `main` methods.  Can return
  either Int, Exit or Unit.
* Detect supported 'plain' classes via reflection.
* Add new unit tests appropriate to the feature.
2013-11-06 12:29:51 -05:00
Mark Harrah a92b883e23 update to ScalaCheck 1.11.0 2013-11-04 11:28:40 -05:00
Mark Harrah 97e5ac8ec1 Read https+ftp proxy environment variables into system properties. Fixes #886. 2013-10-08 18:41:13 -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
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