Just GWT 2.3 and the Maven2 (3) project in Eclipse Indigo

When I try to create a Maven project with the following parameters: Archetype group identifier - org.codehaus.mojo; Artifact Artifact Id - gwt-maven-plugin; The archetype version is 2.3.0-1. I get some weird errors:

  • Plugin execution does not extend to the life cycle configuration: org.codehaus.mojo: gwt-maven-plugin: 2.3.0-1: generateAsync (execution: default, phase: generation sources)

  • Plugin execution does not extend to the life cycle configuration: org.codehaus.mojo: gwt-maven-plugin: 2.3.0-1: i18n (execution: default, phase: generate-sources)

  • Plugin execution does not extend to life cycle configuration: org.apache.maven.plugins: maven-war-plugin: 2.1.1: exploded (execution: default, phase: compilation)

And some warnings like:

  • An implementation grant for the jst.web project was not found. Functionality will be limited.

  • Could not find implementation of project grant wst.jsdt.web. Functionality will be limited.

This is my pom.xml:

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <!-- POM file generated with GWT webAppCreator --> <modelVersion>4.0.0</modelVersion> <groupId>net.test1</groupId> <artifactId>TestWebApp</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>GWT Maven Archetype</name> <properties> <!-- Convenience property to set the GWT version --> <gwtVersion>2.3.0</gwtVersion> <!-- GWT needs at least java 1.5 --> <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> <version>${gwtVersion}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwtVersion}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>1.0.0.GA</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>1.0.0.GA</version> <classifier>sources</classifier> <scope>test</scope> </dependency> </dependencies> <build> <!-- Generate compiled stuff in the folder used for developing mode --> <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory> <plugins> <!-- GWT Maven Plugin --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.3.0-1</version> <executions> <execution> <goals> <goal>compile</goal> <goal>test</goal> <goal>i18n</goal> <goal>generateAsync</goal> </goals> </execution> </executions> <!-- Plugin configuration. There are many available options, see gwt-maven-plugin documentation at codehaus.org --> <configuration> <runTarget>TestWebApp.html</runTarget> <hostedWebapp>${webappDirectory}</hostedWebapp> <i18nMessagesBundle>net.test1.TestWebApp.client.Messages</i18nMessagesBundle> </configuration> </plugin> <!-- Copy static web files before executing gwt:run --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <executions> <execution> <phase>compile</phase> <goals> <goal>exploded</goal> </goals> </execution> </executions> <configuration> <webappDirectory>${webappDirectory}</webappDirectory> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> </project> 

Etc. What is it? I have tried all possible guides on the Internet, and everywhere the same. I tried to create a project guide without eclipse and the same thing. I think the problem is that the manuals on the Internet were writing for the old version of Eclipse, Maven, GWT. How can i win? How can I just create a simple project with GWT 2.3, the Maven2 plugin and Eclipse Indigo without error warnings?

+6
source share
1 answer

This is a known behavior discussed on the eclipse wiki. See here: http://wiki.eclipse.org/M2E_plugin_execution_not_covered .

Do not just comment on the problematic sections of your pump, they really need you. For example, a generated comment for this maven-war plugin in pom: "Copy static web files before running gwt: run". It turns out to be true. If you comment out this plugin and "mvn clean gwt: run", the static files will not be copied to the target folder and will not be available in posting mode.

Fortunately, the workaround is simple. If you open pom in Eclipse, look in the "Overview" section and click on the error message at the top, this will give you some quick fixes. For example, "Constantly mark a target exploded in pom.xml as ignored." This will add some m2e configuration to your pom, so it will no longer be flagged as an error, and everything will work as before. The newly created section in your pom is what is described in the link above as an β€œignore” option.

Hope this helps.

+11
source

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


All Articles