-
Notifications
You must be signed in to change notification settings - Fork 58
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
activator dist does not run grunt dist target #90
Comments
Is your grunt task running successfully without any error? The dist task depends on the grunt task so if grunt fails, dist will not be run. |
Yes, the grunt task executes without failure. I currently have a 'dev' task and a 'dist' task and the default task is set to run 'dev'. If I run dev and dist individually, I can see I get an 'app' folder and 'dist' folder created respectively. If I clean both of these folders and then run 'activator dist', I can see in the output that no task is supplied to the grunt build and so it runs 'dev', which is run by default. Once the activator has finished running, I can see an 'app' folder but no 'dist' folder. My current workaround is to run the 'dist' task manually before performing 'activator dist'. This then picks up the output from my grunt dist build. Thanks. |
The Can you check if |
It's probably already too late, but for me "sbt dist" really executes a grunt dist if my command console is executed as administrator :) |
Hi Shiti, many apologies - I know it's been a while. I haven't had time to look into this but am now starting to take a second look. Thanks for the comment gleibfried, unfortunately that seems to have no effect for me. Running sbt dist produces the same behaviour as with the activator. I therefore decided to start from scratch and create a really simple example. I first followed these instructions to create a base Play project: https://www.playframework.com/documentation/2.5.x/NewApplication After creating the new scala seed project, I followed the instructions on your repo readme: https://github.com/tuplejump/play-yeoman/tree/v0.9.0 The activator generated a project using play 2.5.2 so I followed the instructions for play-yeoman 0.9.0. After doing so, I found that it wasn't running grunt at all during dist. To get around this, I had to add 'Yeoman.withTemplates' to the bottom of build.sbt. Once that was done, I am seeing the same behaviour before, 'sbt dist' runs the default grunt task rather than grunt dist. What seems to be interesting this time however is that the built jar in target/universal now no longer picks up the ui/dist directory if I run 'grunt dist' manually. I therefore can't make use of this at all at the moment (running from dev works fine though - I can navigate to the resources via /ui). I have uploaded the small project here: https://bitbucket.org/jcd_clark/playyeomandisttest The gruntfile has two tasks: dev and dist. dev will copy a file to 'app' (sorry this was poorly named, should have been 'dev') whilst dist will copy a different file to 'dist'. Running the grunt tasks through the sbt console works fine, including specifying dist, dev etc. It's just the dist build that doesn't seem to be running the right grunt task nor copying the files into the built play jar. Many thanks for investigating! Apologies again for the slow response. James |
Hi, I am running into this issue as well.
any idea why? |
Hi.
When using the activator to do a dist build (activator dist), the command that is executed by the play-yeoman plugin is not dist, but rather just a plain grunt call.
Whilst my Scala and sbt knowledge are next to nothing, it looks like the gruntDist definition in play-yeoman/sbt-yeoman/app/com/tuplejump/sbt/yeoman/Yeoman.scala calls runGrunt with no arguments (no 'dist' argument).
Many thanks!
James
The text was updated successfully, but these errors were encountered: