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()booleanisEmpty()merge(FlattenDescriptor descriptor) Creates and returns a newFlattenDescriptorwith theElementHandlings merged from this and the givenFlattenDescriptor.voidsetArtifactId(ElementHandling artifactId) voidsetBuild(ElementHandling build) voidsetCiManagement(ElementHandling ciManagement) voidsetContributors(ElementHandling contributors) voidsetDefaultOperation(ElementHandling defaultOperation) voidsetDependencies(ElementHandling dependencies) voidsetDependencyManagement(ElementHandling dependencyManagement) voidsetDescription(ElementHandling description) voidsetDevelopers(ElementHandling developers) voidsetDistributionManagement(ElementHandling distributionManagement) voidsetGroupId(ElementHandling groupId) voidsetHandling(PomProperty<?> property, ElementHandling handling) Generic method to set anElementHandling.voidsetInceptionYear(ElementHandling inceptionYear) voidsetIssueManagement(ElementHandling issueManagement) voidsetMailingLists(ElementHandling mailingLists) voidsetModules(ElementHandling modules) voidsetName(ElementHandling name) voidsetOrganization(ElementHandling organization) voidsetPackaging(ElementHandling packaging) voidsetParent(ElementHandling parent) voidsetPluginManagement(ElementHandling pluginManagement) voidsetPluginRepositories(ElementHandling pluginRepositories) voidsetPrerequisites(ElementHandling prerequisites) voidsetProfiles(ElementHandling profiles) voidsetProperties(ElementHandling properties) voidsetReporting(ElementHandling reporting) voidsetRepositories(ElementHandling repositories) voidsetScm(ElementHandling scm) voidsetUrl(ElementHandling url) voidsetVersion(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 rawXpp3Domfrom the MOJOs configuration.
-
-
Method Details
-
getName2handlingMap
-
getDefaultOperation
-
setDefaultOperation
-
getHandling
Generic method to get aElementHandling.- Parameters:
property- is thePomPropertysuch asPomProperty.NAME.- Returns:
- the
ElementHandling. Will beflattenedas fallback if undefined.
-
setHandling
Generic method to set anElementHandling.- Parameters:
property- is thePomPropertysuch asPomProperty.NAME.handling- the newElementHandling.
-
getArtifactId
- Returns:
ElementHandlingforartifactId.
-
setArtifactId
- Parameters:
artifactId- theartifactIdto set.
-
getGroupId
- Returns:
ElementHandlingforgroupId.
-
setGroupId
- Parameters:
groupId- thegroupIdto set.
-
getPackaging
- Returns:
ElementHandlingforpackaging.
-
setPackaging
- Parameters:
packaging- thepackagingto set.
-
getName
- Returns:
ElementHandlingforname.
-
setName
- Parameters:
name- thenameto set.
-
getDescription
- Returns:
ElementHandlingfordescription.
-
setDescription
- Parameters:
description- thedescriptionto set.
-
getUrl
- Returns:
ElementHandlingforURL.
-
setUrl
- Parameters:
url- theURLto set.
-
getInceptionYear
- Returns:
ElementHandlingforinceptionYear.
-
setInceptionYear
- Parameters:
inceptionYear- the inceptionYear to set
-
getOrganization
- Returns:
ElementHandlingfororganization.
-
setOrganization
- Parameters:
organization- theorganizationto set.
-
getScm
- Returns:
ElementHandlingforSCM.
-
setScm
- Parameters:
scm- thescmto set.
-
getPrerequisites
- Returns:
ElementHandlingforprerequisites.
-
setPrerequisites
- Parameters:
prerequisites- theprerequisitesto set.
-
getDevelopers
- Returns:
ElementHandlingfordevelopers.
-
setDevelopers
- Parameters:
developers- thedevelopersto set.
-
getContributors
- Returns:
ElementHandlingforcontributors.
-
setContributors
- Parameters:
contributors- thecontributorsto set.
-
getMailingLists
- Returns:
ElementHandlingformailingLists.
-
setMailingLists
- Parameters:
mailingLists- themailingListsto set.
-
getRepositories
- Returns:
ElementHandlingforrepositories.
-
setRepositories
- Parameters:
repositories- therepositoriesto set.
-
getPluginManagement
- Returns:
ElementHandlingforPluginConfiguration.getPluginManagement()pluginManagement}.
-
setPluginManagement
- Parameters:
pluginManagement- thepluginManagementto set.
-
getPluginRepositories
- Returns:
ElementHandlingforpluginRepositories.
-
setPluginRepositories
- Parameters:
pluginRepositories- thepluginRepositoriesto set.
-
getIssueManagement
- Returns:
ElementHandlingforissueManagement.
-
setIssueManagement
- Parameters:
issueManagement- theissueManagementto set.
-
getCiManagement
- Returns:
ElementHandlingforciManagement.
-
setCiManagement
- Parameters:
ciManagement- theciManagementto set.
-
getDistributionManagement
- Returns:
ElementHandlingfordistributionManagement.
-
setDistributionManagement
- Parameters:
distributionManagement- thedistributionManagementto set.
-
getDependencyManagement
- Returns:
ElementHandlingfordependencyManagement.
-
setDependencyManagement
- Parameters:
dependencyManagement- thedependencyManagementto set.
-
getBuild
- Returns:
ElementHandlingforbuild.
-
setBuild
- Parameters:
build- thebuildto set.
-
getParent
- Returns:
ElementHandlingforparent.
-
setParent
- Parameters:
parent- theparentto set.
-
getModules
- Returns:
ElementHandlingformodules.
-
setModules
- Parameters:
modules- themodulesto set.
-
getProperties
- Returns:
ElementHandlingforproperties.
-
setProperties
- Parameters:
properties- thepropertiesto set.
-
getReporting
- Returns:
ElementHandlingforreporting.
-
setReporting
- Parameters:
reporting- thereportingto set.
-
getDependencies
- Returns:
ElementHandlingfordependencies.
-
setDependencies
- Parameters:
dependencies- thedependenciesto set.
-
getProfiles
- Returns:
ElementHandlingforprofiles.
-
setProfiles
- Parameters:
profiles- theprofilesto set.
-
getVersion
- Returns:
ElementHandlingforversion.
-
setVersion
- Parameters:
version- theversionto set.
-
merge
Creates and returns a newFlattenDescriptorwith theElementHandlings merged from this and the givenFlattenDescriptor.- Parameters:
descriptor- is theFlattenDescriptorto merge with this one.- Returns:
- the merged
FlattenDescriptor.
-
isEmpty
public boolean isEmpty()- Returns:
trueif none of the properties has been set explicitly,falseotherwise.
-