Class VersionInfoUtil
- java.lang.Object
-
- io.wcm.devops.conga.tooling.maven.plugin.util.VersionInfoUtil
-
public final class VersionInfoUtil extends Object
Utility method for generating and validation version info.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcleanupSnapshotVersion(String versionLine)Replaces "static" snapshot version like 2.1.2-20180125.094723-16 with dynamic ones like 2.1.2-SNAPSHOT.static StringgetPluginVersionFromPluginManagement(String pluginKey, org.apache.maven.project.MavenProject project)Get version of Maven plugin.static PropertiesgetVersionInfoProperties(org.apache.maven.project.MavenProject project)Detects versions from maven-conga-plugin and additional CONGA plugins used.
-
-
-
Method Detail
-
getVersionInfoProperties
public static Properties getVersionInfoProperties(org.apache.maven.project.MavenProject project)
Detects versions from maven-conga-plugin and additional CONGA plugins used.- Parameters:
project- Maven project- Returns:
- Properties with versions
-
cleanupSnapshotVersion
public static String cleanupSnapshotVersion(String versionLine)
Replaces "static" snapshot version like 2.1.2-20180125.094723-16 with dynamic ones like 2.1.2-SNAPSHOT.- Parameters:
versionLine- Version line- Returns:
- Reformatted version line
-
getPluginVersionFromPluginManagement
public static String getPluginVersionFromPluginManagement(String pluginKey, org.apache.maven.project.MavenProject project)
Get version of Maven plugin. If it is not defined as active plugin in the current project, try to fetch version from plugin management.- Parameters:
pluginKey- Plugin keyproject- Maven project- Returns:
- Plugin version or null if not defined
-
-