Package aQute.bnd.version
Class MavenVersion
java.lang.Object
aQute.bnd.version.MavenVersion
- All Implemented Interfaces:
Comparable<MavenVersion>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComparableVersion
private static final Pattern
private static final Pattern
static final MavenVersion
static final MavenVersion
private static final DateTimeFormatter
private static final String
static final MavenVersion
private final Version
private static final Pattern
private static final String
private static final Pattern
private static final MavenVersion
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
cleanupModifier
(StringBuilder result, String modifier) static String
cleanupVersion
(String version) int
compareTo
(MavenVersion other) boolean
int
hashCode()
private static boolean
The cleanup version got confused when people used numeric dates like 201209091230120 as qualifiers.boolean
If the qualifier ends with -SNAPSHOT or for an OSGI version with a qualifier that is SNAPSHOTstatic final MavenVersion
parseMavenString
(String versionStr) static final MavenVersion
parseString
(String osgiVersionStr) This parses an OSGi Version string into a MavenVersion which is not very interesting.private static String
removeLeadingZeroes
(String group) static String
toDateStamp
(long epoch) static String
toDateStamp
(long epoch, String build) Return the plain release version for this Maven Version.toSnapshot
(long epoch, String build) toSnapshot
(String dateStamp) toSnapshot
(String timestamp, String build) toString()
static String
-
Field Details
-
fuzzyVersion
-
fuzzyVersionRange
-
VERSION_STRING
- See Also:
-
VERSION
-
VERSIONRANGE
-
MAVEN_SNAPSHOT_DATE_TIME
-
UNRESOLVED
-
SNAPSHOT
- See Also:
-
HIGHEST
-
LOWEST
-
ZERO
-
version
-
comparable
-
-
Constructor Details
-
MavenVersion
-
MavenVersion
-
-
Method Details
-
parseString
This parses an OSGi Version string into a MavenVersion which is not very interesting. You probably wantparseMavenString(String)
. -
parseMavenString
-
getOSGiVersion
-
isSnapshot
public boolean isSnapshot()If the qualifier ends with -SNAPSHOT or for an OSGI version with a qualifier that is SNAPSHOT -
compareTo
- Specified by:
compareTo
in interfaceComparable<MavenVersion>
-
toString
-
hashCode
public int hashCode() -
equals
-
toSnapshot
-
toReleaseVersion
Return the plain release version for this Maven Version.The release version contains no alpha characters.
- Returns:
- The plain release version for this Maven Version.
-
validate
-
toDateStamp
-
toDateStamp
-
toSnapshot
-
toSnapshot
-
toSnapshot
-
cleanupVersion
-
isInteger
The cleanup version got confused when people used numeric dates like 201209091230120 as qualifiers. These are too large for Integers. This method checks if the all digit string fits in an integer.maxint = 2,147,483,647 = 10 digits
- Returns:
- if this fits in an integer
-
removeLeadingZeroes
-
cleanupModifier
-