-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
749 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: scala | ||
scala: | ||
- 2.10.3 | ||
|
||
script: sbt ++$TRAVIS_SCALA_VERSION scripted | ||
|
||
branches: | ||
only: | ||
- develop | ||
- feature/sbt-0.12.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
@REM ---------------------------------------------------------------------------- | ||
@REM Licensed to the Apache Software Foundation (ASF) under one | ||
@REM or more contributor license agreements. See the NOTICE file | ||
@REM distributed with this work for additional information | ||
@REM regarding copyright ownership. The ASF licenses this file | ||
@REM to you under the Apache License, Version 2.0 (the | ||
@REM "License"); you may not use this file except in compliance | ||
@REM with the License. You may obtain a copy of the License at | ||
@REM | ||
@REM http://www.apache.org/licenses/LICENSE-2.0 | ||
@REM | ||
@REM Unless required by applicable law or agreed to in writing, | ||
@REM software distributed under the License is distributed on an | ||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
@REM KIND, either express or implied. See the License for the | ||
@REM specific language governing permissions and limitations | ||
@REM under the License. | ||
@REM ---------------------------------------------------------------------------- | ||
|
||
@REM ---------------------------------------------------------------------------- | ||
@REM sbt-pack launch script | ||
@REM ---------------------------------------------------------------------------- | ||
|
||
@echo off | ||
|
||
@REM set %HOME% to equivalent of $HOME | ||
if "%HOME%" == "" (set HOME=%HOMEDRIVE%%HOMEPATH%) | ||
|
||
set ERROR_CODE=0 | ||
|
||
@REM set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" @setlocal | ||
|
||
@REM ==== START VALIDATION ==== | ||
if not "%JAVA_HOME%" == "" goto OkJHome | ||
|
||
for /f %%j in ("java.exe") do ( | ||
set JAVA_EXE=%%~$PATH:j | ||
goto init | ||
) | ||
|
||
:OkJHome | ||
if exist "%JAVA_HOME%\bin\java.exe" ( | ||
SET JAVA_EXE="%JAVA_HOME%\bin\java.exe" | ||
goto init | ||
) | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is set to an invalid directory. | ||
echo JAVA_HOME = %JAVA_HOME% | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation | ||
echo. | ||
goto error | ||
|
||
:init | ||
@REM Decide how to startup depending on the version of windows | ||
|
||
@REM -- Win98ME | ||
if NOT "%OS%"=="Windows_NT" goto Win9xArg | ||
|
||
@REM -- 4NT shell | ||
if "%@eval[2+2]" == "4" goto 4NTArgs | ||
|
||
@REM -- Regular WinNT shell | ||
set CMD_LINE_ARGS=%* | ||
goto endInit | ||
|
||
@REM The 4NT Shell from jp software | ||
:4NTArgs | ||
set CMD_LINE_ARGS=%$ | ||
goto endInit | ||
|
||
:Win9xArg | ||
@REM Slurp the command line arguments. This loop allows for an unlimited number | ||
@REM of agruments (up to the command line limit, anyway). | ||
set CMD_LINE_ARGS= | ||
:Win9xApp | ||
if %1a==a goto endInit | ||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 | ||
shift | ||
goto Win9xApp | ||
|
||
@REM Reaching here means variables are defined and arguments have been captured | ||
:endInit | ||
|
||
SET PROG_HOME=%~dp0.. | ||
SET PSEP=; | ||
|
||
@REM Start Java program | ||
:runm2 | ||
SET CMDLINE=%JAVA_EXE% %JVM_OPT% {{{JVM_OPTS}}} -cp "{{{EXTRA_CLASSPATH}}}%PROG_HOME%\lib\*;" -Dprog.home="%PROG_HOME%" -Dprog.version="{{{PROG_VERSION}}}" {{{MAIN_CLASS}}} %CMD_LINE_ARGS% | ||
%CMDLINE% | ||
if ERRORLEVEL 1 goto error | ||
goto end | ||
|
||
:error | ||
if "%OS%"=="Windows_NT" @endlocal | ||
set ERROR_CODE=1 | ||
|
||
:end | ||
@REM set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" goto endNT | ||
|
||
@REM For old DOS remove the set variables from ENV - we assume they were not set | ||
@REM before we started - at least we don't leave any baggage around | ||
set JAVA_EXE= | ||
set CMD_LINE_ARGS= | ||
set CMDLINE= | ||
set PSEP= | ||
goto postExec | ||
|
||
:endNT | ||
@endlocal | ||
|
||
:postExec | ||
exit /B %ERROR_CODE% | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/sbt-test/sbt-pack/archive-modules/module1/src/main/scala/Module1.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package sample | ||
|
||
object Module1 { | ||
|
||
def main(args:Array[String]) { println("hello module1") } | ||
|
||
} | ||
|
5 changes: 5 additions & 0 deletions
5
src/sbt-test/sbt-pack/archive-modules/module2/src/main/scala/Module2.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package sample | ||
|
||
object Module2 { | ||
def main(args:Array[String]) { println("hello module2") } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import sbt._ | ||
import sbt.Keys._ | ||
import xerial.sbt.Pack._ | ||
|
||
|
||
object Build extends sbt.Build { | ||
|
||
val commonSettings = Defaults.defaultSettings ++ | ||
// Add pack, pack-archive commands | ||
packSettings ++ | ||
// publish tar.gz archive to the repository (since sbt-pack-0.3.6) | ||
publishPackArchive ++ | ||
Seq( | ||
scalaVersion := "2.10.3", | ||
version := "0.1", | ||
crossPaths := false | ||
) | ||
|
||
object ProgMap { | ||
val m1 = Map("m1" -> "sample.Module1") | ||
val m2 = Map("m2" -> "sample.Module2") | ||
} | ||
|
||
lazy val root = Project( | ||
id = "archive-modules", | ||
base = file("."), | ||
settings = commonSettings ++ | ||
Seq( | ||
packMain := ProgMap.m1 ++ ProgMap.m2 | ||
) | ||
) aggregate(module1, module2) | ||
|
||
lazy val module1 = Project( | ||
id = "module1", | ||
base = file("module1"), | ||
settings = commonSettings ++ | ||
Seq( | ||
packMain := ProgMap.m1, | ||
libraryDependencies += "org.xerial" % "xerial-core" % "3.2.1" | ||
) | ||
) | ||
|
||
lazy val module2 = Project( | ||
id = "module2", | ||
base = file("module2"), | ||
settings = commonSettings ++ | ||
Seq( | ||
packMain := ProgMap.m2, | ||
libraryDependencies += "org.xerial.snappy" % "snappy-java" % "1.1.0" | ||
) | ||
) | ||
|
||
} |
Oops, something went wrong.