facebook

POM Error: Plugin execution not covered by lifecycle…

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #338436 Reply

    bijurk
    Participant

    Hello:

    After upgrading to the MyEclipse 2013, the POM shows an error stating:
    “Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.7:run (execution: CopyPropertyFiles, phase: generate-resources)”
    for the following build segment of the POM:

    
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.7</version>
                    <executions>
                        <execution>
                            <id>CopyPropertyFiles</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <target>
                                    <copy todir="${basedir}/src/main/resources" overwrite="true">
                                        <fileset id="envpropfiles" dir="${basedir}/src/main/resources/properties">
                                            <include name="${env}-*.properties" />
                                        </fileset>
                                        <mapper type="regexp" from="(.*)-(.*\.properties)" to="] -->" />
                                    </copy>
                                </target>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
    

    While this does not seem to be affecting the actual Maven Install run, it is an irritant and may mask other errors if the POM file is ignored.

    Any ideas?

    Cheers,
    Biju

    #338447 Reply

    support-swapna
    Moderator

    Biju,

    This is an M2eclipse problem. You are seeing it in MyEclipse as Maven4MyEclipse depends on M2Eclipse.

    Add <pluginManagement> to pom.xml just above the <plugins> element to make the error go away.

    So your pom.xml should be :

    <build>
    <pluginManagement>
          <plugins>
             <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                   <execution>
                      <id>CopyPropertyFiles</id>
                      <phase>generate-resources</phase>
                      <goals>
                         <goal>run</goal>
                      </goals>
                      <configuration>
                         <target>
                            <copy todir="${basedir}/src/main/resources" overwrite="true">
                               <fileset id="envpropfiles" dir="${basedir}/src/main/resources/properties">
                                  <include name="${env}-*.properties" />
                               </fileset>
                               <mapper type="regexp" from="(.*)-(.*\.properties)" to="] -->" />
                            </copy>
                         </target>
                      </configuration>
                   </execution>
                </executions>
             </plugin> 
        </plugins>
      </pluginManagement>
    </build>

    Let us know how it works for you.

    #338501 Reply

    bijurk
    Participant

    Swapna:

    While this removed the error displayed, it did not execute the CopyPropertyFiles. So this solution does not work in our case.

    I am wondering why this did not show up as an issue with version ME10.7.1

    Any other ways to fix this?

    Thanks,
    Biju

    #338517 Reply

    support-swapna
    Moderator

    Biju,

    I have filed a PR for the dev team to look into it.

    Can you please try the quick fix option :” Mark goal run as ignored in Eclipse build in Eclipse preferences” and see how it works for you.

    Alternatively you can make changes to your pom.xml to fix the issue as below :

    <build>
       <pluginManagement>
          <plugins>
            <!--This plugin's 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.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <versionRange>[1.7,)</versionRange>
                        <goals>
                          <goal>run</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore />
                      </action>
                    </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
             <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                   <execution>
                      <id>CopyPropertyFiles</id>
                      <phase>generate-resources</phase>
                      <goals>
                         <goal>run</goal>
                      </goals>
                      <configuration>
                         <target>
                            <copy todir="${basedir}/src/main/resources" overwrite="true">
                               <fileset id="envpropfiles" dir="${basedir}/src/main/resources/properties">
                                  <include name="${env}-*.properties" />
                               </fileset>
                               <mapper type="regexp" from="(.*)-(.*\.properties)" to="] -->" />
                            </copy>
                         </target>
                      </configuration>
                   </execution>
                </executions>
             </plugin>
    #338613 Reply

    bijurk
    Participant

    Yes, this works and clears out the error from the list of Problems.

    Thanks,
    Biju

    #338641 Reply

    support-swapna
    Moderator

    Biju,

    Glad that it is working fine.
    Do let us know if you see any issues.

    #473024 Reply

    javadeveloper007
    Participant

    Hello Every one, I am getting this error on goal assemble. I know this is M2E issue but kindly have a look at it and explain me how to resolve this issue…
    Plugin execution not covered by lifecycle configuration: com.webcohesion.enunciate:enunciate-maven-plugin:2.1.0:assemble (execution: default, phase: process-sources)

    <build>
    		<plugins>
    			<plugin>
    				<groupId>com.webcohesion.enunciate</groupId>
    				<artifactId>enunciate-maven-plugin</artifactId>
    				<version>${enunciate.version}</version>
    				<executions>
    					<execution>
    						<goals>
    							<goal>assemble</goal>
    						</goals>
    						<configuration>
    							<configFile>src/main/resources/enunciate.xml</configFile>
    						</configuration>
    					</execution>
    				</executions>
    			</plugin>
    			<plugin>
    				<groupId>org.codehaus.cargo</groupId>
    				<artifactId>cargo-maven2-plugin</artifactId>
    				<version>1.4.14</version>
    			</plugin>
    		</plugins>
    	</build>
    #473025 Reply

    javadeveloper007
    Participant
    <build>
    		<plugin>
    					<groupId>com.webcohesion.enunciate</groupId>
    					<artifactId>enunciate-maven-plugin</artifactId>
    					<version>${enunciate.version}</version>
    					<executions>
    						<execution>
    							<goals>
    								<goal>docs</goal>
    							</goals>
    							<configuration>
    								<configFile>src/main/resources/enunciate.xml</configFile>
    							</configuration>
    						</execution>
    					</executions>
    				</plugin>
    				<plugin>
    					<groupId>org.codehaus.cargo</groupId>
    					<artifactId>cargo-maven2-plugin</artifactId>
    					<version>1.4.14</version>
    				</plugin>
    			</plugins>
    	</build>
    #473064 Reply

    support-swapna
    Moderator

    javadeveloper007,

    Sorry that you are seeing this issue.

    1. Right click on the project > Maven > Update Project and check if it fixes the issue.

    2. Can you please clarify if you have tried the suggestions in my responses to bijurk?

    a. Add to pom.xml just above the element to make the error go away.
    b. Try the quick fix option :” Mark goal run as ignored in Eclipse build in Eclipse preferences”

    3. Please share with us the MyEclipse Installation Details from menu MyEclipse > Installation Summary > Installation Details to help us investigate further.

    Let us know how it works for you.

    –Swapna
    MyEclipse Support

    #506794 Reply

    sathyamca
    Participant

    Hi Swapna,

    File copying issue , finally i found the solution from your valuable input. Thank you very much. God Bless You!

    Regards,
    Sathiya

    #576132 Reply

    Hello

    I am getting this error when i convert my java project to maven…..”Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile (execution: default-testCompile, phase: test-compile)”

    <project xmlns=”http://maven.apache.org/POM/4.0.0&#8243; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd”&gt;
    <modelVersion>4.0.0</modelVersion>
    <groupId>KVSOLA</groupId>
    <artifactId>OLAKV</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <build>
    <sourceDirectory>src</sourceDirectory>
    <pluginManagement>
    <plugins>
    <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.5.1</version>
    <configuration>
    <source>1.8</source>
    <target>1.8</target>
    </configuration>
    </plugin>
    </plugins>
    </pluginManagement>
    </build>
    </project>

    Any suggestions

    #576330 Reply

    support-swapna
    Moderator

    Ketan,

    Sorry that you are seeing this issue. This looks like a Maven specific issue rather than a MyEclipse one.

    1. How exactly did you convert a Java project to Maven project? Please list the steps in detail to help us investigate further.
    2. Are you seeing the error in the pom.xml or in the Console view when running the Maven goal?
    3. Can you try cleaning the project and then updating the project by right clicking on the project > Maven > Update Project and see if the error goes away?
    4. If the above suggestion does not help, then please share with us the project files to help us replicate the problem at our end. If you have constraints sharing the source files, then please omit the source files and send us all the .* files (.settings folder, .project, .classpath etc) of the project along with the pom.xml. Also share with us the version of MyEclipse you are working with from Help > About MyEclipse section.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: POM Error: Plugin execution not covered by lifecycle…

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in