Constructor and Description |
---|
VersionUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
compare(String v1,
String v2)
Compares two version strings.
|
static String |
getBuildNumber(Class<?> c)
Looks up the build number (typically an SCM revision) of the specified
class.
|
static String |
getVersion(Class<?> c)
Looks up the version of the specified class using any means available,
appending the build number to any
SNAPSHOT version. |
static String |
getVersion(Class<?> c,
String groupId,
String artifactId)
Looks up the version of the specified class using any means available,
appending the build number to any
SNAPSHOT version. |
static String |
getVersionFromManifest(Class<?> c)
Looks up the version of the specified class using a JAR manifest if
available, appending the build number to any
SNAPSHOT version. |
static String |
getVersionFromPOM(Class<?> c,
String groupId,
String artifactId)
Looks up the version of the specified class using the specified POM, or
base POM directory if
groupId and artifactId are
null . |
public static String getVersion(Class<?> c)
SNAPSHOT
version. Will only
search POMs in the base directory.c
- - Look up this class's versionClass
or null if not found.public static String getVersion(Class<?> c, String groupId, String artifactId)
SNAPSHOT
version. The
groupId
and artifactId
parameters allow specification of
the POM lookup path.c
- - Look up this class's versiongroupId
- - Maven group ID containing classartifactId
- - Maven artifact ID containing classClass
or null if not found.public static String getVersionFromManifest(Class<?> c)
SNAPSHOT
version.c
- - Look up this class's versionClass
or null if not found.public static String getVersionFromPOM(Class<?> c, String groupId, String artifactId)
groupId
and artifactId
are
null
.c
- - Look up this class's versiongroupId
- - Maven group ID containing classartifactId
- - Maven artifact ID containing classClass
or null if not found.public static String getBuildNumber(Class<?> c)
Implementation-Build
entry, or null if no such value exists.c
- - Look up this class's build numberClass
or null if not found.Copyright © 2015–2022 SciJava. All rights reserved.