|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.scijava.util.VersionUtils
public class VersionUtils
Useful methods for retrieving versions from JARs and POMs associated with
Class objects.
| Constructor Summary | |
|---|---|
VersionUtils()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VersionUtils()
| Method Detail |
|---|
public static String getVersion(Class<?> c)
SNAPSHOT version. Will only
search POMs in the base directory.
c - - Look up this class's version
Class 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 class
Class or null if not found.public static String getVersionFromManifest(Class<?> c)
SNAPSHOT version.
c - - Look up this class's version
Class 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 class
Class 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 number
Class or null if not found.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||