Class CommandLineMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.glassfish.spec.maven.CommandLineMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="cli", requiresProject=true, defaultPhase=VALIDATE) public final class CommandLineMojo extends org.apache.maven.plugin.AbstractMojo
Maven Goal to run spec verifications from the command line.
  • Field Details

    • isFinal

      @Parameter(property="isFinal", defaultValue="false") private boolean isFinal
      Is it a final specification?.
    • jarType

      @Parameter(property="isApi", defaultValue="true") private String jarType
      Is it an API jar?.
    • apiJar

      @Parameter(property="apijar") private String apiJar
      Path to the API jar file.
    • implJar

      @Parameter(property="impljar") private String implJar
      Path to the Impl jar file.
    • implNamespace

      @Parameter(property="implnamespace") private String implNamespace
      Implementation namespace.
    • specMode

      @Parameter(property="specMode", defaultValue="jakarta") private String specMode
      Mode. Allowed values are "javaee", "jakarta"
    • apiPackage

      @Parameter(property="apipackage") private String apiPackage
      API package.
    • specVersion

      @Parameter(property="specversion") private String specVersion
      Spec version.
    • specImplVersion

      @Parameter(property="specimplversion") private String specImplVersion
      Spec implementation version.
    • implVersion

      @Parameter(property="implversion") private String implVersion
      Implementation version.
    • newImplVersion

      @Parameter(property="newimplversion") private String newImplVersion
      New implementation version.
    • newSpecVersion

      @Parameter(property="newspecversion") private String newSpecVersion
      New spec version.
    • specBuild

      @Parameter(property="specbuild") private String specBuild
      Spec build.
    • implBuild

      @Parameter(property="implbuild") private String implBuild
      Implementation build.
    • properties

      @Parameter(property="properties") private File properties
      Property file.
    • help

      @Parameter(property="help", defaultValue="true") private boolean help
      Show the usage.
    • cons

      private static Console cons
      The system console.
  • Constructor Details

    • CommandLineMojo

      public CommandLineMojo()
  • Method Details

    • prompt

      private static String prompt(String msg)
      Prompt with the string and return the user's input.
      Parameters:
      msg - the prompt message
      Returns:
      the user input
    • fail

      private static void fail(String msg)
      Print error and exit.
      Parameters:
      msg - the error message
    • printParam

      private static void printParam(String arg, String desc)
      Print a given parameter to the standard output.
      Parameters:
      arg - the parameter
      desc - the description
    • 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