GithubHelp home page GithubHelp logo

Comments (13)

tbroyer avatar tbroyer commented on June 27, 2024

Run Maven with debug logs (mvn -X) and look for the Classpath: and Arguments: lines.
You could then compare them to what your Ant build is doing, and you can run GWT from the command-line (or your IDE) with this classpath and arguments.

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

Hi Thomas,

Thanks for the quick reply. I can see sources.jar file of the project A which contains A.gwt.xml in the Classpath:

I am not seeing anything with Arguments: word.

Also, I have provided below compiler arguments which matches with my Ant build arguments,

				<jvmArgs>-Xmx2048M -Xss1024M -Dgwt.usearchives=false</jvmArgs>
				<localWorkers>6</localWorkers>
				<logLevel>TRACE</logLevel>
				<optimize>9</optimize>
				<compilerArgs>
			            <arg>-XclosureCompiler</arg>
			            <arg>-XnocheckCasts</arg>
			            <arg>-XnoclassMetadata</arg>
			          </compilerArgs>

When I am adding the resource folder of Project A (which contains A.gwt.xml) than it starts doing gwt compile of A.gwt.xml which I do not want.
FYI, I am using GWT 2.7.0

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 27, 2024

Arguments: should be the line following Classpath:: https://github.com/tbroyer/gwt-maven-plugin/blob/1.0.0/src/main/java/net/ltgt/gwt/maven/CommandLine.java#L49-L52

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

Is there any way to stop autodetection of modules and only gwt compile B.gwt.xml ?

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 27, 2024

There is no auto-detection of modules in this plugin (there is in Mojo's plugin though), gwt:compile will only compile the module configured in <moduleName>.

Oh, BTW, jvmArgs is a list so it should be configured with child elements, same as compilerArgs.

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

It was my mistake, by carefully looking into it i found that it was using old plugin.

It has been corrected. The only problem i am facing is in Classpath: or Arguments: i am not seeing resource folder of Project A

I already tried below tags,

<build>
   	<resources>
   		<resource>
                          <directory>${basedir}/src/main/resources</directory>
                        </resource>
                </resources>
          </build>

I can see that the resource folder is there in classpath in Ant build

Any solution to have it available ?

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 27, 2024

It's expected, because resources have been copied already into target/classes, which is in the classpath.
Resources could be filtered and/relocated, so they're not added directly to the classpath.
If you need to make changes to resources and see them in dev mode, you have to run mvn process-resources to copy them again into target/classes.

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

Do you mean i can add process-resources to existing goal gwt:compile ?

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

Hi Thomas,

Thanks for the suggestions, i am now facing only 1 error mentioned below and I think you can sure help me in that.

Errors in 'jar:file:gwtx/1.5.2/gwtx-1.5.2.jar!/com/googlecode/gwtx/java/util/emul/java/util/regex/Pattern.java'
[INFO]          Line 183: Referencing class 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable to resolve class

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 27, 2024

There's indeed a bug in that file: https://github.com/google-code-export/gwtx/blob/gwtx-1.5.2/src/main/java/com/googlecode/gwtx/java/util/emul/java/util/regex/Pattern.java#L183 (that class is emulating java.util.regex.Pattern).
Fixed in gwtx 1.5.3 apparently, but man this lib is nearly 12 years old 🧓

https://code.google.com/archive/p/gwtx/issues/22
https://code.google.com/archive/p/gwtx/issues/25
https://code.google.com/archive/p/gwtx/issues/29
google-code-export/gwtx@da4e6a0

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

Thanks for the quick reply.

It is indeed old.

Let's hope it works with 1.5.3. Will let you know

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

It is failing with below error,

[ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
[INFO] 	at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:121)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:296)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
[INFO] 	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
[INFO] 	at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:67)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
[INFO] 	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
[INFO] 	at com.google.gwt.dev.jjs.ast.JBinaryOperation.traverse(JBinaryOperation.java:83)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
[INFO] 	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
[INFO] 	at com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse(JExpressionStatement.java:42)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:95)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:351)
[INFO] 	at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
[INFO] 	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:149)
[INFO] 	at com.google.gwt.dev.jjs.ast.JIfStatement.traverse(JIfStatement.java:53)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:95)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:351)
[INFO] 	at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
[INFO] 	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:149)
[INFO] 	at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:145)
[INFO] 	at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
[INFO] 	at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:600)
[INFO] 	at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:569)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
[INFO] 	at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
[INFO] 	at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1505)
[INFO] 	at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:870)
[INFO] 	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1305)
[INFO] 	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1038)
[INFO] 	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.precompile(JavaToJavaScriptCompiler.java:954)
[INFO] 	at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.precompile(MonolithicJavaToJavaScriptCompiler.java:303)
[INFO] 	at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:38)
[INFO] 	at com.google.gwt.dev.Precompile.precompile(Precompile.java:286)
[INFO] 	at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO] 	at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
[INFO] 	at com.google.gwt.dev.Compiler.run(Compiler.java:206)
[INFO] 	at com.google.gwt.dev.Compiler.run(Compiler.java:158)
[INFO] 	at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
[INFO] 	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO] 	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO] 	at com.google.gwt.dev.Compiler.main(Compiler.java:127)
[INFO] Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class com.google.inject.internal.Annotations$AnnotationChecker
[INFO] 	at com.google.inject.internal.Annotations$AnnotationChecker.<init>(Annotations.java:104)

from gwt-maven-plugin.

pratikthaker84 avatar pratikthaker84 commented on June 27, 2024

Trying with guice 4.0, i was using 3.0

from gwt-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.