org.rhq.core.util.maven
Class MavenArtifactProperties

java.lang.Object
  extended by org.rhq.core.util.maven.MavenArtifactProperties

public class MavenArtifactProperties
extends Object

Author:
Ian Springer

Method Summary
 String getArtifactId()
           
 String getGroupId()
           
static MavenArtifactProperties getInstance(String groupId, String artifactId)
          Returns a MavenArtifactProperties for the Maven artifact with the specified group id and artifact id.
static MavenArtifactProperties getInstance(String groupId, String artifactId, ClassLoader classLoader)
          Returns a MavenArtifactProperties for the Maven artifact with the specified group id and artifact id.
 String getProperty(String propName)
           
 Set<String> getPropertyNames()
           
 String getVersion()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGroupId

public String getGroupId()

getArtifactId

public String getArtifactId()

getVersion

public String getVersion()

getProperty

public String getProperty(String propName)

getPropertyNames

public Set<String> getPropertyNames()

getInstance

@Nullable
public static MavenArtifactProperties getInstance(String groupId,
                                                           String artifactId)
                                           throws MavenArtifactNotFoundException
Returns a MavenArtifactProperties for the Maven artifact with the specified group id and artifact id. First tries to load the pom.properties file for the artifact using the context class loader. If that fails, then tries to load it using our class loader.

Parameters:
groupId - the group id of the Maven artifact
artifactId - the artifact id of the Maven artifact
Returns:
a MavenArtifactProperties for the Maven artifact with the specified group id and artifact id
Throws:
MavenArtifactNotFoundException - if a pom.properties file for the artifact could not be found in the context class loader or in our class loader

getInstance

@Nullable
public static MavenArtifactProperties getInstance(String groupId,
                                                           String artifactId,
                                                           ClassLoader classLoader)
                                           throws MavenArtifactNotFoundException
Returns a MavenArtifactProperties for the Maven artifact with the specified group id and artifact id. Tries to load the pom.properties file for the artifact using the specified class loader.

Parameters:
groupId - the group id of the Maven artifact
artifactId - the artifact id of the Maven artifact
classLoader - the class loader in which to look for the artifact
Returns:
a MavenArtifactProperties for the Maven artifact with the specified group id and artifact id
Throws:
MavenArtifactNotFoundException - if a pom.properties file for the artifact could not be found in the specified class loader


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.