info.aduna.io
Class MavenUtil

java.lang.Object
  extended by info.aduna.io.MavenUtil

public class MavenUtil
extends Object

Maven-related utility methods.

Author:
Arjohn Kampman

Constructor Summary
MavenUtil()
           
 
Method Summary
static Properties loadPomProperties(String groupId, String artifactId)
          Loads the Maven pom.properties for the specified artifact.
static String loadVersion(String groupId, String artifactId, String defaultVersion)
          Loads the version number from the pom.properties file for the specified artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenUtil

public MavenUtil()
Method Detail

loadPomProperties

public static Properties loadPomProperties(String groupId,
                                           String artifactId)
                                    throws IOException
Loads the Maven pom.properties for the specified artifact.

Parameters:
groupId - The artifact's group ID.
artifactId - The artifact's ID.
Returns:
The parsed pom properties, or null if the resource could not be found.
Throws:
IOException

loadVersion

public static String loadVersion(String groupId,
                                 String artifactId,
                                 String defaultVersion)
Loads the version number from the pom.properties file for the specified artifact.

Parameters:
groupId - The artifact's group ID.
artifactId - The artifact's ID.
defaultVersion - The version number to return in case no version number was found.


Copyright © 2011 Aduna. All Rights Reserved.