当尝试从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的解决方法是什么?
请看一下这个页面:
在这里,您可以找到可以为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)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句