0

Can't compile the following pom.xml plugin:

<plugin>
  <groupId>com.google.code.maven-replacer-plugin</groupId>
  <artifactId>replacer</artifactId>
  <version>1.5.3</version>
  <extensions>true</extensions>
  <executions>
        <execution>
          <goals><goal>replace</goal></goals>                   
            <phase>process-sources</phase>                  
        </execution>
  </executions>
  <configuration>
        <ignoreMissingFile>false</ignoreMissingFile>
        <file>target/generated-sources/r/com/actionbarsherlock/R.java</file>
        <outputFile>target/generated-sources/r/com/actionbarsherlock/R.java</outputFile>
        <regex>false</regex>
        <token>static final int</token>
        <value>static int</value>
  </configuration>
</plugin>

Receive the following error: Description Resource Path Location Type Plugin execution not covered by lifecycle configuration: com.google.code.maven-replacer-plugin:replacer:1.5.3:replace (execution: default, phase: process-sources) pom.xml /ActionBarSherlock line 67 Maven Project Build Lifecycle Mapping Problem

We tried different plugins, but we can never get to make it work in the "process-sources" phase. Looks like this phase has something special or needs to be configured somehow?

Add some details by request: IDE: ADT v22 Maven version: 3.0.4

The error is signaled on the POM.xml next to the 'executions' line. If I change the process-sources phase to prepare-package, the error disappears. Unfortunately at that point the replacement is useless.

4
  • Which Maven version do you use? Can you show the full error output?
    – khmarbaise
    Oct 15, 2014 at 16:03
  • Updated with some more details. Thanks. Oct 15, 2014 at 16:21
  • Can you show us your whole POM file? I just tried it on a project as you've typed it (replaced with a source file of my own) and it worked fine. Suggest trying suggestions found in this post
    – Ryan J
    Oct 15, 2014 at 17:32
  • The problem was that we imported the Sherlock project as a Maven project, instead it should be imported as ADT project. Thanks a lot for helping! Oct 16, 2014 at 13:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.