Class PackageMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="javapackager",
          defaultPhase=PACKAGE,
          requiresDependencyCollection=RUNTIME,
          requiresDependencyResolution=RUNTIME)
    public class PackageMojo
    extends UpdateModules
    Implements the goal javapackager. Javapackager calls the javapackager command. Before it is done, it copies all needed jar to the module dir. Than it tests if the jars are automatic modules, if so it generates the module-info and adds it to the jar.
    • Constructor Detail

      • PackageMojo

        public PackageMojo()
        The standard constructor.
      • PackageMojo

        protected PackageMojo​(org.apache.maven.plugin.logging.Log pLog,
                              org.apache.maven.project.MavenProject pProject,
                              org.apache.maven.project.MavenProjectHelper pHelper,
                              PackageMojo.NativeType pNative,
                              boolean openmodule,
                              boolean createmissing)
        The constructor for testing.
        Parameters:
        pLog - the MockLog.
        pProject - the param project.
        pHelper - the project helper.
        pNative - nativeType.
        openmodule - openmodule.
        createmissing - create missing classes in missing module.
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        The implementation of the mojo.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - is thrown if an error occurs.