gwt-maven-plugin Unknown argument: -sourceLevel

535 views
Skip to first unread message

Dan Evans

unread,
Jun 20, 2014, 7:19:48 PM6/20/14
to codehaus-mojo-gwt-...@googlegroups.com
Hi,

Apologies if this is an obvious issue.

I'm using the gwt-maven-plugin (tried both 2.5.1 and 2.6.1.  I'm converting the build process from Ant to Maven but I'm having an issue where as part of the gwt-maven-plugin is failing due to a argument -sourceLevel
[ERROR] Unknown argument: -sourceLevel
[ERROR] Google Web Toolkit 2.5.1
[ERROR] Compiler [-logLevel level] [-workDir dir] [-gen dir] [-style style] [-ea] [-XdisableClassMetadata] [-XdisableCastChecking] [-validateOnly] [-draftCompile] [-optimize level] [-compileReport] [-strict] [-XenableClosureCompiler] [-XfragmentMerge numFragments] [-XfragmentCount numFragments] [-localWorkers count] [-war dir] [-deploy dir] [-extra dir] module[s]
[ERROR]
[ERROR] where
[ERROR]   -logLevel                The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
[ERROR]   -workDir                 The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
[ERROR]   -gen                     Debugging: causes normally-transient generated types to be saved in the specified directory
[ERROR]   -style                   Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF)
[ERROR]   -ea                      Debugging: causes the compiled output to check assert statements
[ERROR]   -XdisableClassMetadata   EXPERIMENTAL: Disables some java.lang.Class methods (e.g. getName())
[ERROR]   -XdisableCastChecking    EXPERIMENTAL: Disables run-time checking of cast operations
[ERROR]   -validateOnly            Validate all source code, but do not compile
[ERROR]   -draftCompile            Enable faster, but less-optimized, compilations
[ERROR]   -optimize                Sets the optimization level used by the compiler.  0=none 9=maximum.
[ERROR]   -compileReport           Create a compile report that tells the Story of Your Compile
[ERROR]   -strict                  Only succeed if no input files have errors
[ERROR]   -XenableClosureCompiler  EXPERIMENTAL: Enables Closure Compiler optimizations
[ERROR]   -XfragmentMerge          DEPRECATED (use -XfragmentCount instead): Enables Fragment merging code splitter.
[ERROR]   -XfragmentCount          EXPERIMENTAL: Limits of number of fragments using a code splitter that merges split points.
[ERROR]   -localWorkers            The number of local workers to use when compiling permutations
[ERROR]   -war                     The directory into which deployable output files will be written (defaults to 'war')
[ERROR]   -deploy                  The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar)
[ERROR]   -extra                   The directory into which extra files, not intended for deployment, will be written
[ERROR] and
[ERROR]   module[s]                Specifies the name(s) of the module(s) to compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.827 s
[INFO] Finished at: 2014-06-20T13:10:11+00:00
[INFO] Final Memory: 31M/301M
[INFO] ------------------------------------------------------------------------
...
...
-logLevel INFO -style OBF -war /u_web/target/u_web-1.0-SNAPSHOT -localWorkers 4 -XfragmentCount -1 -sourceLevel auto -gen /u_web/target/.generated

I'm really not sure where its getting the -sourceLevel from.

I've googled to try to understand where its coming from but I cannot see anything.

Any help or pointed would be gratefully recieved.


Thanks,

Dan.

Thomas Broyer

unread,
Jun 22, 2014, 8:27:01 AM6/22/14
to codehaus-mojo-gwt-...@googlegroups.com


On Saturday, June 21, 2014 1:19:48 AM UTC+2, Dan Evans wrote:
Hi,

Apologies if this is an obvious issue.

I'm using the gwt-maven-plugin (tried both 2.5.1 and 2.6.1.  I'm converting the build process from Ant to Maven but I'm having an issue where as part of the gwt-maven-plugin is failing due to a argument -sourceLevel
[ERROR] Unknown argument: -sourceLevel
[ERROR] Google Web Toolkit 2.5.1

The problem is you have a gwt-dev 2.5.1 in the classpath while using the gwt-maven-plugin 2.6.1 which is built for gwt-dev 2.6.1.
If you don't have an explicit <dependency> on gwt-dev 2.5.1 then it's likely coming as a transitive dependency.
Make sure you lock the gwt-dev version to the same as your gwt-user and what gwt-maven-plugin depends on by declaring it in your <dependencyManagement> or <dependencies>.
Reply all
Reply to author
Forward
0 new messages