public final class MavenUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getMavenArtifactVersion(String groupId,
String artifactId)
Determines the MAVEN artifact version.
|
public static String getMavenArtifactVersion(String groupId, String artifactId) throws IOException
Iff the project is built with APACHE MAVEN, the a synthetic properties file is injected for each artifcat, which contains the artifact's version. This method parses that resource and extracts the version.
IllegalStateException - The MAVEN resource for the given groupId and artifactId is
not on the system class pathIllegalStateException - The version cannot be determined from the resource's contentIOExceptionCopyright © 2022 Arno Unkrig. All rights reserved.