Play 2.4.x - Assets duplication

46 views
Skip to first unread message

Miguel Peixoto

unread,
Jun 2, 2016, 1:34:39 PM6/2/16
to play-framework

In a Play 2.4.6 app I'm working on the assets are being duplicated in stage/dist tasks.

Basically it is a app with 3 submodules, with all the assets present in the main public folder. I don't have sbt-web enabled and have no webjars dependencies (but from the jar contents Play may be using them somewhere).

If I use PlayKeys.externalizeResources := false I end up with two jar files in the lib folder:

  •     * myapp-server.myapp-server-0.9.6-assets.jar
  •     * myapp-server.myapp-server-0.9.6.jar

The first one contains the assets, as it should. The 2nd should contain my main project class files, but it has also a META-INF/resources/webjars/myapp-server/0.9.6 folder containing every asset from the public folder!


If I use PlayKeys.externalizeResources := true I get the exact same behavior, but the extra META-INF/resources folder is present in myapp-server.myapp-server-0.9.6-externalized-resources.jar instead.


So how can I get rid of that extra assets folder? I have a lot of assets so that extra folder adds a lot to the package size...




StackOverflow question:  http://stackoverflow.com/questions/37598479/play-2-4-x-assets-duplication

Miguel Peixoto

unread,
Jun 9, 2016, 11:53:39 AM6/9/16
to play-framework
Anyone?

Fong Huang Yee

unread,
Jul 21, 2016, 6:58:09 AM7/21/16
to play-framework
Hi Miguel,

I have the same issue as yours, so far do you found any solution?

Miguel Peixoto

unread,
Aug 1, 2016, 7:57:50 AM8/1/16
to play-framework
Hi. Take a look here and see if it solves your problem. If you still have the same problem, there is an issue in Github you can comment on.
Reply all
Reply to author
Forward
0 new messages