从Maven运行gwt-IntelliJ

夸克

当尝试从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的解决方法是什么?

吉尔伯托·托雷赞(Gilberto Torrezan)

请看一下这个页面:

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)。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

IntelliJ:Maven gwt:运行

来自分类Dev

Maven + IntelliJ的GWT Requestfactory问题

来自分类Dev

Intellij中的Maven运行/调试配置

来自分类Dev

Intellij IDEA的GWT插件

来自分类Dev

使用IntelliJ调试GWT

来自分类Dev

IntelliJ IDEA maven运行/调试配置,maven目标运行但app不自动运行

来自分类Dev

使用Maven在IntelliJ 13中创建的工件运行Tomcat Server

来自分类Dev

IntelliJ使用Maven而不是JUnit运行单元测试

来自分类Dev

使用Maven,Jersey和Tomcat 8从Intellij运行REST服务

来自分类Dev

ClassNotFoundException试图在IntelliJ中使用Maven运行JUnit测试

来自分类Dev

使用Maven-antrun-plugin运行IntelliJ调试器

来自分类Dev

在Intellij中调试GWT的JavaScript

来自分类Dev

Robospice / Maven Intellij Android

来自分类Dev

Maven构建-IntelliJ

来自分类Dev

IntelliJ Maven 和 JavaFX

来自分类Dev

在intellij内部运行领班

来自分类Dev

运行IntelliJ测试时出现IntelliJ NoClassDefFoundError

来自分类Dev

在Intellij中运行Maven生命周期目标时指定Maven选项

来自分类Dev

无法运行GWT 2.7 net.ltgt.gwt.maven:gwt-maven-plugin项目

来自分类Dev

在IntelliJ 12中找不到GWT

来自分类Dev

Intellij IDEA,GWT引导程序,自动完成

来自分类Dev

IntelliJ 14 Maven编译问题

来自分类Dev

Maven插件创建IntelliJ文件?

来自分类Dev

Intellij Maven不存在

来自分类Dev

Maven + IntelliJ项目设置重置

来自分类Dev

intellij中的Maven原型更改

来自分类Dev

Maven + IntelliJ项目设置重置

来自分类Dev

IntelliJ Maven项目导入问题

来自分类Dev

Intellij Maven项目-缺少插件