GWT Maven Eclipse Plugin - Compilation Fails Due to Duplicate Class

女生的网名这么多〃 提交于 2019-12-03 11:39:19
sdoca

I have found this posting which states:

If you manually create the Async interface you must disable the generateAsync goal in the plugin configuration

The fix was to remove <goal>generateAsync</goal> from my pom.xml. The plugin config now looks like:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>1.2</version>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
                <goal>test</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <runTarget>my.package.Application/Application.html</runTarget>
    </configuration>
</plugin>

You might actually have generated a duplicate class.

There is a "generateAsync" goal in pom.xml which takes care of generating Async classes for each service You create. If You have this You DO NOT NEED to create a Async version manually.

If You do then You will get "Duplicate Class" error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!