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
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract OptionsassembleOptions(List<Options> parsedOptions) protected PathgetCwd(BaseParser.LocalContext context) protected Pathprotected abstract InvokerRequestgetInvokerRequest(BaseParser.LocalContext context) getJvmArguments(Path rootDirectory) protected PathgetRootDirectory(BaseParser.LocalContext context) protected PathgetTopDirectory(BaseParser.LocalContext context) protected Pathprotected voidmayOverrideDirectorySystemProperty(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)
-
Constructor Details
-
BaseParser
public BaseParser()
-
-
Method Details
-
parseInvocation
public InvokerRequest parseInvocation(ParserRequest parserRequest) throws ParserException, IOException Description copied from interface:ParserParses the given ParserRequest to create anInvokerRequest. This method does interpret tool arguments.- Specified by:
parseInvocationin interfaceParser- Parameters:
parserRequest- the request containing all necessary information for parsing- Returns:
- the parsed invoker request
- Throws:
ParserException- if there's an error during parsing of the requestIOException- if there's an I/O error during the parsing process
-
getInvokerRequest
-
getCwd
- Throws:
ParserException
-
getInstallationDirectory
- Throws:
ParserException
-
getUserHomeDirectory
- Throws:
ParserException
-
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
- Throws:
ParserException
-
getRootDirectory
- Throws:
ParserException
-
populateSystemProperties
protected Map<String,String> populateSystemProperties(BaseParser.LocalContext context) throws ParserException - Throws:
ParserException
-
populateUserProperties
protected Map<String,String> populateUserProperties(BaseParser.LocalContext context) throws ParserException, IOException - Throws:
ParserExceptionIOException
-
parseCliOptions
protected abstract List<Options> parseCliOptions(BaseParser.LocalContext context) throws ParserException, IOException - Throws:
ParserExceptionIOException
-
assembleOptions
-
readCoreExtensionsDescriptor
protected List<CoreExtension> readCoreExtensionsDescriptor(BaseParser.LocalContext context) throws ParserException, IOException - Throws:
ParserExceptionIOException
-
readCoreExtensionsDescriptorFromFile
protected List<CoreExtension> readCoreExtensionsDescriptorFromFile(Path extensionsFile) throws ParserException, IOException - Throws:
ParserExceptionIOException
-
getJvmArguments
- Throws:
ParserException
-