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 Details

    • javaVersion

      @Parameter(name="java-version", defaultValue="9") protected int javaVersion
      The Java version in which the module-info.class file should be compiled.
    • name

      @Parameter(required=true) private String name
      The name of the module.
    • version

      @Parameter private String version
      The version of the module (optional).
    • multirelease

      @Parameter(required=true, defaultValue="false") protected boolean multirelease
      Determines if the module-info.class is added as a class file of a multi-release jar file. To function correctly, using this option requires a manifest declaring Multi-Release: true.
    • packages

      @Parameter private String 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

      @Parameter private String requires
      A comma-separated list of required modules.
    • staticRequires

      @Parameter(name="static-requires") private String staticRequires
      A comma-separated list of statically required modules.
    • exports

      @Parameter private String exports
      A comma-separated list of exported packages.
    • opens

      @Parameter private String opens
      A comma-separated list of opened packages.
    • qualifiedExports

      @Parameter(name="qualified-exports") private List<QualifiedPackage> qualifiedExports
      A list of qualified exports.
    • qualifiedOpens

      @Parameter(name="qualified-opens") private List<QualifiedPackage> qualifiedOpens
      A list of qualified opens.
    • mainClass

      @Parameter(name="main-class") private String mainClass
      The main class of this module (optional).
    • uses

      @Parameter private String uses
      A comma-separated list of used services.
    • provides

      @Parameter private List<Provide> provides
      A list of provided services.
    • skip

      @Parameter(required=true, defaultValue="false") private boolean skip
      If set to true, 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.MojoExecutionException
      org.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.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • filename

      protected String filename()
    • makeModuleInfo

      protected byte[] makeModuleInfo() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException