Package codes.rafael.modulemaker
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 AbstractModuleMojoA Maven plugin for injecting amodule-info.classinto an existing jar file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interfaceModuleInjectMojo.JarEntryCreator
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringclassifierThe classifier to add to any additional artifact of this build that contains themodule-info.classfile.private booleancreateMultiReleaseFolderEntryDetermines 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 java.lang.Stringdirectoryprivate java.lang.StringfinalNameprivate java.lang.StringoutputTimestampDefines an output timestamp for JAR entries.private org.apache.maven.project.MavenProjectprojectprivate org.apache.maven.project.MavenProjectHelperprojectHelperprivate booleanreplacetrueif the original artifact should be replaced with a jar file containing themodule-info.class.private java.lang.StringsourceSpecifies the location of the jar file which should be enhanced with amodule-info.classfile.-
Fields inherited from class codes.rafael.modulemaker.AbstractModuleMojo
javaVersion, multirelease
-
-
Constructor Summary
Constructors Constructor Description ModuleInjectMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute()-
Methods inherited from class codes.rafael.modulemaker.AbstractModuleMojo
execute, filename, makeModuleInfo
-
-
-
-
Field Detail
-
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 java.lang.String directory
-
finalName
@Parameter(defaultValue="${project.build.finalName}", required=true, readonly=true) private java.lang.String finalName
-
source
@Parameter private java.lang.String source
Specifies the location of the jar file which should be enhanced with amodule-info.classfile.
-
classifier
@Parameter(defaultValue="modularized") private java.lang.String 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 replace
trueif the original artifact should be replaced with a jar file containing themodule-info.class.
-
createMultiReleaseFolderEntry
@Parameter(defaultValue="true") private boolean createMultiReleaseFolderEntry
Determines 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
@Parameter(defaultValue="${project.build.outputTimestamp}") private java.lang.String outputTimestampDefines an output timestamp for JAR entries.
-
-
Method Detail
-
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
-
-