net.orfjackal.retrolambda.maven
Class ProcessMainClassesMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by net.orfjackal.retrolambda.maven.ProcessMainClassesMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="process-main",
      defaultPhase=PROCESS_CLASSES,
      requiresDependencyResolution=COMPILE)
public class ProcessMainClassesMojo
extends org.apache.maven.plugin.AbstractMojo

Processes main classes compiled with Java 8 so that they will be compatible with Java 5, 6 or 7 runtime.


Field Summary
 File java8home
          Directory of the Java 8 installation for running Retrolambda.
 File mainInputDir
          Directory containing the original classes compiled with Java 8.
 File mainOutputDir
          Directory where to write the backported main classes.
 String target
          The Java version targeted by the bytecode processing.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ProcessMainClassesMojo()
           
 
Method Summary
 void execute()
           
protected  String getClasspathId()
           
protected  File getInputDir()
           
protected  File getOutputDir()
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainInputDir

@Parameter(defaultValue="${project.build.outputDirectory}",
           property="retrolambdaMainInputDir",
           required=true)
public File mainInputDir
Directory containing the original classes compiled with Java 8.

Since:
1.3.0

mainOutputDir

@Parameter(defaultValue="${project.build.outputDirectory}",
           property="retrolambdaMainOutputDir",
           required=true)
public File mainOutputDir
Directory where to write the backported main classes. If same as the input directory, will overwrite the original classes.

Since:
1.3.0

java8home

@Parameter(defaultValue="${java.home}",
           property="java8home",
           required=true)
public File java8home
Directory of the Java 8 installation for running Retrolambda.

Since:
1.2.0

target

@Parameter(defaultValue="1.7",
           property="retrolambdaTarget",
           required=true)
public String target
The Java version targeted by the bytecode processing. Possible values are 1.5, 1.6, 1.7 and 1.8. After processing the classes will be compatible with the target JVM provided the known limitations are considered. See project documentation for more details.

Since:
1.2.0
Constructor Detail

ProcessMainClassesMojo

public ProcessMainClassesMojo()
Method Detail

getInputDir

protected File getInputDir()

getOutputDir

protected File getOutputDir()

getClasspathId

protected String getClasspathId()

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2013-2014. All Rights Reserved.