org.codehaus.mojo.pomtools.helpers
Class ModelHelper

java.lang.Object
  extended by org.codehaus.mojo.pomtools.helpers.ModelHelper

public final class ModelHelper
extends java.lang.Object

Version:
$Id: ModelHelper.java 2166 2006-07-18 21:32:16Z carlos $
Author:
David Hawkins

Field Summary
static java.lang.String ARTIFACT_ID
           
static java.lang.String GROUP_ID
           
static java.lang.String NULL
           
static org.apache.commons.lang.builder.ToStringStyle TO_STRING_STYLE
           
static java.lang.String UNKNOWN
           
static java.lang.String VERSION
           
 
Method Summary
static boolean addExclusion(ObjectWrapper dependency, java.lang.String groupId, java.lang.String artifactId)
          Adds an exclusion to the supplied dependency if it doesn't already contain an exclusion for that groupId/artifactId.
static boolean addExclusionForNode(org.apache.maven.artifact.Artifact dependencyArtifact, java.lang.String groupId, java.lang.String artifactId)
          Adds an exclusion to the dependency which transitively imports the artifact specified by this node.
static java.lang.String buildFullName(java.lang.String parentName, java.lang.String myName)
           
static java.lang.reflect.Constructor getConstructor(java.lang.Class clazz, java.lang.Class[] signature)
           
static boolean isParsableVersion(java.lang.String strVersion)
           
static java.lang.String versionedKey(org.apache.maven.artifact.Artifact artifact)
           
static java.lang.String versionedKey(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
           
static java.lang.String versionlessKey(org.apache.maven.artifact.Artifact artifact)
           
static java.lang.String versionlessKey(ObjectWrapper obj)
           
static java.lang.String versionlessKey(java.lang.String groupId, java.lang.String artifactId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final java.lang.String NULL
See Also:
Constant Field Values

UNKNOWN

public static final java.lang.String UNKNOWN
See Also:
Constant Field Values

GROUP_ID

public static final java.lang.String GROUP_ID
See Also:
Constant Field Values

ARTIFACT_ID

public static final java.lang.String ARTIFACT_ID
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

TO_STRING_STYLE

public static final org.apache.commons.lang.builder.ToStringStyle TO_STRING_STYLE
Method Detail

getConstructor

public static java.lang.reflect.Constructor getConstructor(java.lang.Class clazz,
                                                           java.lang.Class[] signature)

buildFullName

public static java.lang.String buildFullName(java.lang.String parentName,
                                             java.lang.String myName)

versionlessKey

public static java.lang.String versionlessKey(ObjectWrapper obj)

versionlessKey

public static java.lang.String versionlessKey(org.apache.maven.artifact.Artifact artifact)

versionlessKey

public static java.lang.String versionlessKey(java.lang.String groupId,
                                              java.lang.String artifactId)

versionedKey

public static java.lang.String versionedKey(org.apache.maven.artifact.Artifact artifact)

versionedKey

public static java.lang.String versionedKey(java.lang.String groupId,
                                            java.lang.String artifactId,
                                            java.lang.String version)

isParsableVersion

public static boolean isParsableVersion(java.lang.String strVersion)

addExclusion

public static boolean addExclusion(ObjectWrapper dependency,
                                   java.lang.String groupId,
                                   java.lang.String artifactId)
Adds an exclusion to the supplied dependency if it doesn't already contain an exclusion for that groupId/artifactId.

Parameters:
dependency -
groupId -
artifactId -
Returns:
boolean whether the item was added or not.

addExclusionForNode

public static boolean addExclusionForNode(org.apache.maven.artifact.Artifact dependencyArtifact,
                                          java.lang.String groupId,
                                          java.lang.String artifactId)
                                   throws PomToolsException
Adds an exclusion to the dependency which transitively imports the artifact specified by this node.

Parameters:
info -
Throws:
PomToolsException


Copyright © 2009 The Codehaus. All Rights Reserved.