V - is the generic type of the property value.public abstract class PomProperty<V> extends Object
POM. It contains all available
properties as constants and allows generic access to read and write
the property via a Model.| Modifier and Type | Field and Description |
|---|---|
static PomProperty<String> |
ARTIFACT_ID |
static PomProperty<org.apache.maven.model.Build> |
BUILD |
static PomProperty<org.apache.maven.model.CiManagement> |
CI_MANAGEMENT |
static PomProperty<List<org.apache.maven.model.Contributor>> |
CONTRIBUTORS |
static PomProperty<List<org.apache.maven.model.Dependency>> |
DEPENDENCIES |
static PomProperty<org.apache.maven.model.DependencyManagement> |
DEPENDENCY_MANAGEMENT |
static PomProperty<String> |
DESCRIPTION |
static PomProperty<List<org.apache.maven.model.Developer>> |
DEVELOPERS |
static PomProperty<org.apache.maven.model.DistributionManagement> |
DISTRIBUTION_MANAGEMENT |
static PomProperty<String> |
GROUP_ID |
static PomProperty<String> |
INCEPTION_YEAR |
static PomProperty<org.apache.maven.model.IssueManagement> |
ISSUE_MANAGEMENT |
static PomProperty<List<org.apache.maven.model.License>> |
LICENSES |
static PomProperty<List<org.apache.maven.model.MailingList>> |
MAILING_LISTS |
static PomProperty<String> |
MODEL_ENCODING |
static PomProperty<String> |
MODEL_VERSION |
static PomProperty<List<String>> |
MODULES |
static PomProperty<String> |
NAME |
static PomProperty<org.apache.maven.model.Organization> |
ORGANIZATION |
static PomProperty<String> |
PACKAGING |
static PomProperty<org.apache.maven.model.Parent> |
PARENT |
static PomProperty<org.apache.maven.model.PluginManagement> |
PLUGIN_MANAGEMENT |
static PomProperty<List<org.apache.maven.model.Repository>> |
PLUGIN_REPOSITORIES |
static PomProperty<File> |
POM_FILE |
static PomProperty<org.apache.maven.model.Prerequisites> |
PREREQUISITES |
static PomProperty<List<org.apache.maven.model.Profile>> |
PROFILES |
static PomProperty<Properties> |
PROPERTIES |
static PomProperty<org.apache.maven.model.Reporting> |
REPORTING |
static PomProperty<List<org.apache.maven.model.Repository>> |
REPOSITORIES |
static PomProperty<org.apache.maven.model.Scm> |
SCM |
static PomProperty<String> |
URL |
static PomProperty<String> |
VERSION |
| Constructor and Description |
|---|
PomProperty(String name,
Class<V> valueType)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copy(org.apache.maven.model.Model source,
org.apache.maven.model.Model target)
Copies the value identified by this
PomProperty from the given source Model to the
given target Model. |
abstract V |
get(org.apache.maven.model.Model model)
Generic getter for reading a
PomProperty from a Model. |
String |
getName() |
static List<PomProperty<?>> |
getPomProperties() |
Class<V> |
getValueType() |
boolean |
isElement() |
boolean |
isRequired() |
abstract void |
set(org.apache.maven.model.Model model,
V value)
Generic setter for writing a
PomProperty in a Model. |
public static final PomProperty<String> ARTIFACT_ID
Model.getArtifactId()public static final PomProperty<org.apache.maven.model.Build> BUILD
Model.getBuild()public static final PomProperty<org.apache.maven.model.CiManagement> CI_MANAGEMENT
Model.getCiManagement()public static final PomProperty<List<org.apache.maven.model.Contributor>> CONTRIBUTORS
Model.getContributors()public static final PomProperty<List<org.apache.maven.model.Dependency>> DEPENDENCIES
ModelBase.getDependencies()public static final PomProperty<org.apache.maven.model.DependencyManagement> DEPENDENCY_MANAGEMENT
ModelBase.getDependencyManagement()public static final PomProperty<String> DESCRIPTION
Model.getDescription()public static final PomProperty<List<org.apache.maven.model.Developer>> DEVELOPERS
Model.getDevelopers()public static final PomProperty<org.apache.maven.model.DistributionManagement> DISTRIBUTION_MANAGEMENT
ModelBase.getDistributionManagement()public static final PomProperty<String> GROUP_ID
Model.getGroupId()public static final PomProperty<String> INCEPTION_YEAR
Model.getInceptionYear()public static final PomProperty<org.apache.maven.model.IssueManagement> ISSUE_MANAGEMENT
Model.getIssueManagement()public static final PomProperty<List<org.apache.maven.model.License>> LICENSES
Model.getLicenses()public static final PomProperty<List<org.apache.maven.model.MailingList>> MAILING_LISTS
Model.getMailingLists()public static final PomProperty<String> MODEL_ENCODING
Model.getModelEncoding()public static final PomProperty<String> MODEL_VERSION
Model.getModelVersion()public static final PomProperty<List<String>> MODULES
ModelBase.getModules()public static final PomProperty<String> NAME
Model.getName()public static final PomProperty<org.apache.maven.model.Organization> ORGANIZATION
Model.getOrganization()public static final PomProperty<String> PACKAGING
Model.getPackaging()public static final PomProperty<org.apache.maven.model.Parent> PARENT
Model.getParent()public static final PomProperty<org.apache.maven.model.PluginManagement> PLUGIN_MANAGEMENT
PluginConfiguration.getPluginManagement()public static final PomProperty<List<org.apache.maven.model.Repository>> PLUGIN_REPOSITORIES
ModelBase.getPluginRepositories()public static final PomProperty<File> POM_FILE
Model.getPomFile()public static final PomProperty<org.apache.maven.model.Prerequisites> PREREQUISITES
Model.getPrerequisites()public static final PomProperty<List<org.apache.maven.model.Profile>> PROFILES
Model.getProfiles()public static final PomProperty<Properties> PROPERTIES
ModelBase.getProperties()public static final PomProperty<org.apache.maven.model.Reporting> REPORTING
ModelBase.getReporting()public static final PomProperty<List<org.apache.maven.model.Repository>> REPOSITORIES
ModelBase.getPluginRepositories()public static final PomProperty<org.apache.maven.model.Scm> SCM
Model.getScm()public static final PomProperty<String> URL
Model.getUrl()public static final PomProperty<String> VERSION
Model.getVersion()public PomProperty(String name, Class<V> valueType)
name - - see getName().valueType - - see getValueType().public String getName()
public Class<V> getValueType()
Class reflecting the type of the property value.public boolean isRequired()
true if required for flattened POM, false otherwise.public boolean isElement()
true if this property represents an XML element of the POM representation,
false otherwise (if an internal property such as Model.getPomFile()).public abstract V get(org.apache.maven.model.Model model)
PomProperty from a Model.model - is the Model to read from.PomProperty.public abstract void set(org.apache.maven.model.Model model,
V value)
PomProperty in a Model.model - is the Model to write to.value - is the value of the property to write identified by this PomProperty.public void copy(org.apache.maven.model.Model source,
org.apache.maven.model.Model target)
PomProperty from the given source Model to the
given target Model.source - is the Model to copy from (read).target - is the Model to copy to (write).public static List<PomProperty<?>> getPomProperties()
unmodifiable List with all properties.Copyright © 2014–2015 MojoHaus. All rights reserved.