【问题标题】:Generating compilation report with gwt:compileReport使用 gwt:compileReport 生成编译报告
【发布时间】:2013-01-15 13:35:35
【问题描述】:

我正在尝试从我的 maven-gwt 项目生成编译报告。

根据this 站点,我应该在生成的源文件夹中看到生成的报告。但是,当我运行其中任何一个时:

mvn gwt:compile-report,
mvn gwt:compile-report -DcompileReport,
mvn gwt:compile-report -DcompileReport=true,
mvn gwt:compile-report -DcompileReport=Test

我明白了:

[WARNING] No compile reports found, did you compile with compileReport option set ?

在我的pom.xml 文件中,我将报告内容设置为:

<reporting>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>2.5.0</version>
            <reportSets>
                <reportSet>
                    <id>Report</id>
                <reports>
                    <report>Test</report>
                </reports>
                </reportSet>
            </reportSets>
        </plugin>
    </plugins>
</reporting>

编辑:

Pom 改为:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.5.0</version>
    <executions>
      <execution>
        <goals>
          <goal>compile</goal>
          <goal>test</goal>
          <goal>i18n</goal>
          <goal>generateAsync</goal>
        </goals>
        <configuration>
          <draftCompile>true</draftCompile>
          <compileReports>true</compileReports>
          <sources>
            <source>target/generated-sources/gwt</source>
          </sources>
        </configuration>
      </execution>
    </executions>
    <!-- Plugin configuration. There are many available options, -->
    <!--see gwt-maven-plugin documentation at codehaus.org -->
    <configuration>
      <runTarget>Bondegard.html</runTarget>
      <compileReports>true</compileReports>
      <logLevel>SPAM</logLevel>
      <hostedWebapp>${webappDirectory}</hostedWebapp>
      <i18nMessagesBundle>pl.spot.bondegard.bondegard.client.Messages</i18nMessagesBundle>
    </configuration>
  </plugin>

仍然没有报告。还有什么建议吗?

【问题讨论】:

    标签: gwt report gwt-maven-plugin


    【解决方案1】:

    编译报告是在构建期间创建的(gwt:compilecompile report activated),gwt:compile-report 仅将其发布到您的 Maven 站点。

    【讨论】:

    • 好的。我试过了,但是在使用 gwt:compile 编译时,编译器看不到,也没有生成异步接口。当我做 gwt:run 编译通过时,但没有生成报告。
    • gwt:compile 只调用 GWT 编译,如果你想为 GWT-RPC 从 sync 接口生成 async 接口,那么你还需要gwt:generateAsync;相应地配置您的 POM。
    • 我更改了pom.xml。我错过了什么?
    • &lt;compileReport&gt;,不是&lt;compileReports&gt;
    猜你喜欢
    • 1970-01-01
    • 2018-03-10
    • 2013-08-11
    • 1970-01-01
    • 2017-12-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-02
    相关资源
    最近更新 更多