因为项目中需要用到maven来编译GWT工程,用Eclipse插件编译的话可以直接通过UI界面来设置参数,Maven编译GWT插件不知道该怎么设置,所以找了半天(主要是网络访问不到国外的网站),终于找到详细的参数地址,记录在这里,帮助其他小伙伴。
Parameter Details
<compilerArgs>
Additional arguments to be passed to the GWT compiler.
• Type: java.util.List
• Required: No
<deploy>
The directory into which deployable but not servable output files will be written.
• Type: java.io.File
• Required: Yes
• Default: ${project.build.directory}/gwt/deploy
<draftCompile>
Enable faster, but less-optimized, compilations.
• Type: boolean
• Required: No
• User Property: gwt.draftCompile
• Default: false
<extra>
The directory into which extra files, not intended for deployment, will be written.
• Type: java.io.File
• Required: No
<failOnError>
Only succeed if no input files have errors.
• Type: java.lang.Boolean
• Required: No
• User Property: gwt.failOnError
<forceCompilation>
Require the GWT plugin to compile the GWT module even if none of the sources appear to have changed. By default, this plugin looks to see if the output *.nocache.js exists and inputs (POM, sources and dependencies) have not changed.
• Type: boolean
• Required: No
• User Property: gwt.forceCompilation
• Default: false
<jvmArgs>
Arguments to be passed to the forked JVM (e.g. -Xmx)
• Type: java.util.List
• Required: No
<localWorkers>
The number of local workers to use when compiling permutations. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point values are only accepted together with "C".
• Type: java.lang.String
• Required: No
• User Property: gwt.localWorkers
<logLevel>
Sets the level of logging detail.
• Type: java.lang.String
• Required: No
• User Property: gwt.logLevel
<moduleName>
Name of the module to compile.
• Type: java.lang.String
• Required: Yes
<moduleShortName>
The short name of the module, used to name the output .nocache.js file.
• Type: java.lang.String
• Required: No
<optimize>
Sets the optimization level used by the compiler. 0=none 9=maximum.
• Type: java.lang.Integer
• Required: No
• User Property: gwt.optimize
<skipCompilation>
Require the GWT plugin to skip compilation. This can be useful to quickly package an incomplete or stale application that's used as a dependency (an overlay generally) in a war, for example to launch that war in a container and then launch DevMode for this GWT application.
• Type: boolean
• Required: No
• User Property: gwt.skipCompilation
• Default: false
<sourceLevel>
Specifies Java source level.
• Type: java.lang.String
• Required: No
• User Property: maven.compiler.source
<staleMillis>
Sets the granularity in milliseconds of the last modification date for testing whether the module needs recompilation.
• Type: int
• Required: No
• User Property: lastModGranularityMs
• Default: 0
<style>
Script output style: OBFUSCATED, PRETTY, or DETAILED.
• Type: java.lang.String
• Required: No
• User Property: gwt.style
<systemProperties>
List of system properties to pass to the GWT compiler.
• Type: java.util.Map
• Required: No
<webappDirectory>
Specifies the location of the target war directory.
• Type: java.io.File
• Required: Yes
• Default: ${project.build.directory}/${project.build.finalName}
<workDir>
The compiler work directory (must be writeable).
• Type: java.io.File
• Required: Yes
Default: ${project.build.directory}/gwt/work