【问题标题】:runTarget missing or invalid - on GWT Maven projectrunTarget 缺失或无效 - 在 GWT Maven 项目上
【发布时间】:2013-01-13 16:41:25
【问题描述】:

当尝试从 maven 命令行运行我们的 GWT 应用程序时,我收到以下错误:

目标 org.codehaus.mojo:gwt-maven-plugin:2.4.0:run 的参数“runTarget”丢失或无效。

但是,这是在 pom.xml 中的以下内容:

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <!-- <version>2.5.0</version> 2.1.0-1 -->
            <version>${gwt.version}</version>
            <configuration>
                <configuration>
                    <runTarget>com.magick.webtrader/Webtrader.html</runTarget>
                    <buildOutputDirectory>${project.build.outputDirectory}</buildOutputDirectory>
                    <generateDirectory>${project.build.directory}/generated-sources/gwt</generateDirectory>
                    <hostedWebapp>${webappDirectory}</hostedWebapp>
                    <copyWebApp>true</copyWebApp>
                    <draftCompile>true</draftCompile>
                    <webXml>${basedir}/war/WEB-INF/web.xml</webXml>
                </configuration>

            </configuration>

            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>test</goal>
                        <goal>generateAsync</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

我做错了什么?

谢谢

【问题讨论】:

    标签: gwt maven


    【解决方案1】:

    我认为您不需要将这些 &lt;Configuration&gt; 元素,即 &lt;Configuration&gt; 嵌套在另一个 &lt;Configuration&gt; 中。尝试解决这个问题,看看它是否有效。附带说明一下,如果您仍然使用默认值,则不需要明确指定 &lt;buildOutputDirectory&gt; 之类的参数。

    【讨论】:

      【解决方案2】:

      如果您使用 eclipse 和 m2e - 在 pom 编辑器中打开 pom 文件,它将在您的 POM.xml 中指出错误。

      您的 Conifugration 标记中有一个这样的错误。确保删除额外的配置标签。

      还要经常检查您的 pom.xml w.r.t 以从 GWT 团队中取样 -

      1)Validation

      2) Dynatablerf

      3)Mobilewebapp

      【讨论】:

        猜你喜欢
        • 2012-12-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-12-27
        • 1970-01-01
        • 2017-09-19
        • 1970-01-01
        • 2012-06-03
        相关资源
        最近更新 更多