0

我在 gwt 客户端使用 Mvp4g。我想生成 RemoteLogging Servlet 使用的符号映射,但是当我尝试使用 mvn clean install 生成符号映射并在 gwt-maven-plugin 配置中指定 -extra folder_name 属性时,我看不到符号映射文件。它不是普通的 gwt 应用程序,而是带有 mvp4g 的 gwt。我不知道它是否是导致问题的 mvp4g。

4

2 回答 2

1

mvp4g 在客户端生成 Java 代码。这发生在编译器将代码转换为 JavaScript 之前。检查您的设置。可能这篇文章有帮助。如何使用 maven 在 gwt 中生成符号映射?

更新:

我使用这个 Maven 配置:

<gwt.output>myPathToTheProjectDirectory/output</gwt.output>
<gwt.gen>genSources</gwt.gen>
<gwt.extra>extra</gwt.extra>

这对于 maven-gwt-plugin:

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.6.1</version>
    <executions>
      <execution>
        <phase>compile</phase>
        <id>bla</id>
        <goals>
          <goal>compile</goal>
        </goals>
        <configuration>
          <draftCompile>false</draftCompile>
          <disableClassMetadata>true</disableClassMetadata>
          <compileReport>true</compileReport>
          <warSourceDirectory>${gwt.war}</warSourceDirectory>
          <webappDirectory>${gwt.output}</webappDirectory>
          <gen>${gwt.output}/${gwt.gen}</gen>
          <extra>${gwt.output}/${gwt.extra}</extra>
          <fragmentCount>8</fragmentCount>
          <extraJvmArgs>-Xms1G -Xmx1G -Xss1024k -XX:MaxPermSize=1024m -Dgwt.persistentunitcache=false</extraJvmArgs>
          <localWorkers>7</localWorkers>
        </configuration>
      </execution>
    </executions>
  </plugin>

如果我执行 maven:compile,符号映射会列在文件夹myPathToTheProjectDirectory/output/extra/symbolmaps中。

于 2014-08-11T13:08:48.867 回答
0

试试添加这个:<set-property name="compiler.useSourceMaps" value="true" />

它为我解决了这个问题。

于 2014-12-19T06:23:47.367 回答