Using the GWT + Maven Project in Eclipse

I have a lot of problems trying to create a simple GWT + Maven project that can be used from Eclipse. That's what I'm doing:

  • Create a new gwt-maven-plugin project:

      mvn archetype: generate -q -DarchetypeGroupId = org.codehaus.mojo -DarchetypeArtifactId = gwt-maven-plugin -DarchetypeVersion = 2.5.0-rc2 -DgroupId = myGroupId -DartifactId = myArtifactId -Dversion = 1.0 -mod 
  • Open the project in Eclipse: File => Import ... => Existing Maven Projects, then select the project you just created.

However, I get the following errors:

  No marketplace entries found to handle gwt-maven-plugin: 2.5.0-rc2: generateAsync in Eclipse.  Please see Help for more information.
 No marketplace entries found to handle gwt-maven-plugin: 2.5.0-rc2: i18n in Eclipse.  Please see Help for more information.

I do not understand this error message. I found a related question in SO format , but adding the proposed file to my pom.xml did not show anything.

Can anyone shed some light?

+4
source share
2 answers

You should tell m2e to simply ignore these warnings. Once you complete the goal, the async and i18n goals are automatically executed only in the classic case when maven / eclipse does not play well together.

Add the Management plugin in the project build section (after the plugins element)

  <plugins> your maven plugins here </plugins> <pluginManagement> <plugins> <!--This plugin configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> <artifactId> gwt-maven-plugin </artifactId> <versionRange> [2.4.0,) </versionRange> <goals> <goal>i18n</goal> <goal>generateAsync</goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> 

Finally, add the path to the target / generated-sources / gwt folder to the build path

+1
source

Instead of starting from the command line, install eclipse m2e (Maven Integration plugin for Eclipse). It will make your life much easier.

UPDATE: select this Maven GWT 2.0 and Eclipse

0
source

Source: https://habr.com/ru/post/1441952/


All Articles