简体   繁体   English

Intellij/GWT 在没有排列的情况下启动 gwt 应用程序

[英]Intellij/GWT Starting a gwt application without permutations

I want to start my gwt application on dev mode using an external jetty and the gwt compilation server (using -noserver).我想使用外部码头和 gwt 编译服务器(使用 -noserver)在开发模式下启动我的 gwt 应用程序。

Starting the webserver (jetty + gwt war) with 3 permutations (user.agent=safari) takes 250s with options:使用 3 个排列 (user.agent=safari) 启动网络服务器 (jetty + gwt 战争) 需要 250 秒的选项:

  • -Dgwt.draftCompile=true -Dgwt.draftCompile=true
  • -Dgwt.compiler.localWorkers=8 -Dgwt.compiler.localWorkers=8
  • -Dgwt.compiler.optimizationLevel=0 -Dgwt.compiler.optimizationLevel=0

and in the file MyProject.gwt.xml并在文件 MyProject.gwt.xml

<set-property name="user.agent" value="safari" />

Then I start the dev mode, and the gwt compilation server does 2 more permutations when I want to refresh the client.然后我启动开发模式,当我想刷新客户端时,gwt 编译服务器会再进行 2 次排列。

Is it possible to avoid permutations while launching the jetty?启动码头时是否可以避免排列?

I know that -Dgwt.compiler.skip=true avoid permutations but it doesn't generate the minimum js needed by the gwt compilation server, MyProject directory containing files like MyProject.nocache.js or MyProject.devmode.js is missing so I can't ask the compilation server to do his job while on my browser.我知道 -Dgwt.compiler.skip=true 避免排列,但它不会生成 gwt 编译服务器所需的最小 js,包含 MyProject.nocache.js 或 MyProject.devmode.js 等文件的 MyProject 目录丢失,所以我可以不要在我的浏览器上要求编译服务器完成他的工作。

If I use the option -Dgwt.compiler.skip=true, my webserver starts in 30s but I am stuck.如果我使用选项 -Dgwt.compiler.skip=true,我的网络服务器会在 30 秒后启动,但我被卡住了。

I don't know why gwt needs to do permutations while launching the webserver, isn't that the gwt compilation server's job on dev mode?我不知道为什么 gwt 需要在启动网络服务器时进行排列,这不是 gwt 编译服务器在开发模式下的工作吗?

You can avoid multiple permutation by collapsing all properties in the gwt.xml which will merge all permutations into one您可以通过折叠 gwt.xml 中的所有属性来避免多重排列,这会将所有排列合并为一个

<collapse-all-properties/>

This sounds like your project is not set up correctly.这听起来像您的项目设置不正确。 What version of GWT are you using.您使用的是什么版本的 GWT。 Is this dev mode "Super Dev Mode" or the old dev mode?这种开发模式是“超级开发模式”还是旧的开发模式?

Is it possible to avoid permutations while launching the jetty?启动码头时是否可以避免排列?

There should not be permuations being generated when the web server (jetty) launches. web 服务器(码头)启动时不应生成排列。 Only when you open the page in your browser should the code server run the GWT compiler to compile the module and then bind to one user agent based on your browser type, and that 1 permutation is then compiled.只有当您在浏览器中打开页面时,代码服务器才会运行 GWT 编译器来编译模块,然后根据您的浏览器类型绑定到一个用户代理,然后编译该 1 个排列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM