On Tuesday, November 19, 2013 3:41:57 AM UTC+1, vikram dave wrote:
Hi,I am trying to compile my GWT code in production mode using Maven. I set production mode true (as seen below) in my pom, but I still see Dev mode code in my JS files. I don't want any dev mode code in my production JS file. Is there a way to do this using Maven? Can I set some flag/ property in my pom or *.gwt.xml file?<!-- Compile Using GWT -->
<plugin>
<groupId>org.codehaus.mojo</gr
oupId ><artifactId>gwt-maven-plugin</
artifactId ><version>2.5.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<productionMode>true</producti
onMode ><classifier>war</classifier>
<warSourceDirectory>src/main/
webapp</warSourceDirectory> <webappDirectory>war</webappDi
rectory ><module>${Module Name}</module>
<extraJvmArgs>${gwt.
extraJvmArgs}</extraJvmArgs> </configuration>
</execution>
</executions>
</plugin>
I see that Ant lets you compile in production mode by using following in build.xml file. Is there a way I can do this in maven? Or using Ant plugin in Maven? (If yes please share an example or point me to a good doc)
<target name="gwtc" depends="javac" description="GWT compile to JavaScript (production mode)">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.
Compiler"> <classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
<pathelement location="../../validation-
api-1.0.0.GA.jar" /> <pathelement location="../../validation-
api-1.0.0.GA-sources.jar" /> </classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M"/>
<arg line="-war"/>
<arg value="war"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}"/>
<arg value="com.google.gwt.sample.
hello.Hello"/> </java>
</target>
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment