我有两个要同时进行开发的GWT项目。我喜欢使用Intellij的GWT配置运行它们,因为它为我提供了超级开发模式。
问题是intellij的GWT配置为Dev Mode参数提供了一些默认值,例如端口号,我不知道如何更改它们。
如果我通过dev模式参数-port 9264
,则日志会告诉我:
Runing CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.7, -bindAddress, 127.0.0.1, -launcherDir, /home/coraythan/.IntelliJIdea14/system/gwt/code.63303291/Books.1f092f4b/run/www, -logLevel, INFO, com.mywebsite.books.Books]
所以那什么也没做。
没有像-port9264
这样的空格,但出现错误:
Unknown argument: -port9264
Google Web Toolkit 2.7.0
DevMode [-[no]startServer] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-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.6, 1.7]] [-XjsInteropMode [NONE, JS, CLOSURE]] [-[no]incremental] module[s]
如果我添加方括号,看起来像它应该有[-port 9264]
,它不会替换现有的port参数,而是尝试加载模块
Runing CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.7, -bindAddress, 127.0.0.1, -launcherDir, /home/coraythan/.IntelliJIdea14/system/gwt/code.63303291/Books.1f092f4b/run/www, -logLevel, INFO, [-port, 9264], com.mywebsite.books.Books]
Super Dev Mode starting up
workDir: /tmp/gwt-codeserver-7935707369622390541.tmp
Loading inherited module '[-port'
[ERROR] Unable to find '[-port.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
Loading modules
[-port
Loading inherited module '[-port'
[ERROR] Unable to find '[-port.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
有人知道您如何在Intellij的GWT配置中添加/替换dev模式参数吗?
-port参数更改Web服务器的端口作为参数-codeServerPort更改代码服务器的端口。
使用此配置:
<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9KaXdIOS5wbmcifQ==” alt =“在此处输入图像描述”>
使用端口9264启动Web服务器,并使用端口8765启动代码服务器:
<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9kbFMzUC5wbmcifQ==” alt =“在此处输入图像描述”>“ >>
感谢@ el-hoss,这使我确认可以为Dev Mode parameters
中指定的那些指定http://www.gwtproject.org/articles/superdevmode.html: