In PlayN, how can I build the HTML version of my project from the command line? - gwt

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?

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.

Related

IntelliJ No Source to compile with Maven Error

I have created a maven project in intellij and added scala framework support
This project name is sparkexamples and I added the necessary dependencies
Below is the project directory structure .
S:\surender\intellij_1\sparkexamples
S:\surender\intellij_1\sparkexamples\src\main\scala\com\test\spark\examples\DemoMain.scala
S:\surender\intellij_1\sparkexamples\pom.xml
I went inside S:\surender\intellij_1\sparkexamples from command prompt and started running the below mvn commands
mvn clean compile
mvn package
After running mvn package I could see in cons
S:\surender\intellij_1\sparkexamples>mvn clean compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building spark-examples 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # spark-examples ---
[INFO] Deleting S:\surender\intellij_1\sparkexamples\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spark-exam
ples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # spark- examples
---
[INFO] No sources to compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.950 s
[INFO] Finished at: 2017-03-28T10:46:18+01:00
[INFO] Final Memory: 13M/224M
[INFO] ------------------------------------------------------------------------
S:\surender\intellij_1\sparkexamples>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building spark-examples 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spark-exam
ples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # spark-examples
---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # sp
ark-examples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory S:\surender\intellij_1\sparkexamples\
src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # spark-e
xamples ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # spark- examples ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # spark-examples ---
[INFO] Building jar: S:\surender\intellij_1\sparkexamples\target\spark-examples-
1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.651 s
[INFO] Finished at: 2017-03-28T10:47:09+01:00
[INFO] Final Memory: 15M/225M
[INFO] ------------------------------------------------------------------------
S:\surender\intellij_1\sparkexamples>ole that **No Sources to compile**
Could Someone help me to resolve this issue?
The Maven compiler is "incremental" by default. (That means that just the compile goal is "incremental", Maven still makes you go through the whole lifecycle, by default.)
When you first did:
mvn clean compile
Your sources got compiled. (Lifecycles: you ran up to and including the compile lifecycle phase.)
When you then did:
mvn package
The compiler was again invoked, and observed that it had already done its work previously. (Lifecycles: package is a lifecycle phase extending the compile phase.)
This is what seems to happen. Disclaimer: you only included output for mvn package. If your mvn compile also tells you that there's nothing to compile, something else going on, and you'd probably want to rephrase your question (or post a new one).
Also, if this lifecycle thing is messing you up, one more hint: compile is a lifecycle phase, and many people confuse it with doing a particular "task", which it is not. From mvn -h:
usage: mvn [options] [<goal(s)>] [<phase(s)>]
Again, compile is a phase, if you wanted to do a goal ("task"), in case of doing just compilation that'd be: compiler:compile (name_of_the_plugin:name_of_the_goal).

Cannot deploy my application on OpenShift: "Failed to execute: 'control deploy' for /var/lib/openshift/XXX/jbossews"

When pushing new changes to my OpenShift repository, the application gets well built but cannot get deployed:
Repository ssh://XXX#myapp-mydomain.rhcloud.com/~/git/app.git/
The jbossews cartridge is already stopped
Stopping MongoDB cartridge
Stopping RockMongo cartridge
Waiting for stop to finish
Waiting for stop to finish
Building git ref 'master', commit 9a591e1
Using Maven mirror /var/lib/openshift/XXX/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml
Apache Maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500)
Maven home: /usr/share/java/apache-maven-3.0.4
Java version: 1.7.0_85, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.32-504.34.1.el6.x86_64", arch: "i386", family: "unix"
Found pom.xml... attempting to build with 'mvn --global-settings /var/lib/openshift/XXX/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml clean package -Popenshift -DskipTests'
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myapp 1.0.0
[INFO] ------------------------------------------------------------------------
...
... downloading lot of Maven dependencies
...
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 20 source files to /var/lib/openshift/XXX/app-root/runtime/repo/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # myapp ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # myapp ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) # myapp ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) # myapp ---
...
... downloading lot of Maven dependencies
...
[INFO] Packaging webapp
[INFO] Assembling webapp [myapp] in [/var/lib/openshift/XXX/app-root/runtime/repo/target/myapp-1.0.0]
[INFO] Processing war project
[INFO] Copying webapp webResources [/var/lib/openshift/XXX/app-root/runtime/repo/src/main/webapp] to [/var/lib/openshift/XXX/app-root/runtime/repo/target/myapp-1.0.0]
[INFO] Copying webapp webResources [/var/lib/openshift/XXX/app-root/runtime/repo/src/main/webapp] to [/var/lib/openshift/XXX/app-root/runtime/repo/target/myapp-1.0.0]
[INFO] Copying webapp resources [/var/lib/openshift/XXX/app-root/runtime/repo/src/main/webapp]
[INFO] Webapp assembled in [4153 msecs]
[INFO] Building war: /var/lib/openshift/XXX/app-root/runtime/repo/webapps/ROOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:03.312s
[INFO] Finished at: Sun Oct 04 13:23:39 EDT 2015
[INFO] Final Memory: 24M/160M
[INFO] ------------------------------------------------------------------------
Preparing build for deployment
Deployment id is 686f0e29
Activating deployment
Starting MongoDB cartridge
Waiting for mongo to start...
Starting RockMongo cartridge
rm: cannot remove `/var/lib/openshift/XXX/jbossews//conf/web.xml': No such file or directory
-------------------------
Git Post-Receive Result: failure
Activation status: failure
Activation failed for the following gears:
XXX (Error activating gear: CLIENT_ERROR: Failed to execute: 'control deploy' for /var/lib/openshift/XXX/jbossews
#<IO:0x00000001230388>
#<IO:0x00000001230310>
)
Deployment completed with status: failure
postreceive failed
Any idea what's happening?
I've created an app with all the cartridges you mentioned and everything works fine to me. However there's a difference: my web.xml configuration file is somewhere else, at src/main/webapp/WEB-INF/web.xml. My bet is that wherever you're calling this you have the wrong path to it, as you can see on:
rm: cannot remove `/var/lib/openshift/XXX/jbossews//conf/web.xml': No such file or directory
FYI, typically, when you get the error Failed to execute: 'control deploy' it means that something in the process of deployment has gone wrong and it stopped, so that error message is not the actual error.
I manually created an empty file /var/lib/openshift/XXX/jbossews/conf/web.xml, and this solved the issue: the rm command ended successfully, the deployment succeeded.

do not pass correct settings.xml to Maven Release Plugin

i have the following issue with eclipse , i am running an mvn install ,
try to build my project.
no idea what do with this error
please help
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building superman 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-hpi-plugin:1.95:validate (default-validate) # superman ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-maven) # superman ---
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Build with Maven 3.0.4 or later. Maven 3.0 through 3.0.3 inclusive do not pass correct settings.xml to Maven Release Plugin.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.032s
[INFO] Finished at: Thu Dec 04 11:24:21 CST 2014
[INFO] Final Memory: 22M/355M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce (enforce-maven) on project superman: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
That means simply that you are using an older Maven version. Based on the rule you have to use Maven 3.0.5+ that's the problem. The problem with Maven 3.0...3.0.3 had problems with informations from settings.xml to the release plugin which produces problems.
so after all that , you have to go to
window> preferences > maven > installations > and change the settings in there to the new install on your work station . that why eclipse is going to use the new maven 3.2.3
issue solved

squashTA falied to configure plugin parameters (Eclipse)

I've just install squashTA and I try to do this tutorial
https://sites.google.com/a/henix.fr/wiki-squash-ta/tutorials/tuto-3-how-to-test-a-web-application-with-database-checks-with-squash-ta-and-selenium
but when I try to run I have this message in console output:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - [name of my company]m:0.0.1-SNAPSHOT
[INFO] task-segment: [integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: org.squashtest.ta:squash-ta-maven-plugin:1.6.0-RELEASE
Cause: Cannot find setter nor field in org.squashtest.ta.commons.exporter.html.HtmlSuiteResultExporter for 'exportAttached'
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Tue Aug 20 10:53:10 CEST 2013
[INFO] Final Memory: 24M/59M
[INFO] ------------------------------------------------------------------------
Is there anybody, who had the same problem as my?
Thanks for any help!
Problem solved. During "run configurations" I choosed wrong option in "Maven Runtime". In my eclipse, it should be option "embedded", while I choosed "external" from my local drive.
For your information, Squash TA is now called Squash AUTOM and is based on an open source orchestrator called OpenTestFactory
More information:
https://www.squashtest.com/product-squash-autom?lang=en
http://opentestfactory.org/

Error when running build as native Sencha

Mac-mini-2:sink eit$ sencha app build native
[INFO] Deploying your application to /path/to/www/sink/build/package
[INFO] Copied sdk/sencha-touch.js
[INFO] Copied app.js
[INFO] Copied resources/css/app.css
[INFO] Copied resources/images
[INFO] Copied resources/icons
[INFO] Copied resources/loading
[INFO] Resolving your application dependencies...
[INFO] Found 139 dependencies. Concatenating all into app.js...
[INFO] Processed sdk/sencha-touch.js
[INFO] Minifying sdk/sencha-touch.js
[INFO] Processed app.js
[INFO] Minifying app.js
[INFO] Minifying resources/css/app.css
[INFO] Minified sdk/sencha-touch.js
[INFO] Minified app.js
[INFO] Minified resources/css/app.css
[INFO] Generated app.json
[INFO] Embedded microloader into index.html
[INFO] Packaging your application as a native app...
[INFO] The application was successfully packaged
Failed to execute system command while signing application with error 256
Failed to package application
[ERROR] codesign_allocate: for architecture armv7 object: /path/to/www/sink/build/native//Sencha Touch 2 Packaging.app/stbuild_template malformed object (unknown load command 8)
/path/to/www/sink/build/native//Sencha Touch 2 Packaging.app: object file format invalid or unsuitable
How can I fix the above issue?
I got this error when I included the certificate file name in the certificatePath & didn't include 'certificatePassword' directive.
I hope this helps, but I'm fairly new to all this & fumbling around through various problems I'm having.