1

我使用 maven 插件创建了 gwt 项目:

mvn -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.5.1 -DgroupId=com.savdev.BasicGwtProject -DartifactId=BasicGwtProject -Dversion=1.0 org.apache.maven.plugins:maven-archetype-plugin:generate

在项目设置中,我添加了 GWT 方面。当我将 GWT 的路径设置为 GWT 安装目录(gwt-2.5.1 版本)时,出现了警告:

路径无效 GWT 安装:在 jar 中找不到类“com.google.gwt.dev.GWTCompiler”:...gwt-dev.jar

我可以修复它吗?IDEA 提供下载 GWT,但它已经下载并且是最后一个版本。也许 IDEA 还不支持上一个 GWT 版本?

第二个问题,我已经运行了:maven install。输出是:

[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running junit.framework.TestSuite@2ad1e832
[INFO] Please navigate your browser to this URL:
[INFO] http://169.254.56.62:55728/com.savdev.BasicGwtProject.gwtBasicModuleJUnit.JUnit/junit-standards.html?gwt.codesvr=169.254.56.62:55724

我已经浏览了它,但浏览器没有任何响应。(顺便说一句,我已经GWT developer plugin安装)。它实际上应该在这里做什么?

我想发现的最后一个问题也是关于运行应用程序。我已经按照此处Project/Edit configuration/GWT configuration所述进行了配置,但我没有清除起始页选项。

然后我在 IDEA 中运行配置。现在我可以看到输出:

[WARN] Server class 'com.google.gwt.junit.server.JUnitHostImpl' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Users/sav/.m2/repository/com/google/gwt/gwt-user/2.5.1/gwt-user-2.5.1.jar' to the web app classpath for this session
   For additional info see: file:/D:/DevSoft/gwt-2.5.1/doc/helpInfo/webAppClassPath.html
[WARN] No startup URLs supplied and no plausible ones found -- use -startupUrl
Dev Mode initialized

目前我不确定这些警告是关于什么的,但是,我尝试访问页面:

http://localhost:8888/

我只能看到 WEB-INF 和名为我的模块名称的文件夹 - 'gwtBasicModule'。我查看 web.xml 并发现:

<!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>gwtBasicModule.html</welcome-file>
  </welcome-file-list>

还存在一个生成的 gwtBasicModule.html 文件。为什么我访问http://localhost:8888/页面时看不到它?如何通过 IDEA 和 Maven gwt 插件正确运行应用程序?

4

1 回答 1

0

您必须配置您的测试模式

于 2013-10-28T12:32:26.363 回答