Explanation of PlayKeys.externalizeResources

600 views
Skip to first unread message

Michael Slinn

unread,
Aug 28, 2015, 6:08:55 PM8/28/15
to play-framework
I see that PlayKeys.externalizeResources controls the generation of target/scala-2.1x/webapp_2.1x-0.y.z-sans-externalized.jar, and apparently it was introduced because of a JPA-related problem. Can anyone explain what the webapp_2.1x-0.y.z-sans-externalized.jar is for?

Thanks,

Mike

Matthias Kurz

unread,
Jan 15, 2016, 7:55:29 AM1/15/16
to play-framework
No, it was not introduced because of a JPA releated problem.

It was first introduced with this pull request fixing this issue.
Then this bug occured, which got fixed by this pull request which also explains what the sans-externalized jar does:
  • Build an additional sans-externalized jar that doesn't contain the externalized resources when externalized resources is true
  • Include this jar in the script classpath, and exclude the normal jar, when externalized resources is true
Original this feature had nothing to do with JPA at all. Introducing and enabling it by default by setting externalizeResources=true caused problems with JPA, that's why it's recommended to set it to false again when using JPA, so you get the same behaviour as before the feature was introduced.

Hope that answers your questions.

Matthias
Reply all
Reply to author
Forward
0 new messages