Reputation: 1733
I realize, from the documentation (http://www.playframework.org/documentation/1.2.1/deployment), that if the Play! Framework is already installed and configured properly then creating a deployable war is as simple as running the command:
play war myapp -o myapp.war
But what if the Play! Framework is not installed on the target machine and requirements call for a standard war to be created from either an Ant or Maven build script? How would one go about creating a build script or pom file that could leverage the Play! Framework API to generate the desired war artifact without permanently installing the framework to the target machine. Can this be done easily?
Upvotes: 1
Views: 1101
Reputation: 116
Typically this would be done as follows:
I don't believe it makes since to attempt to build a Play application WAR without having Play installed. The WAR needs to be generated on a machine where Play is installed and then distributed to the other machines as a packaged WAR (preferably via a shared Maven repo server, such as Archiva or Nexus).
Upvotes: 1
Reputation: 10404
As far as I'm aware of, Play framework is packed together in the war file with your app. So trying to build without having play installed or available seems quite difficult.
Upvotes: 0
Reputation: 54944
Not straight forward. If you look at the python scripts for the play war
command, you will see that quite a lot of processing goes on.
You could replicate this into an ANT or Maven script, but you then lose any backwards compatibility you have to future upgrades. I would suggest either ensuring the relevant Play framework files are included, so that the build can be done, or doing the WAR build on a central build server and distributing (or load from CVS/SVN/GIT) the WAR file to target machine(s).
Upvotes: 2