Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Gwt+Maven+Idea,默认项目生成_Java_Maven_Gwt_Intellij Idea_Import - Fatal编程技术网

Java Gwt+Maven+Idea,默认项目生成

Java Gwt+Maven+Idea,默认项目生成,java,maven,gwt,intellij-idea,import,Java,Maven,Gwt,Intellij Idea,Import,我现在正在学习GWT,有些问题似乎我无法理解。 我使用GWT+Maven+intellijidea 我已经使用maven插件创建了gwt项目: mvn -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.5.1 -DgroupId=com.savdev.BasicGwtProject -DartifactId=BasicGwtProject -Dversi

我现在正在学习GWT,有些问题似乎我无法理解。 我使用GWT+Maven+intellijidea

我已经使用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
将模块名称设置为GwtBasicModule。 在com/savdev/BasicGwtProject/client文件夹中,我找到了模块名为的gwt入口点: 类GwtBasicModule实现入口点

默认项目生成了几个实例:

private final GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
private final Messages messages = GWT.create(Messages.class);

我的问题是,为什么找不到GreetingServiceAsync.java文件。它实际上是在调用maven install时生成的。此外,我的GwtBasicModule中没有GreetingServiceAsync和Messages类的导入。我无法在IDEA中导入GreetingServiceAsync,因为它只有在目标文件夹中运行maven install时才会出现。你能解释一下吗?如何配置IntelliJ IDEA,因此我无法在IDE编辑器中看到红色文本。

这些类确实是由Maven生成的。您可以从“Maven项目”工具窗口调用“gwt:generateAsync”和“gwt:i18n”目标来生成它们。

请说明您使用的是哪个IDEA版本/社区版/许可版etc@SSR,最终版,11.1.4版。