在Intellij的GWT配置中更改Super Dev Mode端口参数

8

我有两个GWT项目,我想同时运行它们来进行开发。我喜欢使用Intellij的GWT配置来运行它们,因为它可以为我处理超级开发模式。

问题是Intellij的GWT配置对于开发模式参数有一些默认值,比如端口号,我无法弄清楚如何更改它们。

如果我传递开发模式参数-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],它不会替换预先存在的端口参数,而是尝试加载模块。
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配置中添加/替换开发模式参数吗?

2个回答

15

-port参数用于更改Web服务器的端口,而-codeServerPort参数用于更改代码服务器的端口。

使用以下配置:

enter image description here

将启动端口为9264的Web服务器和端口为8765的代码服务器:

enter image description here


1
哈!所以我一直在正确的轨道上,只是没有意识到当日志显示“-port,9876”时,实际上是指“-codeServerPort”(这毫无意义)。不管怎样,太棒了,现在它完美地工作了。 - CorayThan

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接