您的位置:首页 > 编程语言 > Java开发

异常处理:Eclipse下解决Plugin execution not covered by lifecycle configuration异常 .

2013-09-12 16:34 579 查看
在把selenium的源码在myeclipse2013中构建时,pom.xml文件报错

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:properties-maven-plugin:1.0-alpha-1:write-project-properties (execution: default, phase:  generate-resources)

原因是eclipse的m2e插件还没有支持到execution:http://wiki.eclipse.org/M2E_plugin_execution_not_covered

解决办法如下:

在<build> 和 <plugins> 直接加入 <pluginManagement>

例如:之前的代码如下

 <build>

        <plugins>

            <!-- See http://maven.apache.org/plugins/maven-antrun-plugin -->

            <plugin>

                <artifactId>maven-antrun-plugin</artifactId>

                <executions>

                    <execution>

                        <id>copy_java_files</id>

                        <phase>generate-sources</phase>

                        <configuration>

                            <tasks>

                                <delete dir="src/main/java" />

                            。。。。。

                        </configuration>

                    </plugin>

               </plugins>

   </build>

 修改后的代码就是:

<build>

    <pluginManagement>

        <plugins>

            <!-- See http://maven.apache.org/plugins/maven-antrun-plugin -->

            <plugin>

                <artifactId>maven-antrun-plugin</artifactId>

                <executions>

                    <execution>

                        <id>copy_java_files</id>

                        <phase>generate-sources</phase>

                        <configuration>

                            <tasks>

                                <delete dir="src/main/java" />

                            

     。。。。。

                        </configuration>

                    </plugin>

               </plugins>

   </build>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐