Commit Graph

161 Commits

Author SHA1 Message Date
Eugene Yokota cea5d178d8 add offline installtion
To utilize local preloaded repo, this will create lib/ directory with all artifacts required for sbt. This can be rsynced to the preloaded repo.
2017-03-10 16:56:00 -05:00
eugene yokota 21b7fdbd0f Merge branch 'master' into wip/linux 2017-03-09 23:32:47 -05:00
Eugene Yokota 39d8504045 --rt-ext-dir returns a dir specific to JDK 9 ver 2017-03-09 20:10:59 -05:00
Eugene Yokota 605a17d949 move JDK9 logic within copyRt 2017-02-19 09:16:40 +01:00
Eugene Yokota 1b9f618efa Implement JDK 9 support for Windows 2017-02-15 12:18:51 -05:00
Eugene Yokota e8670ba78f Change to Windows lineending 2017-02-15 12:17:23 -05:00
Eugene Yokota f77c15496b add JDK 9 support 2017-02-15 04:57:47 -05:00
Eugene Yokota 965b96acc6 Update the build 2017-01-21 06:36:33 -05:00
Eugene Yokota 3235fd1bf1 Update copyright and license 2017-01-21 05:56:55 -05:00
Eugene Yokota acd610be67 Fix checkJava function 2017-01-16 03:09:29 -05:00
eugene yokota 86afaaebb4 Merge pull request #134 from Atry/patch-2
Don't set MaxMetaspaceSize on Java 8 by default
2017-01-11 10:29:38 -05:00
Eugene Yokota f14b165523 Fix java version detection
Previously awk was used to grab the full Java version such as 1.8.0_91.
While this is more accurate, 1.8.0_91 is not a number that can be compared by bash, and thus JDK8 detection logics were failing.
Fixes #135
2017-01-11 00:20:38 -05:00
杨博 (Yang Bo) e1d64533f3 Don't set MaxMetaspaceSize on Java 8 by default 2017-01-11 12:00:34 +08:00
eugene yokota 697e1239cb Merge pull request #122 from ahihi/master
Fix handling of arguments with asterisks on Windows
2016-12-31 02:09:58 -05:00
Will Sargent 04dfd94ff5 Add MSYS as a "cygwin" like 2016-11-27 20:30:58 -08:00
Antonio Cunei 345890880e Missing quotes may cause incorrect PATH expansion, fixed
If PATH contains ampersands etc, PATH may be
incorrectly expanded.
2016-11-16 14:26:39 +01:00
Miranda Kastemaa c4aa9052b5 Use more reliable shift loop for processing args 2016-10-17 15:51:53 +03:00
Sam Halliday d9da67979a -java-home should set PATH for javac usage 2016-08-25 20:16:35 +01:00
Sam Halliday 45badebcee add support for .jvmopts to the bash launcher 2016-08-25 20:16:35 +01:00
Sam Halliday daed09b8cd add support for .jvmopts and .java-version to Windows launcher 2016-08-24 20:55:02 +01:00
Martijn Riemers 1705b58fde Corrected spelling mistake in sbt.bat 2016-05-28 12:27:53 +02:00
eugene yokota 55628f6437 Merge pull request #96 from TLmaK0/fix_git_for_windows_interactive
Allow to run sbt interactive mode in git for windows bash
2016-02-22 02:07:52 -05:00
eugene yokota a4a32340d1 Merge pull request #98 from DarrenBishop/master
-jvm-debug for Windows launch script
2016-02-22 02:07:44 -05:00
Eugene Yokota 843a60734b Fixes #104. Allow individual memory options to be controlled
When a `-J` option is passed in such as `-J-XX:MaxPermSize=1001M`, it
will override only that option.
2016-02-19 17:46:05 -05:00
Mihai Capotă 0d9806b9ff Check memory options in JAVA_TOOL_OPTIONS
JAVA_TOOL_OPTIONS is used by the JVM [1] so it must also be checked for memory options that conflict with the ones set in get_mem_opts.

[1] https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars002.html
2016-02-17 11:26:13 -08:00
Eugene Yokota 40167af167 Handle SBT_OPTS
Fixes sbt/sbt-launcher-package#99 formerly known as sbt/sbt#2194.
get_mem_opts() is a bash function that generates memory related
options. This change makes it return `""` the SBT_OPTS variable
contains memory-related options already.
2016-01-21 23:26:25 -05:00
Darren Bishop dc4a56c2e0 Updated the MS Windows SBT launcher script to get the same/similar behaviour for -jvm-debug as implemented in the *nix shell script launcher.
http://stackoverflow.com/questions/4150776/debugging-scala-code-with-simple-build-tool-sbt-and-intellij/28236830#28236830
2016-01-12 14:50:37 +00:00
Hugo Freire 92a06fc5da Allow to run sbt interactive mode in git for windows bash 2015-12-06 12:56:51 +01:00
William Waites 892de8e7d7 Set resource limit for ${java_cmd} -version in sbt initialisation
Java is a little anti-social and attempts to lazily allocate all
of system memory, even for simple operations such as printing out
the version. This causes sbt to fail to start in environments
where resources are limited (i.e. ulimit(1)). This setup is common
on shared infrastructure such as scientific computing clusters
where because of the resource limit not being specified sbt cannot
be used.

The limit is set to 512MB which ought to be ample and is in any case
the default from sbtconfig.txt. A better patch would use the limit
specified there but it isn't clear that that is worth the effort.
2015-01-20 13:16:33 +00:00
Kousuke Saruta 477f271d45 Fixed wrong debug option 2014-11-21 01:10:48 +09:00
Josh Suereth 09d906de4b Merge pull request #84 from KaiXinXiaoLei/master
Delete unnecessary function
2014-11-20 09:55:27 -05:00
KaiXinXiaoLei bb06511109 Delete unnecessary function 2014-11-13 20:33:20 +08:00
Kousuke Saruta be20baace0 Fixed debug option 2014-11-07 15:02:02 -08:00
Stephen Nancekivell 10e95ef240 use JAVA_OPTS instead of java_opts. 2014-11-02 12:52:56 +11:00
Vladimir Matveev 4334c8672d Fixed incorrect sbtopts lines processing
It used `for` loop which is known to work incorrectly with spaces. This
commit changes it to `while read` loop. This allows more complex options
to be specified in sbtopts files.

Fixes #80
2014-10-30 18:08:57 +03:00
Josh Suereth 7c5bf6f5f6 Merge pull request #75 from raboof/remove_unused_variable_mergable
Remove unused variable script_dir
2014-10-30 11:03:05 -04:00
Roberto Tyley cb12ec1eaa Use MaxMetaspaceSize rather than MaxPermSize on Java 8
@jroper points out that class metadata has to go somewhere, and it's new
name is 'Metaspace' - not 'PermGen':

https://github.com/sbt/sbt-launcher-package/pull/66#issuecomment-57407643

http://java.dzone.com/articles/java-8-permgen-metaspace
2014-10-01 09:24:01 +01:00
Arnout Engelen bb21b9ce09 Remove unused variable script_dir
This variable used to be set based on either $HOME or $script_path. However,
$script_path is no longer set, so when $HOME is unset there will be an
'dirname: missing operand' error message. $script_dir is no longer used
either, so we can safely remove it entirely.
2014-09-11 17:01:54 +02:00
Roberto Tyley f716915f52 Don't pass MaxPermSize to Java 8+
This change stops this annoying message being written to stderr (which can
cause IntelliJ to freak):

```
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
```

See also:

https://bugs.openjdk.java.net/browse/JDK-6964458
https://github.com/sbt/sbt-native-packager/issues/203
https://github.com/typesafehub/activator/issues/422
2014-04-23 00:24:17 +01:00
Roberto Tyley c2deacbcbb Only calculate memory opts if we need them...
...don't bother if won't use them due to them already being defined.
2014-04-23 00:02:12 +01:00
Jason M Ray af97d53ec7 Fixing exit code handling
The endlocal statement will wipe out the ERROR_CODE variable, so we cannot access %ERROR_CODE% after endlocal.
2014-03-06 19:18:16 -08:00
Josh Suereth 8e4dbbaf0c -mem options only used if not otherwise specified directly. 2014-01-06 09:39:29 -05:00
Josh Suereth 163c822ff3 Removing debugging of loading bin helper. 2014-01-06 09:36:50 -05:00
Josh Suereth 1a07150560 Turns out the cygwin fix involved a bit more work.
We can't exec bash, because we can't give over our process to sbt
if we want to turn echo back on later.
2013-07-30 19:49:17 -04:00
Josh Suereth 19f9330c32 Fixes #53 - echo disabled after sbt exits.
Bad flag in bash.  Wish this thing had a compiler....
2013-07-30 19:38:33 -04:00
Josh Suereth 595501304e Refixes #50. Apparently a stealth cd was causing issues here. 2013-07-30 19:27:39 -04:00
Josh Suereth 2b462315e5 Reduce necessary memory 2013-07-14 15:36:07 -04:00
U-jsuereth-win\jsuereth d50c597318 Initial fixes for cygwin issues #50 2013-07-14 15:27:26 -04:00
Josh Suereth 18352254e0 Fix config file loading to do shell expansion first.
from @benevans.
2013-06-29 10:23:49 -04:00
Josh Suereth d16ab1abd1 Migrate universal windows scripts into universal directory.
ALso, added back the commented sbtopts settings.
2013-06-29 10:21:58 -04:00
Josh Suereth 53f9de2735 Migrating to new native packaging plugin abstractions.
* Use new native packaging abstractions for windows mappings.
* Update universal sbt script to be cygwin friendly
* Modify sbt.bat for universal layout
* Fix some stty icanon (no)echo bugs in launcher script.
2013-06-29 10:09:42 -04:00
Josh Suereth a99f6fffbf Upgrade to in-progress sbt-native-packager plugin, including new support for universal->debian/rpm packages. 2013-06-27 16:43:31 -04:00
Josh Suereth 360428a2eb Modify script for new 0.13 behavior. 2013-06-27 10:28:01 -04:00
Josh Suereth 3b9519b793 Fixes to scripts for working in both cygwin and cmd.exe.
THis basically moves from jline.UnixTerminal to just unix.
2013-06-17 12:56:18 -04:00
Josh Suereth bec43f0a55 Cleanup of launcher package to remove special casing of
JANSI.  This, hopefully, will lead to better compatibility
between the many console-enrichment projects, like:
JLINE-scala, JLINE-1.0, JLINE-2.0 and Jansi itself.

Testing to ensue shortly between 0.12.x + 0.13.x
2013-06-17 12:16:10 -04:00
Josh Suereth f8e4ef438b Merge pull request #43 from cdow/die
Replaced last usage of missing 'die' function.
2013-04-29 10:05:46 -07:00
Christopher Dow 206a1af38b Replaced last usage of missing 'die' function. 2013-04-23 07:00:12 -07:00
Christopher Dow b84d1d5b52 Removed unused options from the Linux man page 2013-04-22 18:41:27 -07:00
Christopher Dow e21e271053 Added missing arguments to the Linux man page 2013-04-22 18:41:26 -07:00
Christopher Dow 831455f602 Documentation typos 2013-04-22 18:41:26 -07:00
Bart Schuller 40f2105070 Use realpath to locate relative files, add sh impl
because Mac OSX doesn't have a realpath binary.

This solves the issue where if you symlink to sbt, it
won't be able to locate the bash library and launcher anymore.

You'd want to do that so you can symlink just sbt to /usr/local/bin
without having to put a bash library file there as well.
In particular, this is what we'd like for Mac homebrew.
2012-11-05 21:24:42 +01:00
Stefan Zeiger feb0ffca08 Load sbtconfig.txt in sbt shell script 2012-10-26 15:39:37 +02:00
Josh Suereth f5a22c9576 Merge pull request #35 from sbt/feature/windows-sbt-config
Feature/windows sbt config
2012-10-26 06:07:54 -07:00
Josh Suereth a934680c8d Merge pull request #24 from Atry/full-packaging
Check $JAVA_HOME, and quote arguments and $JAVA_CMD
2012-10-25 09:30:33 -07:00
Josh Suereth db3413e9c1 Fixed issue where TMP environment variable lead to death. 2012-10-25 12:12:28 -04:00
Josh Suereth 37f9d6bf21 Windows config now works. Still an issue with sbt.bat not setting up paths/temp files correctly.... 2012-09-22 10:12:03 -04:00
杨博 7820d3deea Update src/scripts/sbt
Enable space in arguments.
Like: sbt 'run-main com.myhostname.myproject.Main'
2012-09-02 14:31:59 +08:00
杨博 edecd0f1bd Quote arguments and $JAVA_CMD 2012-08-10 12:15:45 +08:00
杨博 1f600d049b Check JAVA_HOME 2012-08-10 12:14:56 +08:00
Josh Suereth 41c21b9ed7 Modified SBT launcher bat file so it can load a config file with default settings. 2012-07-19 11:12:15 -04:00
Josh Suereth 7b69501c8b Fixes for 0.12.0-RC4 release of launcher package. 2012-07-18 10:40:29 -04:00
Josh Suereth 55e0dfdc65 Removed bad practices from sbt bash script.
* No set XYZ arguments allowed.  BAAD sbt practice.
* No longer swaps launcher.  New SBT launchers can handle old SBT.
* SBT script now uses sbt-launch-lib.bash.
2012-07-17 16:37:19 -04:00
Josh Suereth b8173fc41b Removed autodownload from the scripts. 2012-05-09 09:40:10 -04:00
Josh Suereth 70d0b31904 Bumped version numbers for 0.11.3 2012-05-07 08:19:44 -04:00
Josh Suereth ff05caba8b updated to latest native packager, added universal 'zip' generation to the build. 2012-03-15 14:22:10 -04:00
Josh Suereth 0271bf92e2 Improvements to sbt.bat suggested by @retronym 2012-02-02 15:35:38 -05:00
Josh Suereth cea72e8ca7 Adding a library for launcher scripts.
* Moved sbt into src/linux (for now, to disambiguate from windows)
* Created sbt-launch-lib.bash to help scripts which want to use the SBT Launcher
  but are not SBT, e.g. g8 or cs.
2012-02-02 12:11:23 -05:00
Josh Suereth 084480c57b Merge pull request #2 from szeiger/windows-shell-script
Windows shell script
2012-01-18 09:00:37 -08:00
Stefan Zeiger 7e5b93fbf8 Make sbt/jline work properly in Cygwin's MinTTY terminal 2012-01-18 17:32:39 +01:00
Stefan Zeiger bc12a127ee Add sbt launcher script for Cygwin and MSYS to Windows installer 2012-01-18 16:58:30 +01:00
Stefan Zeiger f889a92c34 Reflow License.rtf to make it more readable in the Windows installer 2012-01-18 16:57:48 +01:00
Stefan Zeiger cf14e6ba7b Add Jansi license file (because it is not contained in jansi.jar) 2012-01-18 16:50:17 +01:00
Josh Suereth 7e27da416e Merge branch 'full-packaging' of github.com:sbt/sbt-launcher-package into full-packaging 2012-01-18 09:49:15 -05:00
Josh Suereth 4d490ccfd1 Added no-global option.
Added -no-global option to point -sbt-dir at local location.  Helps deal with bad global plugins.
2012-01-18 09:49:00 -05:00
Stefan Zeiger 2f19508ae5 Package Jansi plus a bootstrap launcher in the MSI installer 2012-01-17 18:03:26 +01:00
Josh Suereth 31780795bc Removing plugins and focusing on launcher script. 2012-01-16 15:24:19 -05:00
Josh Suereth b429b0a246 Removed echo on bat file 2012-01-11 13:07:12 -05:00
Josh Suereth 1a2435f746 Added UI to windows MSI.
* Can now select installation directory of SBT.
* Can optionally add SBT to the path, instead of required.
* Displays a license agreement to the user.
2012-01-11 11:50:57 -05:00
Josh Suereth dea48caddd Modified WIX xml so it *WORKS* and adds sbt to path appropriately. Requires restart for some strange reason. No help on interwebs but a few others noticed the issue. 2011-12-28 09:45:58 -05:00
Josh Suereth eba16354ea First attempt at a windows MSI.
* Windows WIX configuration
* Windows package configuration
* Default lame-o bat file for SBT, until I get external contribs.
2011-12-24 00:46:15 -05:00
Josh Suereth b299acd858 Merge etc branch into SBT script, so we operate more like a linux package. 2011-12-21 14:20:16 -05:00
Josh Suereth 1776f10a5c Test migration to a dedicated packaging plugin. 2011-12-19 21:15:10 -05:00
Josh Suereth 57dd8bc0ac Added a default config file.
Added an /etc/sbt/sbtopts file that contains defaults.
Added a hook to the sbt script to pull in from /etc.
Allowed comments in sbtopts configuration.
2011-12-06 22:37:02 -05:00
Josh Suereth 34fed66022 First cut at debian packaging.
This adds a Debian build section that will create
a new .deb file for the sbt script.  This includes
a new src/debian and src/debian-gzipped directories
for placing files that will be included in the
distribution on debian.

Initial cut at making debian packages
2011-12-06 20:32:24 -05:00
Josh Suereth 521cc31ab9 Fixed task definition with 1 dependency 2011-10-28 11:40:40 -04:00
Josh Suereth 4883983afa Adding new DSL for defining settings such they you can't use tasks in a setting definition 2011-10-28 11:22:28 -04:00
Josh Suereth d72d8808cb Simple task DSL for those of us who are lazy 2011-09-14 14:16:02 -04:00
Josh Suereth 8836f37c9c Modified paulp's template project to be an SBT plugin 2011-09-14 13:01:48 -04:00
Paul Phillips 01c75c8477 Phoned in some tests. Updated the docs again. 2011-08-25 16:01:53 -07:00
Paul Phillips 01b1daf0b9 Main. 2011-08-14 10:17:16 -07:00