Maven JDK14 plugin

Background

This Maven plugin was developed after failed attempts to use the Retrotranslator Maven Plugin.

Details

<groupId>ca.intelliware.commons</groupId>
  <artifactId>maven-jdk14-plugin</artifactId>
  <packaging>maven-plugin</packaging>

Repository: svn: http://subversion.intelliware.ca/rep/intelliware/tools/trunk/maven-jdk14-plugin

Usage

Add this entry to your pom.xml:

<plugin>
  <groupId>ca.intelliware.commons</groupId>
  <artifactId>maven-jdk14-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>translate</goal>
      </goals>
    </execution>
  </executions>
</plugin>

To ensure that runtime support for JDK 1.5 features is added to the target jar, configure the plugin with an <embed> element:

<plugin>
  <groupId>ca.intelliware.commons</groupId>
  <artifactId>maven-jdk14-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>translate</goal>
      </goals>
      <configuration>
        <embed>ca.intelliware.retro.internal</embed>
      </configuration>
    </execution>
  </executions>
</plugin>

To produce separate 1.4 and 1.5 versions of the target jars, configure the plugin with an <overwrite>element:

<plugin>
  <groupId>ca.intelliware.commons</groupId>
  <artifactId>maven-jdk14-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>translate</goal>
      </goals>
      <configuration>
        <overwrite>false</overwrite>
      </configuration>
    </execution>
  </executions>
</plugin>

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply