I want to write addtional texts to the Java resource files (combine two .java files to one). And I write a python script to do so.
I also want to automate the steps (combines files, compile, package) using Maven. I am a newbie to Maven, I found that exec-maven-plugin
could run the python script.
I tried to set<phase>process-resources</phase>
to try to make it start before compile, but Eclipse complained that Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
(execution: default, phase: process-resources)
below is my pom of the exec-maven-plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>process-resources</phase> <!-- Eclipse complains an error here -->
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>python</executable>
<workingDirectory>src/main/python</workingDirectory>
<arguments>
<argument>combine.py</argument>
</arguments>
</configuration>
</plugin>
Anyone know that how could I implement this purpose? Thanks a lot.