Encoding of a Project Java + hudson - java

I'm have a problem with an server Hudson.
My project java, my workspace and all class have a encoding UTF-8, but when trying to generate a build happens a error with encoding.
I use Ubuntu server 11.04, and to development Ubuntu 11.10.
the error what happening is:
/home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/src/main/java/br/com/digitaldoc/scuv/abstracts/Bean.java:[29,18] error: unmappable character for encoding ASCII
in this line have "ã"
Anyone know how to solve this problem?
This is output of console:
Started by timer
Updating http://192.168.3.100/svn/SCUV/trunk revision: Apr 23, 2012 8:05:42 AM depth:infinity ignoreExternals: false
At revision 40
no change for http://192.168.3.100/svn/SCUV/trunk since the previous build
[workspace] $ mvn clean compile test
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] SCUV
[INFO] SCUV Persistence Module
[INFO] SCUV WebService Module
[INFO] SCUV WebApp Module
[INFO] ------------------------------------------------------------------------
[INFO] Building SCUV
[INFO] task-segment: [clean, compile, test]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] No goals needed for project - skipping
[INFO] No goals needed for project - skipping
[INFO] ------------------------------------------------------------------------
[INFO] Building SCUV Persistence Module
[INFO] task-segment: [clean, compile, test]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: /home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/target (included: [**], excluded: [])
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 15 source files to /home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/src/main/java/br/com/digitaldoc/scuv/inject/ScuvPersistenceAPI.java:[14,33] error: unmappable character for encoding ASCII
/home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/src/main/java/br/com/digitaldoc/scuv/inject/ScuvPersistenceAPI.java:[14,34] error: unmappable character for encoding ASCII
////has more classes with the same error
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Mon Apr 23 08:05:54 BRT 2012
[INFO] Final Memory: 22M/54M
[INFO] ------------------------------------------------------------------------
Recording test results
Performance: Percentage of errors greater or equal than 40% sets the build as unstable
Performance: Percentage of errors greater or equal than 60% sets the build as failure
Performance: Recording JUnit reports '**/TEST*.xml'
Sending e-mails to: asdasd#asdad.com
[DEBUG] Skipping watched dependency update for build: SCUV #7 due to result: FAILURE
Finished: FAILURE

Try to remove the ~/.hudson folder and configure it again.
Tell me if it works.

Related

Could someone please assist with using Maven Clean to make a Java SNAPSHOT

I am new to Java. Am currently trying to modify some library code and then use a SNAPSHOT jar of that to use in my current project. In IntelliJ IDEA CE, I used the Maven Projects Tool Window and hit the Lifecyle -> Clean command to attempt to make the Snapshot.
I saw the following output...
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building <NAME> 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # <NAME> ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.219 s
[INFO] Finished at: 2019-03-22T11:36:03-04:00
[INFO] Final Memory: 8M/245M
[INFO] ------------------------------------------------------------------------
Process finished with exit code 0
Two questions:
1) Where is that SNAPSHOT jar located?
2) How do I make a SNAPSHOT jar that includes all dependencies?
EDIT: Resolved. Please see comments.

Maven release build fails in Jenkins due to failure to build a release version of dependency

Maven release build of EAR app fails due to failure of MODULE 2 to find a release version of MODULE 1.
Maven version is 2.2.1.
Maven command:
--batch-mode release:prepare release:perform -DdryRun=false -Darguments='-Dmaven.test.skip=true' -e
Excerpt from log:
------------------------------------------------------------------------
[INFO] [INFO] Building MODULE 1
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [resources:resources {execution: default-resources}]
[INFO] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] [INFO] skip non existing resourceDirectory /home/jenkins/workspace/repo-trunk-release/target/checkout/module-1-trunk-release/src/main/resources
[INFO] [INFO] [compiler:compile {execution: default-compile}]
[INFO] [INFO] Changes detected - recompiling the module!
[INFO] [INFO] Compiling 120 source files to /home/jenkins/workspace/repo-trunk-release/target/checkout/module-1-trunk-release/target/classes
[INFO] [WARNING] /home/jenkins/workspace/repo-trunk-release/target/checkout/module-1-trunk-release/src/main/java/com/.../SomeClass.java: Some input files use or override a deprecated API.
[INFO] [WARNING] /home/jenkins/workspace/repo-trunk-release/target/checkout/module-1-trunk-release/src/main/java/com/.../SomeClass.java: Recompile with -Xlint:deprecation for details.
[INFO] [WARNING] /home/jenkins/workspace/repo-trunk-release/target/checkout/module-1-trunk-release/src/main/java/com/.../SomeClass.java: Some input files use unchecked or unsafe operations.
[INFO] [WARNING] /home/jenkins/workspace/repo-trunk-release/target/checkout/module-1-trunk-release/src/main/java/com/.../SomeClass.java: Recompile with -Xlint:unchecked for details.
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building MODULE 2
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [resources:resources {execution: default-resources}]
[INFO] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] [INFO] Copying 6 resources
[INFO] Downloading: http:.../nexus/.../module-1-trunk-release/11.0.29/module-1-trunk-release-11.0.29.jar
[INFO] [INFO] Unable to find resource '....apps:module-1-trunk-release:jar:11.0.29' in repository central (http://.../nexus/content/groups/public)
[INFO] Downloading:.http//../nexus/content/repositories/.../module-1-trunk-release/11.0.29/module-1-trunk-release-11.0.29.jar
[INFO] [WARNING] Unable to get resource '....apps:module-1-trunk-release:jar:11.0.29' from repository secondary (http://.../nexus/content/repositories/...-releases): Error transferring file: Connection refused
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Failed to resolve artifact.
[INFO]
[INFO] Missing:
[INFO] ----------
[INFO] 1) ....apps:module-1-trunk-release:jar:11.0.29
[INFO]
[INFO] Try downloading the file manually from the project website.
[INFO]
[INFO] Then, install it using the command:
[INFO] mvn install:install-file -DgroupId=....apps -DartifactId=module-1-trunk-release -Dversion=11.0.29 -Dpackaging=jar -Dfile=/path/to/file
[INFO]
[INFO] Alternatively, if you host your own repository you can deploy the file there:
[INFO] mvn deploy:deploy-file -DgroupId=....apps -DartifactId=module-1-trunk-release -Dversion=11.0.29 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[INFO]
[INFO] Path to dependency:
[INFO] 1) ....apps:module-2:jar:11.0.29
[INFO] 2) ....apps:module-1:jar:11.0.29
[INFO]
[INFO] ----------
[INFO] 1 required artifact is missing.
[INFO]
[INFO] for artifact:
[INFO] ....apps:module-2:jar:11.0.29
[INFO]
[INFO] from the specified remote repositories:
[INFO] repo-pub1 (http://..../nexus/content/repositories/...-releases),
[INFO] repo-pub2 (http://..../nexus/content/groups/public)
[INFO]
[INFO]
[INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 42 seconds
[INFO] [INFO] Finished at: Thu Dec 03 17:18:49 GMT 2015
[INFO] [INFO] Final Memory: 99M/438M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at hudson.maven.agent.Main.launch(Main.java:205)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:154)
at hudson.maven.Maven2Builder.call(Maven2Builder.java:79)
at hudson.maven.Maven2Builder.call(Maven2Builder.java:55)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:174)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 27 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:91)
at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.runLogic(RunPerformGoalsPhase.java:135)
at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:46)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:429)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:381)
at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:170)
... 30 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1'
at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:433)
at org.apache.maven.shared.release.exec.AbstractMavenExecutor.executeGoals(AbstractMavenExecutor.java:114)
at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:85)
... 35 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 27 seconds
[INFO] Finished at: Thu Dec 03 17:18:50 GMT 2015
[INFO] Final Memory: 33M/404M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /home/jenkins/workspace/repo-trunk-release/pom.xml to ....apps/.../11.0.29-SNAPSHOT/repo-trunk-release-11.0.29-SNAPSHOT.pom
channel stopped
Finished: FAILURE
Fixed build and this is how.
I first switched to maven 3.0.2 in the Jenkins config, since as alluded to by
#khmarbaise using maven 2.2.1 was the root of issue.
But then I got wsimport errors, to fix these I removed the encoding property
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
from the parent pom.
I then got a lot of encoding errors, of the type,
error: unmappable character for encoding ANSI_X3.4-1968
so to fix these I added
-Dfile.encoding=UTF8
to the the to MAVEN OPTS props in the Jenkins job config.
The encoding errors were related to the existence of lots of 'strange' chars in JavaDoc and elsewhere in app code.

Get clean machine-friendly Maven lines/xml/json output parseable by scripts in STDOUT?

For example, run this command with for a maven project:
mvn dependency:list
What I need from Maven is only these two lines (cut out from the output below):
com.example.code_samples.maven_dependencies:direct_library:jar:0.0.1-SNAPSHOT:compile
com.example.code_samples.maven_dependencies:indirect_library:jar:0.0.1-SNAPSHOT:compile
Is there a way (CLI --option) to see only this requested info in clean lines, xml, json, ...?
Instead, the output looks more like an unstructured log. It has no known format and mixes all types of information together in STDOUT.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] direct_library
[INFO] dependent_binary
[INFO] indirect_library
[INFO] maven_dependencies
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building direct_library 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexus:8081/nexus/content/repositories/snapshots/com/example/code_samples/maven_dependencies/indirect_library/0.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://nexus:8081/nexus/content/repositories/snapshots/com/example/code_samples/maven_dependencies/indirect_library/0.0.1-SNAPSHOT/maven-metadata.xml (2 KB at 16.1
KB/sec)
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) # direct_library ---
[INFO]
[INFO] The following files have been resolved:
[INFO] junit:junit:jar:4.4:test
[INFO] com.example.code_samples.maven_dependencies:indirect_library:jar:0.0.1-SNAPSHOT:compile
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dependent_binary 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexus:8081/nexus/content/repositories/snapshots/com/example/code_samples/maven_dependencies/direct_library/0.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://nexus:8081/nexus/content/repositories/snapshots/com/example/code_samples/maven_dependencies/direct_library/0.0.1-SNAPSHOT/maven-metadata.xml (2 KB at 86.2 K
B/sec)
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) # dependent_binary ---
[INFO]
[INFO] The following files have been resolved:
[INFO] com.example.code_samples.maven_dependencies:direct_library:jar:0.0.1-SNAPSHOT:compile
[INFO] com.example.code_samples.maven_dependencies:indirect_library:jar:0.0.1-SNAPSHOT:compile
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building indirect_library 3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) # indirect_library ---
[INFO]
[INFO] The following files have been resolved:
[INFO] none
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building maven_dependencies 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) # maven_dependencies ---
[INFO]
[INFO] The following files have been resolved:
[INFO] none
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] direct_library ..................................... SUCCESS [ 0.813 s]
[INFO] dependent_binary ................................... SUCCESS [ 0.026 s]
[INFO] indirect_library ................................... SUCCESS [ 0.013 s]
[INFO] maven_dependencies ................................. SUCCESS [ 0.002 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.065 s
[INFO] Finished at: 2015-03-24T12:10:01+08:00
[INFO] Final Memory: 18M/607M
[INFO] ------------------------------------------------------------------------
UPDATE
Alternatively, I would accept solution to use Maven API to get runtime data like Collection<String> (instead of the text output like above which cannot be parsed reliably).
I took a look at Maven Invoker API, but I don't have hope - my tests showed that it's just a way to invoke Maven from code. And these APIs return no runtime data (just error code with all useful information printed in logs again).
Maven uses standard slf4j logging, wrapped in a plexus container. https://maven.apache.org/maven-logging.html
You should be able to configure the slf4j bindings to provide different output formats as detailed here http://logback.qos.ch/manual/layouts.html#log4jXMLLayout
I'm not familiar with the cleanlines and json logging formats; however, slf4j is probably one of the more adaptable logging packages, so look around for a Formatter and you have a chance at finding one. However, if you don't the last link above also covers the pages on how to write your own logging layout.
I was able to supply a property to save required clean output into a file.
For example, -DoutputFile or -Doutput:
mvn dependency:list -DoutputFile=dependencies.output.txt
mvn help:effective-pom -Doutput=effective.pom.xml
If STDOUT is required, cat the file.
Even though it's not generic, so far, the workaround solves all cases for me.

GWT Code Server not finding a module in a newly generated project using a maven archetype

I've worked with GWT and eclipse for a while now and I wanted to play a bit with maven and the GWT plugin (gwt-maven-plugin, enter link description here). I tried to use it out of eclipse (Luna 4.4), but obviously I didn't do it correctly, as it was extremely brittle to the point that it broke on a regular basis as the IDE overwrote it's settings when I changed something small in the pom.xml. So I decided to take a step back and eliminate the black magic that eclipse is and start a new project from scratch from the command line.
However, I cannot seem to be getting the hang of running the actual application, because when I execute the code server, navigate to the page, I see the following message:
Can't find any GWT Modules on this page.
Obviously, the code server is running, however the module files seem to not have been hosted. AFAIK I see after several hours of educating myself (and finding http://blog.ltgt.net/how-does-gwts-super-dev-mode-work/), there should be a second process actually hosting the code in parallel to the code server. What is the appropriate way of doing this with maven? Should I open a second terminal and run a jetty or something else in parallel to the code server? If so, could someone please give me a hint how I can do it most efficiently?
Thanks in advance!
Here is how I created the project:
mvn archetype:generate \
-DarchetypeGroupId=org.codehaus.mojo \
-DarchetypeArtifactId=gwt-maven-plugin \
-DarchetypeVersion=2.7.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) > generate-sources # standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) < generate-sources # standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) # standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from [org.codehaus.mojo:gwt-maven-plugin:2.7.0] found in catalog remote
Define value for property 'groupId': : com.mytest
Define value for property 'artifactId': : gwtmvntest
Define value for property 'version': 1.0-SNAPSHOT: :
Define value for property 'package': com.mytest: : com.mytest.gwtmvntest
Define value for property 'module': : GwtMvnTest
Confirm properties configuration:
groupId: com.mytest
artifactId: gwtmvntest
version: 1.0-SNAPSHOT
package: com.mytest.gwtmvntest
module: GwtMvnTest
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: gwt-maven-plugin:2.7.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mytest
[INFO] Parameter: artifactId, Value: gwtmvntest
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.mytest.gwtmvntest
[INFO] Parameter: packageInPathFormat, Value: com/mytest/gwtmvntest
[INFO] Parameter: package, Value: com.mytest.gwtmvntest
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: module, Value: GwtMvnTest
[INFO] Parameter: groupId, Value: com.mytest
[INFO] Parameter: artifactId, Value: gwtmvntest
[INFO] project created from Archetype in dir: /private/tmp/mvn/gwtmvntest
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:12 min
[INFO] Finished at: 2015-01-14T12:59:17+01:00
[INFO] Final Memory: 15M/310M
[INFO] ------------------------------------------------------------------------
Here is how I compiled the project:
mvn compile gwt:compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:generateAsync (default) # gwtmvntest ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # gwtmvntest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # gwtmvntest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /private/tmp/mvn/gwtmvntest/target/gwtmvntest-1.0-SNAPSHOT/WEB-INF/classes
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:compile (default-cli) # gwtmvntest ---
[INFO] Compiling module com.mytest.gwtmvntest.GwtMvnTest
[INFO] Compiling 5 permutations
[INFO] Compiling permutation 0...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 4...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 3...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 2...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 1...
[INFO] Compile of permutations succeeded
[INFO] Compilation succeeded -- 13.866s
[INFO] Linking into /private/tmp/mvn/gwtmvntest/target/gwtmvntest-1.0-SNAPSHOT/GwtMvnTest
[INFO] Link succeeded
[INFO] Linking succeeded -- 0.171s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.228 s
[INFO] Finished at: 2015-01-14T13:07:07+01:00
[INFO] Final Memory: 22M/310M
[INFO] ------------------------------------------------------------------------
Here is how I ran the project:
mvn gwt:run-codeserver
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gwt-maven-plugin:2.7.0:run-codeserver (default-cli) > process-classes # gwtmvntest >>>
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:generateAsync (default) # gwtmvntest ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # gwtmvntest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # gwtmvntest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< gwt-maven-plugin:2.7.0:run-codeserver (default-cli) < process-classes # gwtmvntest <<<
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:run-codeserver (default-cli) # gwtmvntest ---
[INFO] Turning off precompile in incremental mode.
[INFO] Super Dev Mode starting up
[INFO] workDir: /var/folders/nk/58gyq85x7l3_mzb5rc0gw42w0000gn/T/gwt-codeserver-5859907708379954718.tmp
[INFO] Loading Java files in com.mytest.gwtmvntest.GwtMvnTest.
[INFO] Module setup completed in 11742 ms
[ERROR] 2015-01-14 13:14:35.800:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
[ERROR] 2015-01-14 13:14:35.833:INFO:oejs.AbstractConnector:Started SelectChannelConnector#127.0.0.1:9876
[INFO]
[INFO] The code server is ready at http://localhost:9876/
With GWT 2.7+ all you need is to launch mvn gwt:run and it'll use SuperDevMode under the cover, with "recompile on load" (instead of using bookmarklets).
Note that gwt:run won't copy your src/main/webapp or your dependencies, so you'll likely have to run mvn war:exploded (or mvn package) as a prerequisite (and every time you change a file in src/main/webapp or you need to refresh your dependencies)
That being said, unless your project is really simple, you should start using distinct Maven modules early for client and server code; this is because Maven insists that you cannot manage a "GWT client-side classpath" and a "server-side classpath" in the same POM.
I published archetypes to help setting everything up: https://github.com/tbroyer/gwt-maven-archetypes (I unfortunately haven't had the time yet to update them to GWT 2.7)
Either that or use Gradle…

Using Maven to build Storm project but cannot find the resulted java project

I got the following output after doing command "mvn eclipse:eclipse".
It showed that the build is successful but no java project was built there.
I could not figure out why.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for storm.cookbook:hello-world:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 105, column 9
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building hello-world 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) # hello-world >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) # hello-world <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) # hello-world ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Wrote settings to /home/junfu/RESEARCH/HelloWorld/.settings/org.eclipse.jdt.core.prefs
[INFO] Wrote Eclipse project for "hello-world" to /home/junfu/RESEARCH/HelloWorld.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.896 s
[INFO] Finished at: 2014-05-30T15:55:26-06:00
[INFO] Final Memory: 10M/114M
[INFO] ------------------------------------------------------------------------

Categories

Resources