1. 程式人生 > >myEclipse&eclipse建立maven專案pom.xml報錯Plugin execution not covered by lifecycle configuration異常

myEclipse&eclipse建立maven專案pom.xml報錯Plugin execution not covered by lifecycle configuration異常

Plugin execution not covered by lifecycle configuration異常

網上找了解決方法 這裡記錄一下

第一種:

<plugins>標籤外面加上<pluginManagement>標籤

第二種:

<plugins>裡面加上如下程式碼

<plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <versionRange>[2.0,)</versionRange>
                    <goals>
                      <goal>resources</goal>
                      <goal>testResources</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

我試了第一種方法還是有報錯又加了第二種方法裡面的程式碼 報錯解決