使用Eclipse/Maven部署gwt项目时出错

使用Eclipse/Maven部署gwt项目时出错,eclipse,maven-3,m2eclipse,Eclipse,Maven 3,M2eclipse,我最近开始在Eclipse(m2eclipse)中使用Maven。不幸的是,最近我无法从Eclipse运行应用程序。我得到一个错误: 加载模块src.main.java.com.ohapp.webconfuturo.webconfuturo 正在加载继承的模块'src.main.java.com.ohapp.webconfuturo.webconfuturo' [错误]在您的计算机上找不到'src/main/java/com/ohapp/webconfuturo/webconfuturo.gwt

我最近开始在Eclipse(m2eclipse)中使用Maven。不幸的是,最近我无法从Eclipse运行应用程序。我得到一个错误:

加载模块src.main.java.com.ohapp.webconfuturo.webconfuturo 正在加载继承的模块'src.main.java.com.ohapp.webconfuturo.webconfuturo' [错误]在您的计算机上找不到'src/main/java/com/ohapp/webconfuturo/webconfuturo.gwt.xml' 类路径;可能是输入错误,也可能是您忘记包含类路径 来源的条目?[错误]在doStartup方法中shell失败

我已经查过了,文件在那里。在Eclipse中不可见,但在文件系统中可见

奇怪的是,如果我通过Maven(mvn gwt:run)运行这个程序,它就可以正常工作

My pom.xml(无依赖项)如下所示:

<!-- Dependecies --!>

    <build>


        <!-- Generate compiled stuff in the folder used for development mode -->
        <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
                <dependencies>
                    <!-- Need to run the RF Validation tool. This works on both the command-line 
                        and in Eclipse, provided that m2e-apt is installed. -->
                    <dependency>
                        <groupId>com.google.web.bindery</groupId>
                        <artifactId>requestfactory-apt</artifactId>
                        <version>${gwt.version}</version>
                    </dependency>
                </dependencies>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archiveClasses>true</archiveClasses>
                    <webResources>
                        <!-- in order to interpolate version from pom into appengine-web.xml -->
                        <resource>
                            <directory>${basedir}/src/main/webapp/WEB-INF</directory>
                            <filtering>true</filtering>
                            <targetPath>WEB-INF</targetPath>
                        </resource>

                        <resource>
                            <directory>${project.build.directory}/javascripts</directory>
                            <filtering>false</filtering>
                            <targetPath>js/app</targetPath>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>net.kindleit</groupId>
                <artifactId>maven-gae-plugin</artifactId>
                <version>0.9.3</version>
                <configuration>
                    <unpackVersion>${gae.version}</unpackVersion>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <!--suppress MavenModelInspection -->
                            <goal>unpack</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>net.kindleit</groupId>
                        <artifactId>gae-runtime</artifactId>
                        <version>${gae.version}</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>2.5.1</version>

                <!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
                    documentation at codehaus.org -->
                <configuration>
                    <!-- URL that should be automatically opened in the GWT shell (gwt:run). -->
                    <runTarget>WebConfuturo.html</runTarget>
                    <!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->
                    <compileReport>true</compileReport>
                    <module>com.ohapp.webconfuturo.WebConfuturo</module>
                    <logLevel>INFO</logLevel>
                    <style>${gwt.style}</style>

                    <copyWebapp>true</copyWebapp>
                </configuration>

                <dependencies>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-user</artifactId>
                        <version>${gwt.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-dev</artifactId>
                        <version>${gwt.version}</version>
                    </dependency>
                </dependencies>
                <!-- JS is only needed in the package phase, this speeds up testing -->
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Copy static web files before executing gwt:run -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.2</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/webapp</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings 
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.datanucleus</groupId>
                                        <artifactId>maven-datanucleus-plugin</artifactId>
                                        <versionRange>[1.1.4,)</versionRange>
                                        <goals>
                                            <goal>enhance</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>net.kindleit</groupId>
                                        <artifactId>maven-gae-plugin</artifactId>
                                        <versionRange>[0.7.3,)</versionRange>
                                        <goals>
                                            <goal>unpack</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

${project.build.directory}/${project.build.finalName}/WEB-INF/classes
org.apache.maven.plugins
maven编译器插件
3.1
1.6
1.6
com.google.web.bindery
请求工厂公寓
${gwt.version}
org.apache.maven.plugins
maven战争插件
2.4
真的
${basedir}/src/main/webapp/WEB-INF
真的
WEB-INF
${project.build.directory}/javascripts
假的
js/app
net.kindleit
maven-gae插件
0.9.3
${gae.version}
验证
打开
net.kindleit
gae运行时
${gae.version}
聚甲醛
org.codehaus.mojo
GWTMaven插件
2.5.1
WebConfuturo.html
真的
com.ohapp.webconfuturo.webconfuturo
信息
${gwt.style}
真的
com.google.gwt
gwt用户
${gwt.version}
com.google.gwt
gwt开发
${gwt.version}
准备包装
编译
maven资源插件
2.4.2
编译
复制资源
${project.build.directory}/${project.build.finalName}
src/main/webapp
org.eclipse.m2e
生命周期映射
1.0.0
org.datanucleus
maven datanucleus插件
[1.1.4,)
增强
net.kindleit
maven-gae插件
[0.7.3,)
打开
我做错了什么


谢谢

我解决了这个问题。我的运行设置中的参数不正确。我用完整路径引用了gwt.xml文件,而不是相对于源文件夹:

src.main.java.com.ohapp.appname.AppName
我把它改成:

com.ohapp.appname.AppName
问题解决了

我不知道这是怎么发生的,因为不是我做的改变