Source root with gwt 2.8-rc1

101 views
Skip to first unread message

Gražvydas Valeika

unread,
Jul 29, 2016, 3:47:19 PM7/29/16
to codehaus-mojo-gwt-...@googlegroups.com
Hi,

I just tried to rebuild my project with gwt 2.8.0-rc1 using gwt-maven-plugin net.ltgt.gwt.maven 1.0-rc-6.

Strange thing happened with project source roots. 

Compiler can see only my project's src/main/resources directory and ignores src/main/java.

After I moved src/main/java content to src/main/resources - project builds successfully.

Earlier I could successfully build project using same maven configuration and gwt 2.8-SNAPSHOT.

Any ideas?

Grazvydas  

Thomas Broyer

unread,
Jul 30, 2016, 5:56:15 AM7/30/16
to Codehaus Mojo gwt-maven-plugin Users
This is really strange. Can you run Maven with -X and check the classpath and arguments passed to GWT? (you may want to also pass -Dgwt.logLevel=INFO)

Gražvydas Valeika

unread,
Jul 30, 2016, 10:03:30 AM7/30/16
to codehaus-mojo-gwt-...@googlegroups.com
On Sat, Jul 30, 2016 at 12:56 PM, Thomas Broyer <t.br...@gmail.com> wrote:
This is really strange. Can you run Maven with -X and check the classpath and arguments passed to GWT? (you may want to also pass -Dgwt.logLevel=INFO)

Hi,

I have run with your parameters, but can't see any mentions nor about gwt-dev.jar nor com.google.gwt.dev.Compiler. Could you point more directly how to check what arguments are passed to GWT?

compileSourceRoots and extensive sourcepath are defined in maven-compiler-plugin sections, but, I suspect, they are not related to my problem.

Sections, related to gwt-maven-plugin, as I see them. Full output, I guess, would be too noisy for list:


[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal:          net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-6:compile (default)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <deploy default-value="${project.build.directory}/gwt/deploy">/home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/deploy</deploy>
  <draftCompile default-value="false">${gwt.draftCompile}</draftCompile>
  <failOnError default-value="false">${gwt.failOnError}</failOnError>
  <forceCompilation default-value="false">${gwt.forceCompilation}</forceCompilation>
  <jvmArgs>
    <jvmArg>-Xms512m</jvmArg>
    <jvmArg>-Xmx1300m</jvmArg>
  </jvmArgs>
  <localWorkers>1</localWorkers>
  <logLevel>${gwt.logLevel}</logLevel>
  <moduleName>com.optimizavimas.metrika.Metrika</moduleName>
  <optimize default-value="9">${gwt.optimize}</optimize>
  <project default-value="${project}"/>
  <skipCompilation default-value="false">${gwt.skipCompilation}</skipCompilation>
  <sourceLevel>${maven.compiler.source}</sourceLevel>
  <staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
  <style default-value="OBFUSCATED">${gwt.style}</style>
  <webappDirectory default-value="${project.build.directory}/${project.build.finalName}"/>
  <workDir default-value="${project.build.directory}/gwt/work"/>
</configuration>
[DEBUG] -----------------------------------------------------------------------


[INFO] --- gwt-maven-plugin:1.0-rc-6:compile (default) @ Metrika ---
[DEBUG] Configuring mojo net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-6:compile from plugin realm ClassRealm[extension>net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-6, parent: sun.misc.Launcher$AppClassLoader@70dea4e]
[DEBUG] Configuring mojo 'net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-6:compile' with basic configurator -->
[DEBUG]   (f) deploy = /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/deploy
[DEBUG]   (f) draftCompile = false
[DEBUG]   (f) failOnError = false
[DEBUG]   (f) forceCompilation = false
[DEBUG]   (f) jvmArgs = [-Xms512m, -Xmx1300m]
[DEBUG]   (f) localWorkers = 1
[DEBUG]   (f) logLevel = INFO
[DEBUG]   (f) moduleName = com.optimizavimas.metrika.Metrika
[DEBUG]   (f) optimize = 9
[DEBUG]   (f) project = MavenProject: Optimizavimo-sprendimai:Metrika:1.0-SNAPSHOT @ /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/pom.xml
[DEBUG]   (f) skipCompilation = false
[DEBUG]   (f) staleMillis = 0
[DEBUG]   (f) style = OBFUSCATED
[DEBUG]   (f) webappDirectory = /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika
[DEBUG]   (f) workDir = /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/gwt/work
[DEBUG] -- end configuration --
[DEBUG] /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/com.optimizavimas.metrika.Metrika/com.optimizavimas.metrika.Metrika.nocache.js file found or is not a file: recompiling
[INFO] Compiling module com.optimizavimas.metrika.Metrika
[INFO]    Resolving com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator
[INFO]       Found type 'com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator'
[INFO]          Found type 'javax.validation.constraints.DecimalMax'
[INFO]             [WARN] Detected warnings related to 'javax.validation.Constraint'.   Is validation-<version>.jar on the classpath?
[INFO]             Specify -logLevel DEBUG to see all errors.
[INFO]             [WARN] Ignoring unresolvable annotation type javax.validation.Constraint
[INFO]    Finding entry point classes
[INFO]       [ERROR] Hint: Check that the type name 'com.optimizavimas.metrika.client.MainEntry' is really what you meant
[INFO]       [ERROR] Hint: Check that your classpath includes all required source roots  



Thomas Broyer

unread,
Jul 30, 2016, 8:11:46 PM7/30/16
to Codehaus Mojo gwt-maven-plugin Users


On Saturday, July 30, 2016 at 4:03:30 PM UTC+2, Gražvydas Valeika wrote:
On Sat, Jul 30, 2016 at 12:56 PM, Thomas Broyer <t.br...@gmail.com> wrote:
This is really strange. Can you run Maven with -X and check the classpath and arguments passed to GWT? (you may want to also pass -Dgwt.logLevel=INFO)

Hi,

I have run with your parameters, but can't see any mentions nor about gwt-dev.jar nor com.google.gwt.dev.Compiler. Could you point more directly how to check what arguments are passed to GWT?

Oh sh** they're only displayed for gwt:codeserver and gwt:devmode, not with gwt:compile!
Would you mind testing with 1.0-SNAPSHOT?
With 1.0-rc-6, only option would be debugging the plugin (using mvnDebug instead of mvn, and plugging a Java debugger)

Gražvydas Valeika

unread,
Jul 30, 2016, 8:40:08 PM7/30/16
to codehaus-mojo-gwt-...@googlegroups.com

On Sun, Jul 31, 2016 at 3:11 AM, Thomas Broyer <t.br...@gmail.com> wrote:
1.0-SNAPSHOT

Ok, same output places with 1.0-SNAPSHOT. Can't see anything nor about src/main/java nor about src/main/resources:

[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal:          net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT:compile (default)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <deploy default-value="${project.build.directory}/gwt/deploy">/home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/deploy</deploy>
  <draftCompile default-value="false">${gwt.draftCompile}</draftCompile>
  <failOnError default-value="false">${gwt.failOnError}</failOnError>
  <forceCompilation default-value="false">${gwt.forceCompilation}</forceCompilation>
  <jvmArgs>
    <jvmArg>-Xms512m</jvmArg>
    <jvmArg>-Xmx1300m</jvmArg>
  </jvmArgs>
  <localWorkers>1</localWorkers>
  <logLevel>${gwt.logLevel}</logLevel>
  <moduleName>com.optimizavimas.metrika.Metrika</moduleName>
  <optimize default-value="9">${gwt.optimize}</optimize>
  <project default-value="${project}"/>
  <skipCompilation default-value="false">${gwt.skipCompilation}</skipCompilation>
  <sourceLevel>${maven.compiler.source}</sourceLevel>
  <staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
  <style default-value="OBFUSCATED">${gwt.style}</style>
  <webappDirectory default-value="${project.build.directory}/${project.build.finalName}"/>
  <workDir default-value="${project.build.directory}/gwt/work"/>
</configuration>
[DEBUG] -----------------------------------------------------------------------


and 


[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:compile (default) @ Metrika ---
[DEBUG] Configuring mojo net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT:compile from plugin realm ClassRealm[extension>net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@70dea4e]
[DEBUG] Configuring mojo 'net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT:compile' with basic configurator -->
[DEBUG]   (f) deploy = /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/deploy
[DEBUG]   (f) draftCompile = false
[DEBUG]   (f) failOnError = false
[DEBUG]   (f) forceCompilation = false
[DEBUG]   (f) jvmArgs = [-Xms512m, -Xmx1300m]
[DEBUG]   (f) localWorkers = 1
[DEBUG]   (f) logLevel = INFO
[DEBUG]   (f) moduleName = com.optimizavimas.metrika.Metrika
[DEBUG]   (f) optimize = 9
[DEBUG]   (f) project = MavenProject: Optimizavimo-sprendimai:Metrika:1.0-SNAPSHOT @ /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/pom.xml
[DEBUG]   (f) skipCompilation = false
[DEBUG]   (f) staleMillis = 0
[DEBUG]   (f) style = OBFUSCATED
[DEBUG]   (f) webappDirectory = /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika
[DEBUG]   (f) workDir = /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/gwt/work
[DEBUG] -- end configuration --
[DEBUG] /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/com.optimizavimas.metrika.Metrika/com.optimizavimas.metrika.Metrika.nocache.js file found or is not a file: recompiling
[DEBUG] Classpath: /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/classes:/home/gv/.m2/repository/com/google/gwt/gwt-user/2.8.0-rc1/gwt-user-2.8.0-rc1.jar:/home/gv/.m2/repository/com/google/jsinterop/jsinterop-annotations/1.0.0/jsinterop-annotations-1.0.0.jar:/home/gv/.m2/repository/com/google/jsinterop/jsinterop-annotations/1.0.0/jsinterop-annotations-1.0.0-sources.jar:/home/gv/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar:/home/gv/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/home/gv/.m2/repository/org/w3c/css/sac/1.3/sac-1.3.jar:/home/gv/.m2/repository/com/google/gwt/gwt-dev/2.8.0-rc1/gwt-dev-2.8.0-rc1.jar:/home/gv/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:/home/gv/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:/home/gv/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar:/home/gv/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/home/gv/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar:/home/gv/.m2/repository/colt/colt/1.2.0/colt-1.2.0.jar:/home/gv/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar:/home/gv/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/home/gv/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/gv/.m2/repository/com/ibm/icu/icu4j/50.1.1/icu4j-50.1.1.jar:/home/gv/.m2/repository/tapestry/tapestry/4.0.2/tapestry-4.0.2.jar:/home/gv/.m2/repository/net/sourceforge/htmlunit/htmlunit/2.19/htmlunit-2.19.jar:/home/gv/.m2/repository/xalan/xalan/2.7.2/xalan-2.7.2.jar:/home/gv/.m2/repository/xalan/serializer/2.7.2/serializer-2.7.2.jar:/home/gv/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar:/home/gv/.m2/repository/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar:/home/gv/.m2/repository/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3.jar:/home/gv/.m2/repository/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1.jar:/home/gv/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/gv/.m2/repository/net/sourceforge/htmlunit/htmlunit-core-js/2.17/htmlunit-core-js-2.17.jar:/home/gv/.m2/repository/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar:/home/gv/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/home/gv/.m2/repository/net/sourceforge/nekohtml/nekohtml/1.9.22/nekohtml-1.9.22.jar:/home/gv/.m2/repository/net/sourceforge/cssparser/cssparser/0.9.18/cssparser-0.9.18.jar:/home/gv/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/gv/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.2.13.v20150730/websocket-client-9.2.13.v20150730.jar:/home/gv/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.2.14.v20151106/websocket-common-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.2.14.v20151106/websocket-api-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-webapp/9.2.14.v20151106/jetty-webapp-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-xml/9.2.14.v20151106/jetty-xml-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-servlet/9.2.14.v20151106/jetty-servlet-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-security/9.2.14.v20151106/jetty-security-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-servlets/9.2.14.v20151106/jetty-servlets-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-continuation/9.2.14.v20151106/jetty-continuation-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-http/9.2.14.v20151106/jetty-http-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-util/9.2.14.v20151106/jetty-util-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-io/9.2.14.v20151106/jetty-io-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-annotations/9.2.14.v20151106/jetty-annotations-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-plus/9.2.14.v20151106/jetty-plus-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-jndi/9.2.14.v20151106/jetty-jndi-9.2.14.v20151106.jar:/home/gv/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar:/home/gv/.m2/repository/org/eclipse/jetty/apache-jsp/9.2.14.v20151106/apache-jsp-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/jetty-server/9.2.14.v20151106/jetty-server-9.2.14.v20151106.jar:/home/gv/.m2/repository/org/eclipse/jetty/toolchain/jetty-schemas/3.1.M0/jetty-schemas-3.1.M0.jar:/home/gv/.m2/repository/org/mortbay/jasper/apache-jsp/8.0.9.M3/apache-jsp-8.0.9.M3.jar:/home/gv/.m2/repository/org/mortbay/jasper/apache-el/8.0.9.M3/apache-el-8.0.9.M3.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaMap/target/MetrikaMap.jar:/home/gv/.m2/repository/OS-repo/postgis/1.5.0/postgis-1.5.0.jar:/home/gv/.m2/repository/OS-repo/pgJDBC/1100/pgJDBC-1100.jar:/home/gv/.m2/repository/OS-repo/kryo/2.21/kryo-2.21.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaMapObjects/target/MetrikaMapObjects-sources.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaMapObjects/target/MetrikaMapObjects.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaCommon/target/MetrikaCommon-sources.jar:/home/gv/.m2/repository/OS-repo/json-simple/1.1.1/json-simple-1.1.1.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaCommon/target/MetrikaCommon.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaServerCommon/target/MetrikaServerCommon.jar:/home/gv/.m2/repository/OS-repo/commons-logging/1.0.4/commons-logging-1.0.4.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaXLS/target/MetrikaXLS.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaRPC/target/MetrikaRPC-sources.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaServerGWTLogging/target/MetrikaServerGWTLogging.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaServerRuntime/target/MetrikaServerRuntime.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaReport/target/MetrikaReport.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/OSGUIControls/target/OSGUIControls.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaRPC/target/MetrikaRPC.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaModel/target/MetrikaModel-sources.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaModel/target/MetrikaModel.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaDB/target/MetrikaDB.jar:/home/gv/.m2/repository/OS-repo/c3p0/0.9.1.2/c3p0-0.9.1.2.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaData/target/MetrikaData.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/MetrikaPlan/target/MetrikaPlan.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/SMSGateClient/target/SMSGateClient.jar:/home/gv/work/projects/Optimizavimas/MetrikaApp/OSGUIControls/target/OSGUIControls-sources.jar:/home/gv/.m2/repository/OS-repo/log4j/1.2.16/log4j-1.2.16.jar:/home/gv/.m2/repository/OS-repo/poi/3.6/poi-3.6.jar:/home/gv/.m2/repository/OS-repo/poi-ooxml/3.6/poi-ooxml-3.6.jar:/home/gv/.m2/repository/OS-repo/iText/2.1.7/iText-2.1.7.jar:/home/gv/.m2/repository/OS-repo/mail/1.4.3/mail-1.4.3.jar:/home/gv/.m2/repository/OS-repo/jts/1.13/jts-1.13.jar:/home/gv/.m2/repository/OS-repo/gwt-openlayers-client/0.5-os/gwt-openlayers-client-0.5-os.jar
[DEBUG] Arguments: -Xms512m -Xmx1300m com.google.gwt.dev.Compiler -logLevel INFO -war /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika -workDir /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/gwt/work -deploy /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/deploy -style OBFUSCATED -localWorkers 1 -optimize 9 com.optimizavimas.metrika.Metrika
[INFO] Compiling module com.optimizavimas.metrika.Metrika
[INFO]    Resolving com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator
[INFO]       Found type 'com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator'
[INFO]          Found type 'javax.validation.constraints.DecimalMax'
[INFO]             [WARN] Detected warnings related to 'javax.validation.Constraint'.   Is validation-<version>.jar on the classpath?
[INFO]             Specify -logLevel DEBUG to see all errors.
[INFO]             [WARN] Ignoring unresolvable annotation type javax.validation.Constraint
[INFO]    Finding entry point classes
[INFO]       [ERROR] Hint: Check that the type name 'com.optimizavimas.metrika.client.MainEntry' is really what you meant
[INFO]       [ERROR] Hint: Check that your classpath includes all required source roots
[INFO] ------------------------------------------------------------------------

Thomas Broyer

unread,
Jul 30, 2016, 9:14:12 PM7/30/16
to Codehaus Mojo gwt-maven-plugin Users


On Sunday, July 31, 2016 at 2:40:08 AM UTC+2, Gražvydas Valeika wrote:

On Sun, Jul 31, 2016 at 3:11 AM, Thomas Broyer <t.br...@gmail.com> wrote:
1.0-SNAPSHOT

Ok, same output places with 1.0-SNAPSHOT. Can't see anything nor about src/main/java nor about src/main/resources:

This is by design (sorry, I hadn't worked on the project for months and forgot a bit how it worked in details).
src/main/resources (and other resources) is copied (and possibly "filtered") by the maven-resources-plugin, and src/main/java (and other source roots) is copied by gwt:import-sources, so all sources are in (in your case) target/Metrika/WEB-INF/classes.
So I'd suggest you check in target/Metrika/WEB-INF/classes that everything's there.

Honestly, I don't really understand how things could work with GWT 2.7.0 but fail with GWT 2.8.0-rc1, without changing the gwt-maven-plugin, but work if you move things from src/main/java to src/main/resources.
All I can do is give hints at how to debug the situation.
(btw, this is all assuming you "mvn clean" between each change; because… well, Maven)

Gražvydas Valeika

unread,
Jul 31, 2016, 6:33:16 AM7/31/16
to codehaus-mojo-gwt-...@googlegroups.com

This is by design (sorry, I hadn't worked on the project for months and forgot a bit how it worked in details).
src/main/resources (and other resources) is copied (and possibly "filtered") by the maven-resources-plugin, and src/main/java (and other source roots) is copied by gwt:import-sources, so all sources are in (in your case) target/Metrika/WEB-INF/classes.
So I'd suggest you check in target/Metrika/WEB-INF/classes that everything's there.

Honestly, I don't really understand how things could work with GWT 2.7.0 but fail with GWT 2.8.0-rc1, without changing the gwt-maven-plugin, but work if you move things from src/main/java to src/main/resources.

 
All I can do is give hints at how to debug the situation.
(btw, this is all assuming you "mvn clean" between each change; because… well, Maven)

mvn clean - sure 

Regarding vesions. I didn't try  GWT 2.7.0. I was experimenting with 2.8.0-SNAPSHOT, because of this I switched to net.ltgt.gwt.maven plugin. Now I'm confused, but feel positive that 2 weeks ago project was building (with 2.8.0-SNAPSHOT). Now tried 2.8.0-rc1 - problem, also tried GWT 2.7.0 - the same problem as 2.8.0-rc1, so this is not regression, but it is very strange that with 2.8 snapshot I could build project. 

According lines of your comment about maven-resources-plugin, I see its debug log:

directory /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/src/main/resources
excludes []
includes []
[DEBUG] ignoreDelta true
[INFO] Copying 2 resources
[DEBUG] file Metrika.gwt.xml has a filtered file extension
[DEBUG] copy /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/src/main/resources/com/optimizavimas/metrika/Metrika.gwt.xml to /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/classes/com/optimizavimas/metrika/Metrika.gwt.xml
[DEBUG] file log4j.properties has a filtered file extension
[DEBUG] copy /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/src/main/resources/log4j.properties to /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/classes/log4j.properties
[DEBUG] no use filter components

It seems that maven-resources-plugin sees couple of files in src/main/resources directory and copies them to  target/Metrika/WEB-INF/classes. But thats all. It doesn't copies anything from src/main/java. And  target/Metrika/WEB-INF/classes contains lot of *.class files coming from maven-compiler-plugin, but no *.java files. I don't see maven-resources-plugin mentioned in my pom files, so it runs with configuration obtained from other plugins. And it seems that it cares to copy src/main/resources only.

Full maven-resources-plugin output:

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Metrika ---
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-resources-plugin:2.6:resources from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-resources-plugin:2.6-1591220937, parent: sun.misc.Launcher$AppClassLoader@70dea4e]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:2.6:resources' with basic configurator -->
[DEBUG]   (f) buildFilters = []
[DEBUG]   (f) encoding = UTF-8
[DEBUG]   (f) escapeWindowsPaths = true
[DEBUG]   (s) includeEmptyDirs = false
[DEBUG]   (s) outputDirectory = /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/classes
[DEBUG]   (s) overwrite = false
[DEBUG]   (f) project = MavenProject: Optimizavimo-sprendimai:Metrika:1.0-SNAPSHOT @ /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/pom.xml
[DEBUG]   (s) resources = [Resource {targetPath: null, filtering: false, FileSet {directory: /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/src/main/resources, PatternSet [includes: {}, excludes: {}]}}]
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@7c2327fa
[DEBUG]   (f) supportMultiLineFiltering = false
[DEBUG]   (f) useBuildFilters = true
[DEBUG]   (s) useDefaultDelimiters = true
[DEBUG] -- end configuration --
[DEBUG] properties used {java.vendor=Oracle Corporation, env.SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/1411,unix/unix:/tmp/.ICE-unix/1411, env.LESSOPEN=||/usr/bin/lesspipe.sh %s, env.ORACLE_HOME=/usr/lib/oracle/12.1, sun.java.launcher=SUN_STANDARD, env.PERL_MM_OPT=INSTALL_BASE=/home/gv/perl5, env.QT_IM_MODULE=xim, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, kryoVersion=2.21, os.name=Linux, sun.boot.class.path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/classes, env.PWD=/home/gv/work/projects/Optimizavimas/MetrikaApp, jsonVersion=1.1.1, env.PERL_MB_OPT=--install_base "/home/gv/perl5", env.LANG=en_GB.utf8, java.vm.specification.vendor=Oracle Corporation, env.XDG_MENU_PREFIX=xfce-, java.runtime.version=1.8.0_101-b14, env.GTK_IM_MODULE=gtk-im-context-simple, env.HISTSIZE=1000, env.LIBVA_DRIVER_NAME=vdpau, env.XDG_VTNR=1, project.build.sourceEncoding=UTF-8, env.DISPLAY=:0, webappDirectory=/home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika, env.GLADE_CATALOG_PATH=:/usr/share/glade3/catalogs, user.name=gv, maven.build.version=Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00), env.USER=gv, env.HISTCONTROL=ignoredups, env.SHELL=/bin/bash, env.VDPAU_DRIVER=r600, env.QTLIB=/usr/lib64/qt-3.3/lib, env.DESKTOP_SESSION=xfce, env.XDG_DATA_DIRS=/usr/local/share:/usr/share, env.NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, env.PATH=/home/gv/maven/bin:/home/gv/gradle/bin:/usr/local/bin/:/home/gv/bin/:/sbin:/home/gv/maven/bin:/home/gv/gradle/bin:/usr/local/bin/:/home/gv/bin/:/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/usr/pgsql-9.5/bin:/usr/lib/oracle/12.1/client64/bin:/usr/pgsql-9.5/bin:/usr/lib/oracle/12.1/client64/bin, env.XDG_CURRENT_DESKTOP=XFCE, user.language=en, env.IMSETTINGS_MODULE=none, sun.boot.library.path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/amd64, classworlds.conf=/home/gv/maven/bin/m2.conf, java.version=1.8.0_101, user.timezone=Europe/Vilnius, env.DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus, sun.arch.data.model=64, env.SSH_AGENT_PID=1358, java.endorsed.dirs=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/endorsed, sun.cpu.isalist=, sun.jnu.encoding=UTF-8, file.encoding.pkg=sun.io, env.SHLVL=3, file.separator=/, env.HOSTNAME=gv-pc, java.specification.name=Java Platform API Specification, env.IMSETTINGS_INTEGRATE_DESKTOP=yes, env.QTDIR=/usr/lib64/qt-3.3, java.class.version=52.0, env.GDMSESSION=xfce, org.slf4j.simpleLogger.defaultLogLevel=debug, user.country=GB, java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre, pgJDBCVersion=1100, gwtOpenlayersVersion=0.5-os, java.vm.info=mixed mode, env.LOGNAME=gv, os.version=4.6.4-301.fc24.x86_64, gwtVersion=2.8.0-rc1, env.CLICOLOR=1, path.separator=:, java.vm.version=25.101-b14, env.QTINC=/usr/lib64/qt-3.3/include, env.XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0, env.JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64, java.awt.printerjob=sun.print.PSPrinterJob, env.TERM=xterm-256color, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.X11.XToolkit, env.XMODIFIERS=@im=none, env.GLADE_MODULE_PATH=:/usr/lib64/glade3/modules, env.METRIKA_REPO=/home/gv/work/projects/Optimizavimas/MetrikaApp/repo, user.home=/home/gv, java.specification.vendor=Oracle Corporation, env.TNS_ADMIN=/home/gv/etc, env.M2_HOME=/home/gv/maven, env.WINDOWID=25165828, java.library.path=/usr/lib/oracle/12.1/client64/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib, java.vendor.url=http://java.oracle.com/, env.MAVEN_CMD_LINE_ARGS= clean compile package -pl Metrika -am -X -Dgwt.logLevel=INFO, env.XDG_SEAT=seat0, java.vm.vendor=Oracle Corporation, maven.home=/home/gv/maven, java.runtime.name=OpenJDK Runtime Environment, sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher clean compile package -pl Metrika -am -X -Dgwt.logLevel=INFO, java.class.path=/home/gv/maven/boot/plexus-classworlds-2.5.2.jar, env.XDG_SESSION_ID=2, maven.version=3.3.9, warPluginVersion=2.5, env.XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.8, sun.cpu.endian=little, sun.os.patch.level=unknown, apacheCommonsNetVersion=3.3.0, env.HOME=/home/gv, java.io.tmpdir=/tmp, env.LS_COLORS=:no=0:fi=0:di=36:ln=01;36:pi=33:so=01;35:do=01;35:bd=01;37:cd=01;37:ex=35:*FAQ=31;7:*README=31;7:*INSTALL=31;7:*.sh=47;31:*.vim=35:*.swp=00;44;37:*.sl=30;33:*,v=5;34;93:or=01;05;31:*.c=33:*.C=33:*.h=33:*.cc=33:*.py=33:*.rb=33:*.awk=33:*.pl=33:*.jpg=0;32:*.jpeg=0;32:*.JPG=0;32:*.gif=0;32:*.png=0;32:*.jpeg=0;32:*.ppm=0;32:*.pgm=0;32:*.pbm=0;32:*.tar=31:*.tgz=31:*.gz=31:*.zip=31:*.sit=31:*.lha=31:*.lzh=31:*.rar=31:*.arj=31:*.bz2=31:*.avi=35:*.mpg=35:*.mpeg=35:*.divx=35:*.xvid=35:*.mov=35:*.mp4=35:*.m4v=35:*.wmv=35:*.mp3=37:*.ogg=37:*.wav=37:*.au=37:*.html=36:*.htm=1;34:*.php=1;45:*.doc=1;34:*.txt=1;34:*.o=1;36:*.a=1;36, env.XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0, env.LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, maven.multiModuleProjectDirectory=/home/gv/work/projects/Optimizavimas/MetrikaApp, env.SSH_AUTH_SOCK=/tmp/ssh-xf2rgaYLUZnv/agent.1194, os.arch=amd64, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, gwt.logLevel=INFO, java.ext.dirs=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-1.b14.fc24.x86_64/jre/lib/ext:/usr/java/packages/lib/ext, env.XDG_RUNTIME_DIR=/run/user/1000, postgisVersion=1.5.0, jtdsVersion=1.2.5, user.dir=/home/gv/work/projects/Optimizavimas/MetrikaApp, env.XAUTHORITY=/var/run/lightdm/gv/xauthority, line.separator=
, java.vm.name=OpenJDK 64-Bit Server VM, gwtMavenPluginVersion=1.0-SNAPSHOT, jarPluginVersion=2.3, env.COLORTERM=xfce4-terminal, env.XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/gv, env.GLADE_PIXMAP_PATH=:/usr/share/glade3/pixmaps, file.encoding=UTF-8, env.MAIL=/var/spool/mail/gv, c3p0Version=0.9.1.2, mavenJarPluginVersion=2.4, java.specification.version=1.8, env.GNOME_KEYRING_CONTROL=/home/gv/.cache/keyring-DALXKY, env.XDG_CONFIG_DIRS=/etc/xdg, env.SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass, env.MAVEN_PROJECTBASEDIR=/home/gv/work/projects/Optimizavimas/MetrikaApp, log4jVersion=1.2.16}
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[DEBUG] resource with targetPath null
directory /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/src/main/resources
excludes []
includes []
[DEBUG] ignoreDelta true
[INFO] Copying 2 resources
[DEBUG] file Metrika.gwt.xml has a filtered file extension
[DEBUG] copy /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/src/main/resources/com/optimizavimas/metrika/Metrika.gwt.xml to /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/classes/com/optimizavimas/metrika/Metrika.gwt.xml
[DEBUG] file log4j.properties has a filtered file extension
[DEBUG] copy /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/src/main/resources/log4j.properties to /home/gv/work/projects/Optimizavimas/MetrikaApp/Metrika/target/Metrika/WEB-INF/classes/log4j.properties
[DEBUG] no use filter components
[INFO] 

Thomas Broyer

unread,
Aug 1, 2016, 8:47:59 PM8/1/16
to Codehaus Mojo gwt-maven-plugin Users


On Sunday, July 31, 2016 at 12:33:16 PM UTC+2, Gražvydas Valeika wrote:

This is by design (sorry, I hadn't worked on the project for months and forgot a bit how it worked in details).
src/main/resources (and other resources) is copied (and possibly "filtered") by the maven-resources-plugin, and src/main/java (and other source roots) is copied by gwt:import-sources, so all sources are in (in your case) target/Metrika/WEB-INF/classes.
So I'd suggest you check in target/Metrika/WEB-INF/classes that everything's there.

Honestly, I don't really understand how things could work with GWT 2.7.0 but fail with GWT 2.8.0-rc1, without changing the gwt-maven-plugin, but work if you move things from src/main/java to src/main/resources.

 
All I can do is give hints at how to debug the situation.
(btw, this is all assuming you "mvn clean" between each change; because… well, Maven)

mvn clean - sure 

Regarding vesions. I didn't try  GWT 2.7.0. I was experimenting with 2.8.0-SNAPSHOT, because of this I switched to net.ltgt.gwt.maven plugin. Now I'm confused, but feel positive that 2 weeks ago project was building (with 2.8.0-SNAPSHOT). Now tried 2.8.0-rc1 - problem, also tried GWT 2.7.0 - the same problem as 2.8.0-rc1, so this is not regression, but it is very strange that with 2.8 snapshot I could build project. 

I can't believe it'd work with snapshot and fail with RC1, given they're currently exactly the same.

It seems that maven-resources-plugin sees couple of files in src/main/resources directory and copies them to  target/Metrika/WEB-INF/classes. But thats all. It doesn't copies anything from src/main/java.

Unless you explicitly declare src/main/java as a resource dir, that's the expected behavior.
 
And  target/Metrika/WEB-INF/classes contains lot of *.class files coming from maven-compiler-plugin, but no *.java files.

That means you should copy them yourself; easiest is to use gwt:import-sources (see samples in the GWT SDK, or in the GWT repository)
That said, I highly recommend splitting client and server code into separate Maven modules, then you can simply use <packaging>gwt-app</packaging> for the client code and only have to configure the module name and short name.
See https://tbroyer.github.io/gwt-maven-plugin/ (intro, usage and migration should help understand the design)

I don't see maven-resources-plugin mentioned in my pom files, so it runs with configuration obtained from other plugins. And it seems that it cares to copy src/main/resources only.

maven-resources-plugin's resources goal is bound to the process-resources phase by default in the jar and war lifecycles; see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

Gražvydas Valeika

unread,
Aug 2, 2016, 3:50:18 PM8/2/16
to codehaus-mojo-gwt-...@googlegroups.com


Unless you explicitly declare src/main/java as a resource dir, that's the expected behavior.

That solved problem:

<build>
<resources>
<resource>
<directory>src/main/java</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>


That means you should copy them yourself; easiest is to use gwt:import-sources (see samples in the GWT SDK, or in the GWT repository)
That said, I highly recommend splitting client and server code into separate Maven modules, then you can simply use <packaging>gwt-app</packaging> for the client code and only have to configure the module name and short name.
See https://tbroyer.github.io/gwt-maven-plugin/ (intro, usage and migration should help understand the design)


I settled at maven-war-plugin way of doing things. <packaging>gwt-app</packaging> worked, but I couldn't find a way to exclude some junk.

Thank you,

Grazvydas
Reply all
Reply to author
Forward
0 new messages