org.codehaus.mojo.properties
Class GetGAVProperty

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.properties.GetGAVProperty
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class GetGAVProperty
extends org.apache.maven.plugin.AbstractMojo

Find a GAV specific property value using GroupId+ArtifactId+Version. The logic goes from most specific to least specific. If there is a value for the full GAV, that value is used. Otherwise, a value for GroupId + ArtifactId, or finally just GroupId. If no value is found, the defaultValue is used. A new project property with .gav appended is set if a value is found.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
GetGAVProperty()
           
 
Method Summary
 void execute()
           
 String getArtifactId()
           
 String getDefaultValue()
           
 String getGroupId()
           
protected  List<String> getKeys()
           
 org.apache.maven.project.MavenProject getProject()
           
 String getProperty()
           
protected  String getProperty(String key)
           
 String getSuffix()
           
protected  String getValue(org.apache.maven.project.MavenProject project, List<String> keys)
           
 String getVersion()
           
 void setArtifactId(String artifactId)
           
 void setDefaultValue(String defaultValue)
           
 void setGroupId(String groupId)
           
 void setProject(org.apache.maven.project.MavenProject project)
           
 void setProperty(String property)
           
 void setSuffix(String suffix)
           
 void setVersion(String version)
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetGAVProperty

public GetGAVProperty()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getValue

protected String getValue(org.apache.maven.project.MavenProject project,
                          List<String> keys)

getKeys

protected List<String> getKeys()

getProperty

protected String getProperty(String key)

getProject

public org.apache.maven.project.MavenProject getProject()

getGroupId

public String getGroupId()

setGroupId

public void setGroupId(String groupId)

getArtifactId

public String getArtifactId()

setArtifactId

public void setArtifactId(String artifactId)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

getProperty

public String getProperty()

setProperty

public void setProperty(String property)

getDefaultValue

public String getDefaultValue()

setDefaultValue

public void setDefaultValue(String defaultValue)

setProject

public void setProject(org.apache.maven.project.MavenProject project)

getSuffix

public String getSuffix()

setSuffix

public void setSuffix(String suffix)


Copyright © 2009-2013 The Kuali Foundation. All Rights Reserved.