我最近修改了使用maven archetype modular-webapp(https://github.com/tbroyer/gwt-maven-archetypes)将我的GWT应用程序从单个项目改为模块化项目。虽然使用SuperDevMode时一切运行良好,但我无法让旧DevMode使用新结构。我想再次使用旧的DevMode项目,因为我对eclipse中的调试更熟悉。
我按照how-for scan-webapp原型提供的步骤:
虽然步骤2中有警告,但所有步骤似乎都成功了:
[WARNING] Your POM <build><outputdirectory> does not match your hosted webapp WEB-INF/classes folder for GWT Hosted browser to see your classes.
但是当我从GWT窗口打开浏览器时,我只得到一个空白页面。所以gwt-maven-plugin配置可能有问题:
<properties>
<gwt.genParam>false</gwt.genParam>
<!-- keep in sync with *-server -->
<runTarget>http://localhost:8080</runTarget>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<configuration>
<module>testproject.Project</module>
<strict>true</strict>
<genParam>${gwt.genParam}</genParam>
<noserver>true</noserver>
<runTarget>${runTarget}</runTarget>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<packagingExcludes>WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
答案 0 :(得分:0)
浏览器找不到nocache.js,这是由maven配置文件的参数中的拼写错误引起的。我用-PDev而不是-Pdev。