gpt4 book ai didi

java - 从 Maven 运行 gwt - IntelliJ

转载 作者:行者123 更新时间:2023-11-29 08:53:00 28 4
gpt4 key购买 nike

当尝试从 IntelliJ Maven 项目面板运行 gwt:run 时,这是我得到的:

[WARNING] GWT plugin is configured to detect modules, but none were found.
[ERROR] Missing required argument 'module[s]'
[ERROR] Google Web Toolkit 2.4.0
[ERROR] DevMode [-noserver] [-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"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s]
[ERROR]

IntelliJ 的解决方法是什么?

最佳答案

请看一下这个页面:

http://mojo.codehaus.org/gwt-maven-plugin/run-mojo.html

在那里你可以找到你可以为你的 gwt:run 目标设置的所有属性。

这就是您在 pom.xml 中定义模块的方式:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwtVersion}</version>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<runTarget>index.html</runTarget>
<modules>
<module>com.yourcompany.YourModule</module>
</modules>
<logLevel>INFO</logLevel>
<failOnError>true</failOnError>
<closureCompiler>true</closureCompiler>
<extraJvmArgs>-Xms512m -Xmx8g -XX:MaxPermSize=512m</extraJvmArgs>
<localWorkers>8</localWorkers>
<copyWebapp>true</copyWebapp>
<gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
<!-- and so on... take a look at the plugin page for more options -->
</configuration>
</execution>
</executions>
</plugin>

顺便说一句,您应该使用最新的 GWT 和 GWT Maven 插件(当前为 2.7.0)。

关于java - 从 Maven 运行 gwt - IntelliJ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21763096/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com