NOTE: The examples below, unless otherwise specified, all assume that the Maven build is invoked with a life-cycle phase:
mvn install
Due to the use of executions configurations, invoking the named goals from the command-line will fail to function correctly.
When executing on a jar project, the translate-project goal will translate the project's artifacts (the jar file) and then optionally attach the new retrotranslated artifact to be included in install and deploy operations.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>translate-project</goal>
</goals>
<configuration>
<classifier>jdk14</classifier>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
When executing on a war project, the translate-war goal will translate the contents (classes directory and jars in the lib directory) of the project's artifact (war file) and then optionally attach the new retrotranslated artifact to be included in install and deploy operations.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>translate-war</goal>
</goals>
<configuration>
<classifier>jdk1.4</classifier>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
Sometimes (especially when also performing verification) you only want some jars translated.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>translate-war</goal>
</goals>
<configuration>
<jarfileset>
<includes>
<include>myproject-*.jar</include>
</includes>
</jarfileset>
<classifier>jdk1.4</classifier>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>