首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从maven - IntelliJ运行gwt

从maven - IntelliJ运行gwt
EN

Stack Overflow用户
提问于 2014-02-13 18:56:37
回答 1查看 2.7K关注 0票数 2

当尝试运行gwt:从IntelliJ Maven项目面板运行时,我得到了以下内容:

代码语言:javascript
复制
[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来说,这是什么工作呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-13 20:24:29

请看一下这一页:

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

在那里,您可以找到您可以为您设置的所有属性:运行目标。

以下是如何在pom.xml中定义模块:

代码语言:javascript
复制
<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插件(当前为2.7.0)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21763096

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档