Gwt + Maven + Idea,配置和运行

时间:2023-01-17 12:10:43

I've created gwt project using maven plugin:

我使用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

In project settings I've added the GWT facet. When I set path to GWT - to the GWT installed directory (gwt-2.5.1 version), the warning has appeared:

在项目设置中,我添加了GWT facet。当我将路径设置为GWT -到GWT installed directory (GWT -2.5.1版本)时,会出现以下警告:

Path is not valid GWT installation: class 'com.google.gwt.dev.GWTCompiler' not found in jar:...gwt-dev.jar

路径不是有效的GWT安装:类'com.google.gwt.dev.GWTCompiler'不在jar:…GWT -dev.jar中

Can I fix it? IDEA offers to download GWT, but it's already downloaded and it's the last version. Maybe IDEA does not still support the last GWT version?

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

Second problem, I've run: maven install. The output is:

第二个问题,我已经运行: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

I've navigated it, but browser did not respond anything. (By the way I have GWT developer plugin installed). What actually is it supposed to do here?

我已经浏览过了,但是浏览器什么也没有回复。(顺便说一下,我安装了GWT developer插件)。它在这里应该做什么?

The last issue I'd like to discover also is about running the application. I've configured in Project/Edit configuration/GWT configuration as described here except I left start page option clear.

我想发现的最后一个问题也是关于运行应用程序的。我已经在这里描述的项目/编辑配置/GWT配置中进行了配置,但保留了start page选项清除。

Then I ran the configuration in IDEA. Now I can see the output:

然后我在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

I'm not sure at the moment what are these warnings about, but, I've tried to visit page:

我现在不确定这些警告是关于什么,但是,我已经试着去访问页面:

http://localhost:8888/

I can see only WEB-INF and the folder named as my module name - 'gwtBasicModule'. I look at web.xml and found:

我只能看到WEB-INF和名为“gwtBasicModule”的文件夹。我看网络。xml,发现:

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

Also a generated gwtBasicModule.html file exists. Why I cannot see it when I visit http://localhost:8888/ page? How can I correctly run application both via IDEA and Maven gwt plugin?

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

1 个解决方案

#1


0  

You have to configure your test mode

您必须配置您的测试模式。

#1


0  

You have to configure your test mode

您必须配置您的测试模式。