Class AbstractModuleMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
codes.rafael.modulemaker.AbstractModuleMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ModuleFileMojo, ModuleInjectMojo
public abstract class AbstractModuleMojo
extends org.apache.maven.plugin.AbstractMojo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringA comma-separated list of exported packages.protected intThe Java version in which themodule-info.classfile should be compiled.private StringThe main class of this module (optional).protected booleanDetermines if themodule-info.classis added as a class file of a multi-release jar file.private StringThe name of the module.private StringA comma-separated list of opened packages.private StringA comma-separated list of packages of the module.A list of provided services.private List<QualifiedPackage> A list of qualified exports.private List<QualifiedPackage> A list of qualified opens.private StringA comma-separated list of required modules.private booleanIf set totrue, the plugin is not executed.private StringA comma-separated list of statically required modules.private StringA comma-separated list of used services.private StringThe version of the module (optional).Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
javaVersion
@Parameter(name="java-version", defaultValue="9") protected int javaVersionThe Java version in which themodule-info.classfile should be compiled. -
name
The name of the module. -
version
The version of the module (optional). -
multirelease
@Parameter(required=true, defaultValue="false") protected boolean multireleaseDetermines if themodule-info.classis added as a class file of a multi-release jar file. To function correctly, using this option requires a manifest declaringMulti-Release: true. -
packages
A comma-separated list of packages of the module. This attribute is optional but offers an optimization that is normally applied by the Java JAR tool. By naming all packages, the runtime does not need to scan the jar file upon loading it but can use the list of explicitly named packages. -
requires
A comma-separated list of required modules. -
staticRequires
A comma-separated list of statically required modules. -
exports
A comma-separated list of exported packages. -
opens
A comma-separated list of opened packages. -
qualifiedExports
A list of qualified exports. -
qualifiedOpens
A list of qualified opens. -
mainClass
The main class of this module (optional). -
uses
A comma-separated list of used services. -
provides
-
skip
@Parameter(required=true, defaultValue="false") private boolean skipIf set totrue, the plugin is not executed.
-
-
Constructor Details
-
AbstractModuleMojo
public AbstractModuleMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
doExecute
protected abstract void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
filename
-
makeModuleInfo
protected byte[] makeModuleInfo() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-