使用gwt:compileReport生成编译报告

时间:2013-01-15 13:35:36

标签: gwt report gwt-maven-plugin

我正在尝试从我的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>

仍然没有报道。还有其他建议吗?

1 个答案:

答案 0 :(得分:4)

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