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.
Specify a fileset which includes the class files to be translated.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>translate</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${project.build.outputDirectory}</directory>
<includes>
<include>**/*.class</include>
</includes>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
Specify a jarfileset which includes the jar files to be translated.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>translate</goal>
</goals>
<configuration>
<jarfilesets>
<jarfileset>
<directory>${pom.basedir}/lib</directory>
<includes>
<include>**/*.jar</include>
</includes>
</jarfileset>
</jarfilesets>
</configuration>
</execution>
</executions>
</plugin>
Notice the ${path_to_rt.jar} variable inside the <verifyClasspath> element - you have to set this variable inside your .m2/settings.xml file to point to pre-JRE-1.5 rt.jar for the verification process to find it.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>translate</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${project.build.outputDirectory}</directory>
<includes>
<include>**/*.class</include>
</includes>
</fileset>
</filesets>
<verify>true</verify>
<verifyClasspath>
<element>${path_to_rt.jar}</element>
</verifyClasspath>
</configuration>
</execution>
</executions>
</plugin>