org.ops4j.pax.exam
Class MavenUtils

java.lang.Object
  extended by org.ops4j.pax.exam.MavenUtils

public class MavenUtils
extends java.lang.Object

Utility methods related to Apache Maven.

Since:
0.3.1, March 09, 2009
Author:
Alin Dreghiciu (adreghiciu@gmail.com)

Method Summary
static MavenUrlReference.VersionResolver asInProject()
          Utility method for creating an artifact version resolver that will get the version out of maven project.
static java.lang.String getArtifactVersion(java.lang.String groupId, java.lang.String artifactId)
          Gets the artifact version out of dependencies file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getArtifactVersion

public static java.lang.String getArtifactVersion(java.lang.String groupId,
                                                  java.lang.String artifactId)
Gets the artifact version out of dependencies file. The dependencies file had to be generated by using the maven plugin.

Parameters:
groupId - artifact group id
artifactId - artifact id
Returns:
found version
Throws:
java.lang.RuntimeException - - If artifact version cannot be found

asInProject

public static MavenUrlReference.VersionResolver asInProject()
Utility method for creating an artifact version resolver that will get the version out of maven project.

Returns:
version resolver


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.