Package org.apache.ivy.plugins.version
Class MavenTimedSnapshotVersionMatcher
java.lang.Object
org.apache.ivy.plugins.version.AbstractVersionMatcher
org.apache.ivy.plugins.version.MavenTimedSnapshotVersionMatcher
- All Implemented Interfaces:
IvySettingsAware,VersionMatcher
A
VersionMatcher which understands Maven timestamped snapshots.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a Maven 2 snapshot version, which is either a regular snapshot (for example: 1.0.2-SNAPSHOT) or a timestamped snapshot (for example: 1.0.2-20100925.223013-19) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) Indicates if this version matcher considers that the module revision found matches the asked one.computeIfSnapshot(String revision) Parses the passedrevisionand returns aMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision, representing thatrevision, if it is either a regular snapshot (for example: 1.0.2-SNAPSHOT) or a timestamped snapshot (for example: 1.0.2-20100925.223013-19).booleanisDynamic(ModuleRevisionId askedMrid) Indicates if the given asked ModuleRevisionId should be considered as dynamic for the current VersionMatcher or not.Methods inherited from class org.apache.ivy.plugins.version.AbstractVersionMatcher
accept, compare, getName, getSettings, needModuleDescriptor, setName, setSettings, toString
-
Constructor Details
-
MavenTimedSnapshotVersionMatcher
public MavenTimedSnapshotVersionMatcher()
-
-
Method Details
-
isDynamic
Description copied from interface:VersionMatcherIndicates if the given asked ModuleRevisionId should be considered as dynamic for the current VersionMatcher or not.- Parameters:
askedMrid- the dependency module revision id as asked by a module- Returns:
- true if this revision is considered as a dynamic one, false otherwise
-
accept
Description copied from interface:VersionMatcherIndicates if this version matcher considers that the module revision found matches the asked one.- Parameters:
askedMrid- ModuleRevisionIdfoundMrid- ModuleRevisionId- Returns:
- boolean
-
computeIfSnapshot
public static MavenTimedSnapshotVersionMatcher.MavenSnapshotRevision computeIfSnapshot(String revision) Parses the passedrevisionand returns aMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision, representing thatrevision, if it is either a regular snapshot (for example: 1.0.2-SNAPSHOT) or a timestamped snapshot (for example: 1.0.2-20100925.223013-19). If the passedrevisionisn't a snapshot revision, then this method returns null- Parameters:
revision- The revision to parse- Returns:
- MavenSnapshotRevision
-