Package org.codehaus.mojo.flatten
Class FlattenDescriptor
java.lang.Object
org.codehaus.mojo.flatten.FlattenDescriptor
The descriptor that defines the additional POM elements that should be kept and copied to flattened POM.
- Since:
- 1.0.0-beta-2
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Constructor Summary
ConstructorsConstructorDescriptionThe constructor.FlattenDescriptor
(org.codehaus.plexus.util.xml.Xpp3Dom descriptor) The constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetBuild()
getHandling
(PomProperty<?> property) Generic method to get aElementHandling
.getName()
getScm()
getUrl()
boolean
isEmpty()
merge
(FlattenDescriptor descriptor) Creates and returns a newFlattenDescriptor
with theElementHandling
s merged from this and the givenFlattenDescriptor
.void
setArtifactId
(ElementHandling artifactId) void
setBuild
(ElementHandling build) void
setCiManagement
(ElementHandling ciManagement) void
setContributors
(ElementHandling contributors) void
setDefaultOperation
(ElementHandling defaultOperation) void
setDependencies
(ElementHandling dependencies) void
setDependencyManagement
(ElementHandling dependencyManagement) void
setDescription
(ElementHandling description) void
setDevelopers
(ElementHandling developers) void
setDistributionManagement
(ElementHandling distributionManagement) void
setGroupId
(ElementHandling groupId) void
setHandling
(PomProperty<?> property, ElementHandling handling) Generic method to set anElementHandling
.void
setInceptionYear
(ElementHandling inceptionYear) void
setIssueManagement
(ElementHandling issueManagement) void
setMailingLists
(ElementHandling mailingLists) void
setModules
(ElementHandling modules) void
setName
(ElementHandling name) void
setOrganization
(ElementHandling organization) void
setPackaging
(ElementHandling packaging) void
setParent
(ElementHandling parent) void
setPluginManagement
(ElementHandling pluginManagement) void
setPluginRepositories
(ElementHandling pluginRepositories) void
setPrerequisites
(ElementHandling prerequisites) void
setProfiles
(ElementHandling profiles) void
setProperties
(ElementHandling properties) void
setReporting
(ElementHandling reporting) void
setRepositories
(ElementHandling repositories) void
setScm
(ElementHandling scm) void
setUrl
(ElementHandling url) void
setVersion
(ElementHandling version)
-
Constructor Details
-
FlattenDescriptor
public FlattenDescriptor()The constructor. -
FlattenDescriptor
public FlattenDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom descriptor) The constructor.- Parameters:
descriptor
- is the rawXpp3Dom
from the MOJOs configuration.
-
-
Method Details
-
getName2handlingMap
-
getDefaultOperation
-
setDefaultOperation
-
getHandling
Generic method to get aElementHandling
.- Parameters:
property
- is thePomProperty
such asPomProperty.NAME
.- Returns:
- the
ElementHandling
. Will beflattened
as fallback if undefined.
-
setHandling
Generic method to set anElementHandling
.- Parameters:
property
- is thePomProperty
such asPomProperty.NAME
.handling
- the newElementHandling
.
-
getArtifactId
- Returns:
ElementHandling
forartifactId
.
-
setArtifactId
- Parameters:
artifactId
- theartifactId
to set.
-
getGroupId
- Returns:
ElementHandling
forgroupId
.
-
setGroupId
- Parameters:
groupId
- thegroupId
to set.
-
getPackaging
- Returns:
ElementHandling
forpackaging
.
-
setPackaging
- Parameters:
packaging
- thepackaging
to set.
-
getName
- Returns:
ElementHandling
forname
.
-
setName
- Parameters:
name
- thename
to set.
-
getDescription
- Returns:
ElementHandling
fordescription
.
-
setDescription
- Parameters:
description
- thedescription
to set.
-
getUrl
- Returns:
ElementHandling
forURL
.
-
setUrl
- Parameters:
url
- theURL
to set.
-
getInceptionYear
- Returns:
ElementHandling
forinceptionYear
.
-
setInceptionYear
- Parameters:
inceptionYear
- the inceptionYear to set
-
getOrganization
- Returns:
ElementHandling
fororganization
.
-
setOrganization
- Parameters:
organization
- theorganization
to set.
-
getScm
- Returns:
ElementHandling
forSCM
.
-
setScm
- Parameters:
scm
- thescm
to set.
-
getPrerequisites
- Returns:
ElementHandling
forprerequisites
.
-
setPrerequisites
- Parameters:
prerequisites
- theprerequisites
to set.
-
getDevelopers
- Returns:
ElementHandling
fordevelopers
.
-
setDevelopers
- Parameters:
developers
- thedevelopers
to set.
-
getContributors
- Returns:
ElementHandling
forcontributors
.
-
setContributors
- Parameters:
contributors
- thecontributors
to set.
-
getMailingLists
- Returns:
ElementHandling
formailingLists
.
-
setMailingLists
- Parameters:
mailingLists
- themailingLists
to set.
-
getRepositories
- Returns:
ElementHandling
forrepositories
.
-
setRepositories
- Parameters:
repositories
- therepositories
to set.
-
getPluginManagement
- Returns:
ElementHandling
forPluginConfiguration.getPluginManagement()
pluginManagement}.
-
setPluginManagement
- Parameters:
pluginManagement
- thepluginManagement
to set.
-
getPluginRepositories
- Returns:
ElementHandling
forpluginRepositories
.
-
setPluginRepositories
- Parameters:
pluginRepositories
- thepluginRepositories
to set.
-
getIssueManagement
- Returns:
ElementHandling
forissueManagement
.
-
setIssueManagement
- Parameters:
issueManagement
- theissueManagement
to set.
-
getCiManagement
- Returns:
ElementHandling
forciManagement
.
-
setCiManagement
- Parameters:
ciManagement
- theciManagement
to set.
-
getDistributionManagement
- Returns:
ElementHandling
fordistributionManagement
.
-
setDistributionManagement
- Parameters:
distributionManagement
- thedistributionManagement
to set.
-
getDependencyManagement
- Returns:
ElementHandling
fordependencyManagement
.
-
setDependencyManagement
- Parameters:
dependencyManagement
- thedependencyManagement
to set.
-
getBuild
- Returns:
ElementHandling
forbuild
.
-
setBuild
- Parameters:
build
- thebuild
to set.
-
getParent
- Returns:
ElementHandling
forparent
.
-
setParent
- Parameters:
parent
- theparent
to set.
-
getModules
- Returns:
ElementHandling
formodules
.
-
setModules
- Parameters:
modules
- themodules
to set.
-
getProperties
- Returns:
ElementHandling
forproperties
.
-
setProperties
- Parameters:
properties
- theproperties
to set.
-
getReporting
- Returns:
ElementHandling
forreporting
.
-
setReporting
- Parameters:
reporting
- thereporting
to set.
-
getDependencies
- Returns:
ElementHandling
fordependencies
.
-
setDependencies
- Parameters:
dependencies
- thedependencies
to set.
-
getProfiles
- Returns:
ElementHandling
forprofiles
.
-
setProfiles
- Parameters:
profiles
- theprofiles
to set.
-
getVersion
- Returns:
ElementHandling
forversion
.
-
setVersion
- Parameters:
version
- theversion
to set.
-
merge
Creates and returns a newFlattenDescriptor
with theElementHandling
s merged from this and the givenFlattenDescriptor
.- Parameters:
descriptor
- is theFlattenDescriptor
to merge with this one.- Returns:
- the merged
FlattenDescriptor
.
-
isEmpty
public boolean isEmpty()- Returns:
true
if none of the properties has been set explicitly,false
otherwise.
-