Class ModuleInjectMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
codes.rafael.modulemaker.AbstractModuleMojo
codes.rafael.modulemaker.ModuleInjectMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="inject-module",
defaultPhase=PACKAGE)
public class ModuleInjectMojo
extends AbstractModuleMojo
A Maven plugin for injecting a
module-info.class into an existing jar file.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe classifier to add to any additional artifact of this build that contains themodule-info.classfile.private booleanDetermines if a folder entry should be created for amodule-info.classfile that is placed in a multi-release jar ifMETA-INF/versions/[java]/does not exist.private Stringprivate Stringprivate StringDefines an output timestamp for JAR entries.private org.apache.maven.project.MavenProjectprivate org.apache.maven.project.MavenProjectHelperprivate booleantrueif the original artifact should be replaced with a jar file containing themodule-info.class.private StringSpecifies the location of the jar file which should be enhanced with amodule-info.classfile.Fields inherited from class AbstractModuleMojo
javaVersion, multireleaseFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractModuleMojo
execute, filename, makeModuleInfoMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) private org.apache.maven.project.MavenProject project -
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelper -
directory
@Parameter(defaultValue="${project.build.directory}", required=true, readonly=true) private String directory -
finalName
@Parameter(defaultValue="${project.build.finalName}", required=true, readonly=true) private String finalName -
source
Specifies the location of the jar file which should be enhanced with amodule-info.classfile. -
classifier
The classifier to add to any additional artifact of this build that contains themodule-info.classfile. Ifreplaceis set totrue, this classifier is used for the name of the intermediate jar file. If it is empty, the standard classifiermodularizedis used. -
replace
@Parameter(defaultValue="true") private boolean replacetrueif the original artifact should be replaced with a jar file containing themodule-info.class. -
createMultiReleaseFolderEntry
@Parameter(defaultValue="true") private boolean createMultiReleaseFolderEntryDetermines if a folder entry should be created for amodule-info.classfile that is placed in a multi-release jar ifMETA-INF/versions/[java]/does not exist. -
outputTimestamp
Defines an output timestamp for JAR entries.
-
-
Constructor Details
-
ModuleInjectMojo
public ModuleInjectMojo()
-
-
Method Details
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
doExecutein classAbstractModuleMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-