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.AbstractMojo
Maven Goal to run spec verifications from the command line.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Path to the API jar file.private String
API package.private static Console
The system console.private boolean
Show the usage.private String
Implementation build.private String
Path to the Impl jar file.private String
Implementation namespace.private String
Implementation version.private boolean
Is it a final specification?.private String
Is it an API jar?.private String
New implementation version.private String
New spec version.private File
Property file.private String
Spec build.private String
Spec implementation version.private String
Mode.private String
Spec version.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
private static void
Print error and exit.private static void
printParam
(String arg, String desc) Print a given parameter to the standard output.private static String
Prompt with the string and return the user's input.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
isFinal
@Parameter(property="isFinal", defaultValue="false") private boolean isFinalIs it a final specification?. -
jarType
Is it an API jar?. -
apiJar
Path to the API jar file. -
implJar
Path to the Impl jar file. -
implNamespace
Implementation namespace. -
specMode
Mode. Allowed values are "javaee", "jakarta" -
apiPackage
API package. -
specVersion
Spec version. -
specImplVersion
Spec implementation version. -
implVersion
Implementation version. -
newImplVersion
New implementation version. -
newSpecVersion
New spec version. -
specBuild
Spec build. -
implBuild
Implementation build. -
properties
Property file. -
help
@Parameter(property="help", defaultValue="true") private boolean helpShow the usage. -
cons
The system console.
-
-
Constructor Details
-
CommandLineMojo
public CommandLineMojo()
-
-
Method Details
-
prompt
Prompt with the string and return the user's input.- Parameters:
msg
- the prompt message- Returns:
- the user input
-
fail
Print error and exit.- Parameters:
msg
- the error message
-
printParam
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.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-