playframework icon indicating copy to clipboard operation
playframework copied to clipboard

project asset jar not copied to stage/distribution in a multi-module project

Open gokhanoner opened this issue 6 years ago • 3 comments

Plugin version 0.6

After running gradle stage/dist, I can see that 2 jar files created under build/libs folder, one for jar/scala classes, and one for assets, the public folder. These files are generally web assets, like js/html files. I can see that module jar/asssets files are copied but for main project, only project.jar file present in the build/stage/main/lib, folder, not project-assets.jar. This causes app start but without ant static Web files. When manually copying assets.jar, app works as expected.

gokhanoner avatar Jul 17 '19 03:07 gokhanoner

Same problem here, I have all the submodules assets jar in the zip but for the main project the assets jar is missing...

PaulFridrick avatar Oct 14 '19 15:10 PaulFridrick

I had the same problem. The way I solved it was to set the version before applying the play plugin.

The reason could be as following:

  1. The asset jar to be copied was specified at the moment of the plugin application. The jar name is project-assets.jar
  2. After plugin application is done, a version number is specified, the actual jar created by the task create createPlayAssetsJar then has different name: project-assets-version.jar

This causes the CopySpec to fail because it tried to copy a non-existent file.

rt83 avatar Oct 15 '19 10:10 rt83

id 'org.gradle.playframework' version '0.12' apply false the apply false resolves the issue if anyone is still running into this issue.

sugarcrm-dmoore avatar May 26 '22 15:05 sugarcrm-dmoore