Package org.apache.ivy.plugins.version
Class MavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
- java.lang.Object
-
- org.apache.ivy.plugins.version.MavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
-
- Enclosing class:
- MavenTimedSnapshotVersionMatcher
public static final class MavenTimedSnapshotVersionMatcher.MavenSnapshotRevision extends java.lang.Object
Represents 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)
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
baseRevision
private boolean
timedsnapshot
private java.lang.String
wholeRevision
-
Constructor Summary
Constructors Modifier Constructor Description private
MavenSnapshotRevision(boolean timedsnapshot, java.lang.String wholeRevision, java.lang.String baseRevision)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBaseRevision()
Returns the "base" revision that thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents.java.lang.String
getRevision()
Returns the complete/whole revision thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents.boolean
isTimestampedSnapshot()
Returns true if thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents a timestamped snapshot version.
-
-
-
Method Detail
-
isTimestampedSnapshot
public boolean isTimestampedSnapshot()
Returns true if thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents a timestamped snapshot version. Else returns false.- Returns:
- boolean
-
getBaseRevision
public java.lang.String getBaseRevision()
Returns the "base" revision that thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents. For example, for the regular snapshot revision1.2.3-SNAPSHOT
, the base revision is1.2.3
. Similarly for timestamped snapshot version1.0.2-20100925.223013-19
, the base revision is1.0.2
- Returns:
- String
-
getRevision
public java.lang.String getRevision()
Returns the complete/whole revision thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents. For example, if thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents a regular snapshot1.3.4-SNAPSHOT
revision then this method returns1.3.4-SNAPSHOT
. Similarly, if thisMavenTimedSnapshotVersionMatcher.MavenSnapshotRevision
represents a timestamped snapshot1.0.2-20100925.223013-19
revision, then this method returns1.0.2-20100925.223013-19
- Returns:
- String
-
-