Package org.apache.maven.cling.invoker
Class BaseParser
java.lang.Object
org.apache.maven.cling.invoker.BaseParser
- All Implemented Interfaces:
Parser
- Direct Known Subclasses:
EncryptParser
,MavenParser
,ShellParser
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Options
assembleOptions
(List<Options> parsedOptions) protected abstract Options
protected void
failIfFileNotExists
(BaseParser.LocalContext context, String fileName, String message) protected Path
getCwd
(BaseParser.LocalContext context) protected Path
protected abstract InvokerRequest
getInvokerRequest
(BaseParser.LocalContext context) protected Path
getRootDirectory
(BaseParser.LocalContext context) protected Path
getTopDirectory
(BaseParser.LocalContext context) protected Path
protected void
mayOverrideDirectorySystemProperty
(BaseParser.LocalContext context, String javaSystemPropertyKey, Path value) This method is needed to "align" values used later on for interpolations and path calculations.parseCliOptions
(BaseParser.LocalContext context) parseInvocation
(ParserRequest parserRequest) Parses the given ParserRequest to create anInvokerRequest
.protected List<CoreExtension>
protected List<CoreExtension>
readCoreExtensionsDescriptorFromFile
(Path extensionsFile) protected void
validate
(BaseParser.LocalContext context)
-
Constructor Details
-
BaseParser
public BaseParser()
-
-
Method Details
-
parseInvocation
Description copied from interface:Parser
Parses the given ParserRequest to create anInvokerRequest
. This method does interpret tool arguments.- Specified by:
parseInvocation
in interfaceParser
- Parameters:
parserRequest
- the request containing all necessary information for parsing- Returns:
- the parsed invoker request. Caller must start by checking
InvokerRequest.parsingFailed()
as if there are parser errors, this request may not be fully processed and should immediately be failed.
-
validate
-
failIfFileNotExists
protected void failIfFileNotExists(BaseParser.LocalContext context, String fileName, String message) -
emptyOptions
-
getInvokerRequest
-
getCwd
-
getInstallationDirectory
-
getUserHomeDirectory
-
mayOverrideDirectorySystemProperty
protected void mayOverrideDirectorySystemProperty(BaseParser.LocalContext context, String javaSystemPropertyKey, Path value) This method is needed to "align" values used later on for interpolations and path calculations. We enforce "canonical" paths, so IF key and canonical path value disagree, let override it. -
getTopDirectory
-
getRootDirectory
-
populateSystemProperties
-
populateUserProperties
-
parseCliOptions
-
assembleOptions
-
readCoreExtensionsDescriptor
-
readCoreExtensionsDescriptorFromFile
-