I'm trying to update my activator launcher for my play framework app from older versions to latest one, I was using versions from 1.3.6 to 1.3.8 without any issues with running commands like the following:
ACTIVATOR_BIN_PATH> activator clean compile stage dist
The system cannot find the file [PROJECT_PATH]\play-java\bin\..\conf\sbtconfig.txt.
Did not detect an activator project in this directory.
Load an existing project (has to be executed from the project directory)
or print this help message if no project is found
- activator ui
Open the project in the UI if executed from an existing project
directory, otherwise open a project-creation UI.
- activator new [project-name] [template-name]
Create a new project, prompting for project-name if missing and helping you
find a template if template-name is not provided.
- activator list-templates
Fetch the latest template list and print it to the console.
activator new my-first-app play-java
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.1")
addSbtPlugin("com.github.mmizutani" % "sbt-play-gulp" % "0.1.1")
For now I found some kind of solution for it, moved the activator from
bin folder one step back to [PROJECT_PATH] , and changes some lines
changes valued for
set BIN_DIRECTORY=%~dp0 set BIN_DIRECTORY=%BIN_DIRECTORY:~0,-1% for %%d in (%BIN_DIRECTORY%) do set ACTIVATOR_HOME=%%~dpd set ACTIVATOR_HOME=%ACTIVATOR_HOME:~0,-1%
set BIN_DIRECTORY=%~dp0 set BIN_DIRECTORY=%BIN_DIRECTORY:~0,-1% for %%d in (%BIN_DIRECTORY%) do set ACTIVATOR_HOME=%~dp0 set ACTIVATOR_HOME=%ACTIVATOR_HOME:~0,-1%
SBT_HOME to :
FN to :
For Linux version (bash), changed
sbt_home to this:
declare -r sbt_home="$(realpath "$(dirname "$(realpath "$0")")")"
And seems now its working.
Not really sure if there is a way to fix it without move the activator out of bin, since Linux version seems still working well inside bin, but the windows does not.
But this solution works for now anyway.