GWT Maven Eclipse Plugin - Compilation Fails Due to Duplicate Class

前端 未结 2 1189
慢半拍i
慢半拍i 2021-02-14 03:57

I am using Eclipse 3.5 (Galileo) with m2eclipse and GWT Eclipse plugins installed. I created a project using the gwt-maven-plugin archetype. I have created an RPC service defi

相关标签:
2条回答
  • 2021-02-14 04:54

    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>
    
    0 讨论(0)
  • 2021-02-14 05:03

    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.

    0 讨论(0)
提交回复
热议问题