-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for absolute paths in classpath #882
Changes from 3 commits
04b2801
5a50c26
8f38b0a
7a5e65b
276168a
4cd42b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
enablePlugins(JavaAppPackaging) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test looks good. However can you split this into two tests? The bash one goes into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
||
name := "absolute-path" | ||
|
||
version := "0.1.0" | ||
|
||
scriptClasspath in bashScriptDefines ++= Seq("/dummy/absolute/path", "relative/path") | ||
|
||
scriptClasspath in batScriptReplacements ++= Seq("x:\\dummy\\absolute\\path", "relative\\path") | ||
|
||
TaskKey[Unit]("run-check") := { | ||
val dir = (stagingDirectory in Universal).value | ||
|
||
val bash = IO.read(dir / "bin" / "absolute-path") | ||
assert(bash contains ":/dummy/absolute/path") | ||
assert(bash contains ":$lib_dir/relative/path") | ||
|
||
val bat = IO.read(dir / "bin" / "absolute-path.bat") | ||
assert(bat contains ";x:\\dummy\\absolute\\path") | ||
assert(bat contains "%APP_LIB_DIR%\\relative\\path") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version")) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
object MainApp extends App { | ||
println("SUCCESS!") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Run the staging and check the script. | ||
> stage | ||
> run-check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused about the
"c:\\".length
definition. It looks like putting documentation into the source code.If you have to check for a path longer than 4 characters do so explicitly and add a small comment for what reason. At first I thought you were checking if the path starts with `c:\`` ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok will do it in a few minutes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done