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.

FrizzTheSnail
  • 1,048
  • 11
  • 21
  • Which Maven version do you use? Can you show the full error output? – khmarbaise Oct 15 '14 at 16:03
  • Updated with some more details. Thanks. – FrizzTheSnail Oct 15 '14 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](http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin) – Ryan J Oct 15 '14 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! – FrizzTheSnail Oct 16 '14 at 13:05

0 Answers0