我无法在IntelliJ IDEA启动配置中使用所有devmode参数。因为如果我添加-XdisableCastChecking
或-XdisableClassMetadata
,我会在控制台中获得以下输出:
Connected to the target VM, address: '127.0.0.1:55232', transport: 'socket'
Unknown argument: -XdisableCastChecking
Google Web Toolkit 2.8.0-SNAPSHOT
DevMode [-[no]startServer] [-port port-number | "auto"] [-logdir directory] [-logLevel (ERROR|WARN|INFO|TRACE|DEBUG|SPAM|ALL)] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-[no]superDevMode] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-modulePathPrefix ] [-workDir dir] [-XmethodNameDisplayMode (NONE|ONLY_METHOD_NAME|ABBREVIATED|FULL)] [-sourceLevel [auto, 1.7, 1.8]] [-XjsInteropMode (NONE|JS)] [-[no]incremental] [-setProperty name=value,value...] module[s]
where
-[no]startServer Starts a servlet container serving the directory specified by the -war flag. (defaults to ON)
-port Specifies the TCP port for the embedded web server (defaults to 8888)
-logdir Logs to a file in the given directory, as well as graphically
-logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM or ALL (defaults to INFO)
-gen Debugging: causes normally-transient generated types to be saved in the specified directory
-bindAddress Specifies the bind address for the code server and web server (defaults to 127.0.0.1)
-codeServerPort Specifies the TCP port for the code server (defaults to 9997 for classic Dev Mode or 9876 for Super Dev Mode)
-[no]superDevMode Runs Super Dev Mode instead of classic Development Mode. (defaults to ON)
-server Specify a different embedded web server to run (must implement ServletContainerLauncher)
-startupUrl Automatically launches the specified URL
-war The directory into which deployable output files will be written (defaults to 'war')
-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)
-extra The directory into which extra files, not intended for deployment, will be written
-modulePathPrefix The subdirectory inside the war dir where DevMode will create module directories. (defaults empty for top level)
-workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
-XmethodNameDisplayMode EXPERIMENTAL: Specifies method display name mode for chrome devtools: NONE, ONLY_METHOD_NAME, ABBREVIATED or FULL (defaults to NONE)
-sourceLevel Specifies Java source level (defaults to 1.7)
-XjsInteropMode EXPERIMENTAL: Specifies JsInterop mode: NONE or JS (defaults to NONE)
-[no]incremental Compiles faster by reusing data from the previous compile. (defaults to ON)
-setProperty Set the values of a property in the form of propertyName=value1[,value2...].
and
module[s] Specifies the name(s) of the module(s) to host
Disconnected from the target VM, address: '127.0.0.1:55232', transport: 'socket'
Process finished with exit code -1
然而,我可以在我的maven GWT插件中使用它们而没有任何问题。
答案 0 :(得分:0)
假设CodeHaus Mojo gwt-maven-plugin,它只会传递分叉工具支持的参数;使用mvn -X
启动以获取传递给DevMode的参数的确切列表。
请参阅https://github.com/gwt-maven-plugin/gwt-maven-plugin/blob/ef093f7f844668511ab74829749dc0b11d1e13ac/src/main/java/org/codehaus/mojo/gwt/shell/RunMojo.java,您在那里找不到disable
的任何提及。同样,http://mojo.codehaus.org/gwt-maven-plugin/run-mojo.html也不会列出它们
您可以在配置中使用它们,但Maven只会注入相应的字段,具体取决于Mojo(目标)是否具有它们(换句话说,您可以在插件配置中添加<foo>bar</foo>
而不会有任何字段错误。