0

I'm using the exec-maven-plugin and the pom is compiling, but it seems to not execute this plugin when I compile my project:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.2.1</version>
  <executions>
     <execution>
        <configuration>
           <executable>python</executable>
           <workingDirectory>scripts/python/</workingDirectory>
           <arguments>
              <argument>webxmlgen.py</argument>

              <argument>argument1</argument>
              <argument>argument2</argument>
           </arguments>
        </configuration>
        <id>generation</id>
        <phase>generate</phase>
        <goals>
           <goal>exec</goal>
        </goals>
     </execution>
  </executions>
</plugin>

Did I forget something? I'm also not sure about the phase and the goal I have to use...

Edit :

I've deleted the workingDirectory tag and put it directly in the argument and now it works with the phase generate-ressources, thanks !

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.2.1</version>
  <executions>
     <execution>
        <configuration>
           <executable>python</executable>
           <arguments>
              <argument>scripts/python/webxmlgen.py</argument>

              <argument>argument1</argument>
              <argument>argument2</argument>
           </arguments>
        </configuration>
        <id>generation</id>
        <phase>generate-ressources</phase>
        <goals>
           <goal>exec</goal>
        </goals>
     </execution>
  </executions>
</plugin>

1 Answer 1

1

phase tells Maven when to execute it and goal tells it which target to invoke on the plugin when the phase is reached.

Your problem is that there is no generate phase. Here is a list. Try generate-resources instead.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.