public class

MavenUtils

extends Object
java.lang.Object
   ↳ org.ops4j.pax.exam.MavenUtils

Class Overview

Utility methods related to Apache Maven.

Summary

Public Methods
static MavenUrlReference.VersionResolver asInProject()
Utility method for creating an artifact version resolver that will get the version out of maven project.
static String getArtifactVersion(String groupId, String artifactId)
Gets the artifact version out of dependencies file.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

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

public static String getArtifactVersion (String groupId, 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
RuntimeException - If artifact version cannot be found