I have a Java file which is executed during maven:compile
phase to perform some file adjustments on each compilation.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>build-dump</id>
<phase>compile</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.domain.internal.UpdateFile</mainClass>
</configuration>
</plugin>
The thing is that this file is only for code maintenance and it is not needed in the final Jar
package, so how can I exclude this file from being packaged into the final Jar
while I keep it executing the maintenance code?
Thank you in advance.