exec-maven-plugin is not recognizing executables

103 Views Asked by At

Am trying to execute below command using maven-exec plugin, but it is not recognizing the executables properly.

command am trying to execute

find . -name "pom.xml" -exec sed -i s/1.0/\$\{revision\}/g {} +

below is my plugin configuration in main pom.xml

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>3.0.0</version>
  <executions>
    <execution>
      <id>Execute Find and Sed</id>
      <phase>generate-sources</phase>
      <goals>
        <goal>exec</goal>
      </goals>
      <configuration>
        <executable>find</executable>
        <arguments>
          <argument>.</argument>
          <argument>-name</argument>
          <argument>pom.xml</argument>
          <argument>-exec</argument>
          <argument>sed</argument>
          <argument>-i</argument>
          <argument>s/1.0/${revision}/g</argument>
          <argument>{}</argument>
          <argument>+</argument>
        </arguments>
      </configuration>
    </execution>
  </executions>
</plugin>

getting below error

ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (Execute-Find-Sed) on project core: The parameter 'executable' is missing or invalid -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
0

There are 0 best solutions below