问题
Currently I'm building it in Eclipse using the GWT plugin. I'd like to automate deployment to my development webserver using a script that does the GWT compilation from the command line.
I've followed the directions in the Running Via Maven section of the Getting Started page:
mvn -Phtml integration-test
But it tries to build all the versions, erring out on the Android build (which I'd prefer to skip at the moment) and throws a warning stating the html profile doesn't exist:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] MyPlaynGame Metaproject .......................... SUCCESS [0.375s]
[INFO] MyPlaynGame Core ................................. SUCCESS [1.638s]
[INFO] MyPlaynGame Java ................................. SUCCESS [0.319s]
[INFO] MyPlaynGame HTML ................................. SUCCESS [4.019s]
[INFO] MyPlaynGame Android .............................. FAILURE [0.308s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.903s
[INFO] Finished at: Mon Jun 04 22:17:33 PDT 2012
[INFO] Final Memory: 15M/255M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "html" could not be activated because it does not exist.
How can I get it just to build the html version?
回答1:
mvn clean package -pl core,html
This will only compile the core and html packages. If you only want html, you still need the core package.
The output will be by default in the target folder.
来源:https://stackoverflow.com/questions/10892062/in-playn-how-can-i-build-the-html-version-of-my-project-from-the-command-line