Why am I receiving a “Plugin execution not covered by lifecycle configuration with GWT” error?

前端 未结 1 1572
悲哀的现实
悲哀的现实 2020-12-13 14:31

I\'m using STS and I imported a GWT project from another machine. The project uses m2eclipse. I\'m getting these two errors when building the project:

Plugin         


        
相关标签:
1条回答
  • 2020-12-13 15:16

    If you use Eclipse Indigo (3.7) you have to activate the lifecycle plugin. See here for more details.

    Just add this pluginManagement section to your build section of your pom.xml file

    <pluginManagement>
        <plugins>
            <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>resources</goal>
                                        <goal>compile</goal>
                                        <goal>i18n</goal>
                                        <goal>generateAsync</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute />
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-war-plugin</artifactId>
                                    <versionRange>[2.1.1,)</versionRange>
                                    <goals>
                                        <goal>exploded</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
    
    0 讨论(0)
提交回复
热议问题