Skip to content
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

universal:packageBin not working with spaces in path (windows / play application) #913

Closed
xyztobixyz opened this issue Nov 15, 2016 · 1 comment · Fixed by #1040
Closed

Comments

@xyztobixyz
Copy link

Hi

My Problem:
When I use activator dist to produce a zip file of my play application, unzip this application in a path with spaces
let's say D:\unfinished-path with spaces\myproj-1.0
and run the .bat file I get the following Error:

Error: Unable to access jarfile D:\unfinished-path

build.sbt:

name := """MyProj"""

version := "1.0"

lazy val root = (project in file(".")).enablePlugins(
  PlayJava,
  JavaAppPackaging,
  UniversalPlugin,
  SonarRunnerPlugin,
  LauncherJarPlugin
)

scalaVersion := "2.11.7"

...

mappings in Universal ++= directory(baseDirectory.value / "public")
mappings in Universal += Tuple2(file("conf/production.conf"), "conf/production.conf")
mappings in Universal += Tuple2(file("conf/logback.xml"), "conf/logback.xml")
....

and plugins.sbt

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.4")

Adding " to the generated .bat file in D:\unfinished-path with spaces\myproj-1.0\bin\myproj.bat

on line 132 before %APP_LIB_DIR%... changing it from
set "APP_MAIN_CLASS=-jar %APP_LIB_DIR%\myproj.myproj-1.0-launcher.jar"
to
set "APP_MAIN_CLASS=-jar "%APP_LIB_DIR%\myproj.myproj-1.0-launcher.jar"

lets the application start without the error

@muuki88 muuki88 added universal Zip, tar.gz, tgz and bash issues bug windows and removed universal Zip, tar.gz, tgz and bash issues labels Nov 16, 2016
@muuki88
Copy link
Contributor

muuki88 commented Nov 16, 2016

Use the launcher jar archetype to solve this issue.

#577 fixed that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants