org.apache.maven.artifact.ant
Class Pom
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.maven.artifact.ant.AbstractArtifactTask
org.apache.maven.artifact.ant.AbstractArtifactWithRepositoryTask
org.apache.maven.artifact.ant.Pom
- All Implemented Interfaces:
- Cloneable
public class Pom
- extends AbstractArtifactWithRepositoryTask
A POM typedef. Also an Ant Task that registers a handler called POMPropertyHelper that intercepts all calls to
property value resolution and replies instead of Ant to properties that start with the id of the pom. Example:
${maven.project.artifactId}
- Version:
- $Id: Pom.java 1085345 2011-03-25 12:13:31Z stephenc $
- Author:
- Brett Porter, Nicola Ken Barozzi
Fields inherited from class org.apache.tools.ant.Task |
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
description, location, project |
Constructor Summary |
Pom()
|
Methods inherited from class org.apache.maven.artifact.ant.AbstractArtifactTask |
addLocalRepository, addPom, createAntRemoteRepository, createAntRemoteRepositoryBase, createDummyArtifact, createDummyPom, createLocalArtifactRepository, createMinimalProject, createRemoteArtifactRepository, diagnoseError, execute, getAntReactorPoms, getArtifactRepositoryFactory, getContainer, getDefaultLocalRepository, getLocalRepository, getPom, getPomRefId, getProfileManager, getSettings, getSupportedProtocols, getSupportedProtocolsAsString, initializePom, lookup, lookup, releaseArtifactRepositoryFactory, setPomRefId, setProfiles, setSettingsFile, showVersion, updateRepositoryWithSettings |
Methods inherited from class org.apache.tools.ant.Task |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
clone, getLocation, getProject, setLocation, setProject |
Pom
public Pom()
getRefid
public String getRefid()
setRefid
public void setRefid(String refid)
- The ID used to retrieve this pom object from the Ant project.
- Parameters:
refid
-
setId
public void setId(String id)
- The ID used to store this pom object in the Ant project.
- Parameters:
id
-
getPomFromAntProject
protected void getPomFromAntProject(String refid)
- Retrieve the pom object from the current Ant project using the configured refid.
- Parameters:
refid
-
setMavenProject
public void setMavenProject(org.apache.maven.project.MavenProject mavenProject)
getFile
public File getFile()
setFile
public void setFile(File file)
getProfiles
public List<Profile> getProfiles()
addProfile
public void addProfile(Profile activeProfile)
getArtifact
public org.apache.maven.artifact.Artifact getArtifact()
attach
public void attach(AttachedArtifact attached)
getAttachedArtifacts
public List<org.apache.maven.artifact.Artifact> getAttachedArtifacts()
initialiseMavenProject
public void initialiseMavenProject(org.apache.maven.project.MavenProjectBuilder builder,
org.apache.maven.artifact.repository.ArtifactRepository localRepository)
getMavenProject
protected org.apache.maven.project.MavenProject getMavenProject()
getArtifactId
public String getArtifactId()
getBuild
public org.apache.maven.model.Build getBuild()
getCiManagement
public org.apache.maven.model.CiManagement getCiManagement()
getContributors
public List getContributors()
getDependencies
public List<org.apache.maven.model.Dependency> getDependencies()
getDependencyManagement
public org.apache.maven.model.DependencyManagement getDependencyManagement()
getDescription
public String getDescription()
- Overrides:
getDescription
in class org.apache.tools.ant.ProjectComponent
getDevelopers
public List getDevelopers()
getDistributionManagement
public org.apache.maven.model.DistributionManagement getDistributionManagement()
getGroupId
public String getGroupId()
getInceptionYear
public String getInceptionYear()
getIssueManagement
public org.apache.maven.model.IssueManagement getIssueManagement()
getLicenses
public List getLicenses()
getMailingLists
public List getMailingLists()
getModelVersion
public String getModelVersion()
getModules
public List getModules()
getName
public String getName()
getOrganization
public org.apache.maven.model.Organization getOrganization()
getPackaging
public String getPackaging()
getPluginRepositories
public List getPluginRepositories()
getReporting
public org.apache.maven.model.Reporting getReporting()
getRepositories
public List<org.apache.maven.model.Repository> getRepositories()
getScm
public org.apache.maven.model.Scm getScm()
getUrl
public String getUrl()
getVersion
public String getVersion()
getId
public String getId()
doExecute
protected void doExecute()
- Registers POMPropertyHelper as a property interceptor in Ant 1.6 - 1.7.1, or property delegate in Ant 1.8.0
- Specified by:
doExecute
in class AbstractArtifactTask
getAntProjectProperties
public Properties getAntProjectProperties()
- Convert the Hashtable of Ant project properties to a Properties object
- Returns:
- The Ant project properties
setInheritAllProperties
public void setInheritAllProperties(boolean inheritAllProperties)
- If set to true, all properties are passed to the maven pom. If set to false, only user properties are passed to
the pom.
- Parameters:
inheritAllProperties
-
isInheritAllProperties
public boolean isInheritAllProperties()
getModel
public org.apache.maven.model.Model getModel()
setGroupId
public void setGroupId(String groupId)
setArtifactId
public void setArtifactId(String artifactId)
setVersion
public void setVersion(String version)
addConfiguredParent
public void addConfiguredParent(org.apache.maven.model.Parent parent)
addConfiguredCiManagement
public void addConfiguredCiManagement(org.apache.maven.model.CiManagement ciManagement)
addConfiguredContributor
public void addConfiguredContributor(org.apache.maven.model.Contributor contributor)
addConfiguredDependency
public void addConfiguredDependency(org.apache.maven.model.Dependency dependency)
addConfiguredDependencyManagement
public void addConfiguredDependencyManagement(org.apache.maven.model.DependencyManagement dependencyManagement)
setDescription
public void setDescription(String description)
- Overrides:
setDescription
in class org.apache.tools.ant.ProjectComponent
addConfiguredDeveloper
public void addConfiguredDeveloper(org.apache.maven.model.Developer developer)
setInceptionYear
public void setInceptionYear(String inceptionYear)
addConfiguredIssueManagement
public void addConfiguredIssueManagement(org.apache.maven.model.IssueManagement issueManagement)
addConfiguredLicense
public void addConfiguredLicense(org.apache.maven.model.License license)
addConfiguredMailingLists
public void addConfiguredMailingLists(org.apache.maven.model.MailingList mailingList)
setName
public void setName(String name)
addConfiguredOrganization
public void addConfiguredOrganization(org.apache.maven.model.Organization organization)
setPackaging
public void setPackaging(String packaging)
addConfiguredScm
public void addConfiguredScm(org.apache.maven.model.Scm scm)
setUrl
public void setUrl(String url)
Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.