Package org.glassfish.spec.maven
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.AbstractMojoMaven Goal to run spec verifications from the command line.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringapiJarPath to the API jar file.private java.lang.StringapiPackageAPI package.private static java.io.ConsoleconsThe system console.private booleanhelpShow the usage.private java.lang.StringimplBuildImplementation build.private java.lang.StringimplJarPath to the Impl jar file.private java.lang.StringimplNamespaceImplementation namespace.private java.lang.StringimplVersionImplementation version.private booleanisFinalIs it a final specification?.private java.lang.StringjarTypeIs it an API jar?.private java.lang.StringnewImplVersionNew implementation version.private java.lang.StringnewSpecVersionNew spec version.private java.io.FilepropertiesProperty file.private java.lang.StringspecBuildSpec build.private java.lang.StringspecImplVersionSpec implementation version.private java.lang.StringspecModeMode.private java.lang.StringspecVersionSpec version.
-
Constructor Summary
Constructors Constructor Description CommandLineMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private static voidfail(java.lang.String msg)Print error and exit.private static voidprintParam(java.lang.String arg, java.lang.String desc)Print a given parameter to the standard output.private static java.lang.Stringprompt(java.lang.String msg)Prompt with the string and return the user's input.
-
-
-
Field Detail
-
isFinal
@Parameter(property="isFinal", defaultValue="false") private boolean isFinalIs it a final specification?.
-
jarType
@Parameter(property="isApi", defaultValue="true") private java.lang.String jarTypeIs it an API jar?.
-
apiJar
@Parameter(property="apijar") private java.lang.String apiJar
Path to the API jar file.
-
implJar
@Parameter(property="impljar") private java.lang.String implJar
Path to the Impl jar file.
-
implNamespace
@Parameter(property="implnamespace") private java.lang.String implNamespace
Implementation namespace.
-
specMode
@Parameter(property="specMode", defaultValue="jakarta") private java.lang.String specModeMode. Allowed values are "javaee", "jakarta"
-
apiPackage
@Parameter(property="apipackage") private java.lang.String apiPackage
API package.
-
specVersion
@Parameter(property="specversion") private java.lang.String specVersion
Spec version.
-
specImplVersion
@Parameter(property="specimplversion") private java.lang.String specImplVersion
Spec implementation version.
-
implVersion
@Parameter(property="implversion") private java.lang.String implVersion
Implementation version.
-
newImplVersion
@Parameter(property="newimplversion") private java.lang.String newImplVersion
New implementation version.
-
newSpecVersion
@Parameter(property="newspecversion") private java.lang.String newSpecVersion
New spec version.
-
specBuild
@Parameter(property="specbuild") private java.lang.String specBuild
Spec build.
-
implBuild
@Parameter(property="implbuild") private java.lang.String implBuild
Implementation build.
-
properties
@Parameter(property="properties") private java.io.File properties
Property file.
-
help
@Parameter(property="help", defaultValue="true") private boolean helpShow the usage.
-
cons
private static java.io.Console cons
The system console.
-
-
Method Detail
-
prompt
private static java.lang.String prompt(java.lang.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(java.lang.String msg)
Print error and exit.- Parameters:
msg- the error message
-
printParam
private static void printParam(java.lang.String arg, java.lang.String desc)Print a given parameter to the standard output.- Parameters:
arg- the parameterdesc- the description
-
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
-
-