Package org.codehaus.mojo.flatten
Class PomProperty<V>
java.lang.Object
org.codehaus.mojo.flatten.PomProperty<V>
- Type Parameters:
V
- is the generic type of theproperty value
.
This class reflects a property of a
POM
. It contains all available
properties
as constants and allows generic access to read
and write
the property via a Model
.- Since:
- 1.0.0-beta-4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PomProperty
<String> static final PomProperty
<org.apache.maven.model.Build> static final PomProperty
<org.apache.maven.model.CiManagement> static final PomProperty
<List<org.apache.maven.model.Contributor>> static final PomProperty
<List<org.apache.maven.model.Dependency>> static final PomProperty
<org.apache.maven.model.DependencyManagement> static final PomProperty
<String> static final PomProperty
<List<org.apache.maven.model.Developer>> static final PomProperty
<org.apache.maven.model.DistributionManagement> static final PomProperty
<String> static final PomProperty
<String> static final PomProperty
<org.apache.maven.model.IssueManagement> static final PomProperty
<List<org.apache.maven.model.License>> static final PomProperty
<List<org.apache.maven.model.MailingList>> static final PomProperty
<String> static final PomProperty
<String> static final PomProperty
<List<String>> private final String
static final PomProperty
<String> static final PomProperty
<org.apache.maven.model.Organization> static final PomProperty
<String> static final PomProperty
<org.apache.maven.model.Parent> static final PomProperty
<org.apache.maven.model.PluginManagement> static final PomProperty
<List<org.apache.maven.model.Repository>> static final PomProperty
<File> private static final List
<PomProperty<?>> private static final PomProperty<?>[]
static final PomProperty
<org.apache.maven.model.Prerequisites> static final PomProperty
<List<org.apache.maven.model.Profile>> static final PomProperty
<Properties> static final PomProperty
<org.apache.maven.model.Reporting> static final PomProperty
<List<org.apache.maven.model.Repository>> static final PomProperty
<org.apache.maven.model.Scm> static final PomProperty
<String> static final PomProperty
<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(org.apache.maven.model.Model source, org.apache.maven.model.Model target) Copies the value identified by thisPomProperty
from the givensource
Model
to the giventarget
Model
.abstract V
get
(org.apache.maven.model.Model model) Generic getter for reading aPomProperty
from aModel
.getName()
static List
<PomProperty<?>> boolean
boolean
abstract void
Generic setter for writing aPomProperty
in aModel
.
-
Field Details
-
ARTIFACT_ID
- See Also:
-
BUILD
- See Also:
-
CI_MANAGEMENT
- See Also:
-
CONTRIBUTORS
- See Also:
-
DEPENDENCIES
- See Also:
-
DEPENDENCY_MANAGEMENT
- See Also:
-
DESCRIPTION
- See Also:
-
DEVELOPERS
- See Also:
-
DISTRIBUTION_MANAGEMENT
public static final PomProperty<org.apache.maven.model.DistributionManagement> DISTRIBUTION_MANAGEMENT- See Also:
-
GROUP_ID
- See Also:
-
INCEPTION_YEAR
- See Also:
-
ISSUE_MANAGEMENT
- See Also:
-
LICENSES
- See Also:
-
MAILING_LISTS
- See Also:
-
MODEL_ENCODING
- See Also:
-
MODEL_VERSION
- See Also:
-
MODULES
- See Also:
-
NAME
- See Also:
-
ORGANIZATION
- See Also:
-
PACKAGING
- See Also:
-
PARENT
- See Also:
-
PLUGIN_MANAGEMENT
- See Also:
-
PLUGIN_REPOSITORIES
- See Also:
-
POM_FILE
- See Also:
-
PREREQUISITES
- See Also:
-
PROFILES
- See Also:
-
PROPERTIES
- See Also:
-
REPORTING
- See Also:
-
REPOSITORIES
- See Also:
-
SCM
- See Also:
-
URL
- See Also:
-
VERSION
- See Also:
-
POM_PROPERTIES_ARRAY
-
POM_PROPERTIES
-
name
-
valueType
-
-
Constructor Details
-
PomProperty
The constructor.- Parameters:
name
- - seegetName()
.valueType
- - seegetValueType()
.
-
-
Method Details
-
getName
- Returns:
- name
-
getValueType
- Returns:
Class
reflecting the type of theproperty value
.
-
isRequired
public boolean isRequired()- Returns:
true
if required for flattened POM,false
otherwise.
-
isElement
public boolean isElement()- Returns:
true
if this property represents an XML element of the POM representation,false
otherwise (if an internal property such asModel.getPomFile()
).
-
get
Generic getter for reading aPomProperty
from aModel
.- Parameters:
model
- is theModel
to read from.- Returns:
- the value of the property to read identified by this
PomProperty
.
-
set
Generic setter for writing aPomProperty
in aModel
.- Parameters:
model
- is theModel
to write to.value
- is the value of the property to write identified by thisPomProperty
.
-
copy
public void copy(org.apache.maven.model.Model source, org.apache.maven.model.Model target) Copies the value identified by thisPomProperty
from the givensource
Model
to the giventarget
Model
.- Parameters:
source
- is theModel
to copy from (read).target
- is theModel
to copy to (write).
-
getPomProperties
- Returns:
- an
unmodifiable
List
with allproperties
.
-