繁体   English   中英

Gwt + Maven + Idea,配置和运行

[英]Gwt + Maven + Idea, configuration and running

我已经使用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:... gwt-dev.jar中找不到类'com.google.gwt.dev.GWTCompiler'

我可以解决吗? IDEA提供了下载GWT的功能,但是已经下载了它,并且它是最新版本。 也许IDEA仍然不支持最新的GWT版本?

第二个问题,我已经运行:maven安装。 输出为:

[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插件正确运行应用程序?

您必须配置测试模式

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM