org.codehaus.mojo.pomtools.helpers
Class ModelHelper

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

public final class ModelHelper
extends Object

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

Field Summary
static String ARTIFACT_ID
           
static String GROUP_ID
           
static String NULL
           
static org.apache.commons.lang.builder.ToStringStyle TO_STRING_STYLE
           
static String UNKNOWN
           
static String VERSION
           
 
Method Summary
static boolean addExclusion(ObjectWrapper dependency, String groupId, 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, String groupId, String artifactId)
          Adds an exclusion to the dependency which transitively imports the artifact specified by this node.
static String buildFullName(String parentName, String myName)
           
static Constructor getConstructor(Class clazz, Class[] signature)
           
static boolean isParsableVersion(String strVersion)
           
static String versionedKey(org.apache.maven.artifact.Artifact artifact)
           
static String versionedKey(String groupId, String artifactId, String version)
           
static String versionlessKey(org.apache.maven.artifact.Artifact artifact)
           
static String versionlessKey(ObjectWrapper obj)
           
static String versionlessKey(String groupId, 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 String NULL
See Also:
Constant Field Values

UNKNOWN

public static final String UNKNOWN
See Also:
Constant Field Values

GROUP_ID

public static final String GROUP_ID
See Also:
Constant Field Values

ARTIFACT_ID

public static final String ARTIFACT_ID
See Also:
Constant Field Values

VERSION

public static final 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 Constructor getConstructor(Class clazz,
                                         Class[] signature)

buildFullName

public static String buildFullName(String parentName,
                                   String myName)

versionlessKey

public static String versionlessKey(ObjectWrapper obj)

versionlessKey

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

versionlessKey

public static String versionlessKey(String groupId,
                                    String artifactId)

versionedKey

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

versionedKey

public static String versionedKey(String groupId,
                                  String artifactId,
                                  String version)

isParsableVersion

public static boolean isParsableVersion(String strVersion)

addExclusion

public static boolean addExclusion(ObjectWrapper dependency,
                                   String groupId,
                                   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,
                                          String groupId,
                                          String artifactId)
                                   throws PomToolsException
Adds an exclusion to the dependency which transitively imports the artifact specified by this node.

Parameters:
info -
Throws:
PomToolsException


Copyright © 2011 The Codehaus. All Rights Reserved.