Class DependsFileParser
java.lang.Object
org.codehaus.mojo.jaxb2.shared.version.DependsFileParser
Trivial parser to handle depends-plugin-style files.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The key where the build time as found within the dependencies.properties file is found.private static final String
private static final String
private static final String
private static final String
static final String
The key holding the artifactId of this plugin (within the dependencies.properties file).static final String
The key holding the groupId of this plugin (within the dependencies.properties file).static final String
The key holding the version of this plugin (within the dependencies.properties file).private static final String
String indicating that a line in a dependencies.properties file contains a scope definition.private static final String
String indicating that a line in a dependencies.properties file contains a type definition.private static final String
String indicating that a line in a dependencies.properties file contains a version definition. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SortedMap
<String, DependencyInfo> createDependencyInfoMap
(SortedMap<String, String> versionMap) Converts a SortedMap received from agetVersionMap
call to hold DependencyInfo values, and keys on the formgroupId/artifactId
.getVersionMap
(String artifactId) Extracts all build-time dependency information from a dependencies.properties file embedded in this plugin's JAR.getVersionMap
(URL anURL) Extracts all build-time dependency information from a dependencies.properties file embedded in this plugin's JAR.
-
Field Details
-
VERSION_LINE_INDICATOR
String indicating that a line in a dependencies.properties file contains a version definition.- See Also:
-
TYPE_LINE_INDICATOR
String indicating that a line in a dependencies.properties file contains a type definition.- See Also:
-
SCOPE_LINE_INDICATOR
String indicating that a line in a dependencies.properties file contains a scope definition.- See Also:
-
GROUP_ARTIFACT_SEPARATOR
- See Also:
-
KEY_VALUE_SEPARATOR
- See Also:
-
DEPENDENCIES_PROPERTIES_FILE
- See Also:
-
GENERATION_PREFIX
- See Also:
-
BUILDTIME_KEY
The key where the build time as found within the dependencies.properties file is found.- See Also:
-
OWN_ARTIFACTID_KEY
The key holding the artifactId of this plugin (within the dependencies.properties file).- See Also:
-
OWN_GROUPID_KEY
The key holding the groupId of this plugin (within the dependencies.properties file).- See Also:
-
OWN_VERSION_KEY
The key holding the version of this plugin (within the dependencies.properties file).- See Also:
-
-
Constructor Details
-
DependsFileParser
private DependsFileParser()Hide constructors for utility classes
-
-
Method Details
-
getVersionMap
Extracts all build-time dependency information from a dependencies.properties file embedded in this plugin's JAR.- Parameters:
artifactId
- This plugin's artifactId.- Returns:
- A SortedMap relating [groupId]/[artifactId] keys to DependencyInfo values.
- Throws:
IllegalStateException
- if no artifact in the current Thread's context ClassLoader contained the supplied artifactNamePart.
-
getVersionMap
Extracts all build-time dependency information from a dependencies.properties file embedded in this plugin's JAR.- Parameters:
anURL
- The non-empty URL to a dependencies.properties file.- Returns:
- A SortedMap holding all entries in the dependencies.properties file, plus its build
time which is found under the
buildtime
key. - Throws:
IllegalStateException
- if no artifact in the current Thread's context ClassLoader contained the supplied artifactNamePart.
-
createDependencyInfoMap
public static SortedMap<String,DependencyInfo> createDependencyInfoMap(SortedMap<String, String> versionMap) Converts a SortedMap received from agetVersionMap
call to hold DependencyInfo values, and keys on the formgroupId/artifactId
.- Parameters:
versionMap
- A non-null Map, as received from a call togetVersionMap
.- Returns:
- a SortedMap received from a
getVersionMap
call to hold DependencyInfo values, and keys on the formgroupId/artifactId
.
-