org.apache.maven.project
Class MavenProject

java.lang.Object
  extended by org.apache.maven.project.MavenProject
All Implemented Interfaces:
Cloneable

public class MavenProject
extends Object
implements Cloneable

The concern of the project is provide runtime values based on the model.

The values in the model remain untouched but during the process of building a project notions like inheritance and interpolation can be added. This allows to have an entity which is useful in a runtime while preserving the model so that it can be marshalled and unmarshalled without being tainted by runtime requirements.

We need to leave the model intact because we don't want the following:

  1. We don't want interpolated values being written back into the model.
  2. We don't want inherited values being written back into the model.


Field Summary
static String EMPTY_PROJECT_ARTIFACT_ID
           
static String EMPTY_PROJECT_GROUP_ID
           
static String EMPTY_PROJECT_VERSION
           
 
Constructor Summary
MavenProject()
           
MavenProject(MavenProject project)
          Deprecated. use clone() so subclasses can provide a copy of the same class
MavenProject(Model model)
           
MavenProject(Model model, RepositorySystem repositorySystem)
          Deprecated. 
 
Method Summary
 void addAttachedArtifact(Artifact artifact)
           
 void addCompileSourceRoot(String path)
           
 void addContributor(Contributor contributor)
           
 void addDeveloper(Developer developer)
           
 void addLicense(License license)
           
 void addLifecyclePhase(String lifecyclePhase)
          Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API.
 void addMailingList(MailingList mailingList)
           
 void addProjectReference(MavenProject project)
           
 void addResource(Resource resource)
           
 void addScriptSourceRoot(String path)
           
 void addTestCompileSourceRoot(String path)
           
 void addTestResource(Resource testResource)
           
 void attachArtifact(String type, String classifier, File file)
          Deprecated. Use MavenProjectHelper.attachArtifact(..) instead.
 MavenProject clone()
           
 Set<Artifact> createArtifacts(ArtifactFactory artifactFactory, String inheritedScope, ArtifactFilter filter)
          Deprecated. 
 boolean equals(Object other)
           
 List<Profile> getActiveProfiles()
           
 Artifact getArtifact()
           
 String getArtifactId()
           
 Map<String,Artifact> getArtifactMap()
           
 Set<Artifact> getArtifacts()
          All dependencies that this project has, including transitive ones.
 List<Artifact> getAttachedArtifacts()
           
 File getBasedir()
           
 Build getBuild()
           
 List<Extension> getBuildExtensions()
           
 List<Plugin> getBuildPlugins()
           
 CiManagement getCiManagement()
           
 org.codehaus.plexus.classworlds.realm.ClassRealm getClassRealm()
          Gets the project's class realm.
 List<MavenProject> getCollectedProjects()
           
 List<Artifact> getCompileArtifacts()
          Deprecated. 
 List<String> getCompileClasspathElements()
           
 List<Dependency> getCompileDependencies()
          Deprecated. 
 List<String> getCompileSourceRoots()
           
 Object getContextValue(String key)
          Returns context value of this project associated with the given key or null if this project has no such value.
 List<Contributor> getContributors()
           
 String getDefaultGoal()
           
 List<Dependency> getDependencies()
           
 Set<Artifact> getDependencyArtifacts()
          Direct dependencies that this project has.
 DependencyManagement getDependencyManagement()
           
 String getDescription()
           
 List<Developer> getDevelopers()
           
 DistributionManagement getDistributionManagement()
           
 ArtifactRepository getDistributionManagementArtifactRepository()
           
 MavenProject getExecutionProject()
           
 Map<String,Artifact> getExtensionArtifactMap()
           
 Set<Artifact> getExtensionArtifacts()
           
 DependencyFilter getExtensionDependencyFilter()
          Gets the dependency filter used to exclude shared extension artifacts from plugin realms.
 File getFile()
           
 List<String> getFilters()
           
 org.codehaus.plexus.util.xml.Xpp3Dom getGoalConfiguration(String pluginGroupId, String pluginArtifactId, String executionId, String goalId)
           
 String getGroupId()
           
 String getId()
           
 String getInceptionYear()
           
 Map<String,List<String>> getInjectedProfileIds()
          Gets the identifiers of all profiles that contributed to this project's effective model.
 IssueManagement getIssueManagement()
           
 List<License> getLicenses()
           
 List<MailingList> getMailingLists()
           
 Map<String,Artifact> getManagedVersionMap()
           
 Model getModel()
           
 String getModelVersion()
           
 String getModulePathAdjustment(MavenProject moduleProject)
           
 List<String> getModules()
           
 String getName()
           
 Organization getOrganization()
           
 Model getOriginalModel()
           
 String getPackaging()
           
 MavenProject getParent()
           
 Artifact getParentArtifact()
           
 File getParentFile()
           
 Plugin getPlugin(String pluginKey)
           
 Map<String,Artifact> getPluginArtifactMap()
           
 List<ArtifactRepository> getPluginArtifactRepositories()
           
 Set<Artifact> getPluginArtifacts()
           
 PluginManagement getPluginManagement()
           
 List<Repository> getPluginRepositories()
           
 Prerequisites getPrerequisites()
           
 ProjectBuildingRequest getProjectBuildingRequest()
          Gets the project building request from which this project instance was created.
 Map<String,MavenProject> getProjectReferences()
           
 Properties getProperties()
           
protected  ArtifactRepository getReleaseArtifactRepository()
           
 List<ArtifactRepository> getRemoteArtifactRepositories()
           
 List<RemoteRepository> getRemotePluginRepositories()
           
 List<RemoteRepository> getRemoteProjectRepositories()
           
 Map<String,Artifact> getReportArtifactMap()
          Deprecated. 
 Set<Artifact> getReportArtifacts()
          Deprecated. 
 org.codehaus.plexus.util.xml.Xpp3Dom getReportConfiguration(String pluginGroupId, String pluginArtifactId, String reportSetId)
          Deprecated. 
 Reporting getReporting()
          Deprecated. 
 List<ReportPlugin> getReportPlugins()
          Deprecated. 
 List<Repository> getRepositories()
           
 List<Resource> getResources()
           
 List<Artifact> getRuntimeArtifacts()
          Deprecated. 
 List<String> getRuntimeClasspathElements()
           
 List<Dependency> getRuntimeDependencies()
          Deprecated. 
 Scm getScm()
           
 List<String> getScriptSourceRoots()
           
protected  ArtifactRepository getSnapshotArtifactRepository()
           
 List<Artifact> getSystemArtifacts()
          Deprecated. 
 List<String> getSystemClasspathElements()
           
 List<Dependency> getSystemDependencies()
          Deprecated. 
 List<Artifact> getTestArtifacts()
          Deprecated. 
 List<String> getTestClasspathElements()
           
 List<String> getTestCompileSourceRoots()
           
 List<Dependency> getTestDependencies()
          Deprecated. 
 List<Resource> getTestResources()
           
 String getUrl()
           
 String getVersion()
           
 int hashCode()
           
 boolean hasLifecyclePhase(String phase)
          Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API.
 boolean hasParent()
           
 boolean isExecutionRoot()
           
 Artifact replaceWithActiveArtifact(Artifact pluginArtifact)
          Deprecated. 
 void setActiveProfiles(List<Profile> activeProfiles)
           
 void setArtifact(Artifact artifact)
           
 void setArtifactFilter(ArtifactFilter artifactFilter)
          Sets the scope filter to select the artifacts being exposed to the currently executed mojo.
 void setArtifactId(String artifactId)
           
 void setArtifacts(Set<Artifact> artifacts)
           
protected  void setAttachedArtifacts(List<Artifact> attachedArtifacts)
           
 void setBuild(Build build)
           
 void setCiManagement(CiManagement ciManagement)
           
 void setClassRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)
          Sets the project's class realm.
 void setCollectedProjects(List<MavenProject> collectedProjects)
           
protected  void setCompileSourceRoots(List<String> compileSourceRoots)
           
 void setContextValue(String key, Object value)
          Sets the value of the context value of this project identified by the given key.
 void setContributors(List<Contributor> contributors)
           
 void setDependencies(List<Dependency> dependencies)
           
 void setDependencyArtifacts(Set<Artifact> dependencyArtifacts)
           
 void setDescription(String description)
           
 void setDevelopers(List<Developer> developers)
           
 void setDistributionManagement(DistributionManagement distributionManagement)
           
 void setExecutionProject(MavenProject executionProject)
           
 void setExecutionRoot(boolean executionRoot)
           
 void setExtensionArtifacts(Set<Artifact> extensionArtifacts)
           
 void setExtensionDependencyFilter(DependencyFilter extensionDependencyFilter)
          Sets the artifact filter used to exclude shared extension artifacts from plugin realms.
 void setFile(File file)
           
 void setGroupId(String groupId)
           
 void setInceptionYear(String inceptionYear)
           
 void setInjectedProfileIds(String source, List<String> injectedProfileIds)
           
 void setIssueManagement(IssueManagement issueManagement)
           
 void setLicenses(List<License> licenses)
           
 void setMailingLists(List<MailingList> mailingLists)
           
 void setManagedVersionMap(Map<String,Artifact> map)
           
protected  void setModel(Model model)
           
 void setModelVersion(String pomVersion)
           
 void setName(String name)
           
 void setOrganization(Organization organization)
           
 void setOriginalModel(Model originalModel)
           
 void setPackaging(String packaging)
           
 void setParent(MavenProject parent)
           
 void setParentArtifact(Artifact parentArtifact)
           
 void setParentFile(File parentFile)
           
 void setPluginArtifactRepositories(List<ArtifactRepository> pluginArtifactRepositories)
           
 void setPluginArtifacts(Set<Artifact> pluginArtifacts)
           
 void setProjectBuildingRequest(ProjectBuildingRequest projectBuildingRequest)
          Sets the project building request from which this project instance was created.
 void setReleaseArtifactRepository(ArtifactRepository releaseArtifactRepository)
           
 void setRemoteArtifactRepositories(List<ArtifactRepository> remoteArtifactRepositories)
           
 void setReportArtifacts(Set<Artifact> reportArtifacts)
          Deprecated. 
 void setReporting(Reporting reporting)
          Deprecated. 
 void setResolvedArtifacts(Set<Artifact> artifacts)
          Sets the transitive dependency artifacts that have been resolved/collected for this project.
 void setScm(Scm scm)
           
protected  void setScriptSourceRoots(List<String> scriptSourceRoots)
           
 void setSnapshotArtifactRepository(ArtifactRepository snapshotArtifactRepository)
           
protected  void setTestCompileSourceRoots(List<String> testCompileSourceRoots)
           
 void setUrl(String url)
           
 void setVersion(String version)
           
 String toString()
          Default toString
 void writeModel(Writer writer)
          Deprecated. Use ModelWriter.
 void writeOriginalModel(Writer writer)
          Deprecated. Use ModelWriter.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_PROJECT_GROUP_ID

public static final String EMPTY_PROJECT_GROUP_ID
See Also:
Constant Field Values

EMPTY_PROJECT_ARTIFACT_ID

public static final String EMPTY_PROJECT_ARTIFACT_ID
See Also:
Constant Field Values

EMPTY_PROJECT_VERSION

public static final String EMPTY_PROJECT_VERSION
See Also:
Constant Field Values
Constructor Detail

MavenProject

public MavenProject()

MavenProject

public MavenProject(Model model)

MavenProject

@Deprecated
public MavenProject(MavenProject project)
Deprecated. use clone() so subclasses can provide a copy of the same class


MavenProject

@Deprecated
public MavenProject(Model model,
                               RepositorySystem repositorySystem)
Deprecated. 

Method Detail

getParentFile

public File getParentFile()

setParentFile

public void setParentFile(File parentFile)

createArtifacts

@Deprecated
public Set<Artifact> createArtifacts(ArtifactFactory artifactFactory,
                                                String inheritedScope,
                                                ArtifactFilter filter)
                              throws InvalidDependencyVersionException
Deprecated. 

Throws:
InvalidDependencyVersionException

getModulePathAdjustment

public String getModulePathAdjustment(MavenProject moduleProject)
                               throws IOException
Throws:
IOException

getArtifact

public Artifact getArtifact()

setArtifact

public void setArtifact(Artifact artifact)

getModel

public Model getModel()

getParent

public MavenProject getParent()

setParent

public void setParent(MavenProject parent)

hasParent

public boolean hasParent()

getFile

public File getFile()

setFile

public void setFile(File file)

getBasedir

public File getBasedir()

setDependencies

public void setDependencies(List<Dependency> dependencies)

getDependencies

public List<Dependency> getDependencies()

getDependencyManagement

public DependencyManagement getDependencyManagement()

addCompileSourceRoot

public void addCompileSourceRoot(String path)

addScriptSourceRoot

public void addScriptSourceRoot(String path)

addTestCompileSourceRoot

public void addTestCompileSourceRoot(String path)

getCompileSourceRoots

public List<String> getCompileSourceRoots()

getScriptSourceRoots

public List<String> getScriptSourceRoots()

getTestCompileSourceRoots

public List<String> getTestCompileSourceRoots()

getCompileClasspathElements

public List<String> getCompileClasspathElements()
                                         throws DependencyResolutionRequiredException
Throws:
DependencyResolutionRequiredException

getCompileArtifacts

@Deprecated
public List<Artifact> getCompileArtifacts()
Deprecated. 


getCompileDependencies

@Deprecated
public List<Dependency> getCompileDependencies()
Deprecated. 


getTestClasspathElements

public List<String> getTestClasspathElements()
                                      throws DependencyResolutionRequiredException
Throws:
DependencyResolutionRequiredException

getTestArtifacts

@Deprecated
public List<Artifact> getTestArtifacts()
Deprecated. 


getTestDependencies

@Deprecated
public List<Dependency> getTestDependencies()
Deprecated. 


getRuntimeClasspathElements

public List<String> getRuntimeClasspathElements()
                                         throws DependencyResolutionRequiredException
Throws:
DependencyResolutionRequiredException

getRuntimeArtifacts

@Deprecated
public List<Artifact> getRuntimeArtifacts()
Deprecated. 


getRuntimeDependencies

@Deprecated
public List<Dependency> getRuntimeDependencies()
Deprecated. 


getSystemClasspathElements

public List<String> getSystemClasspathElements()
                                        throws DependencyResolutionRequiredException
Throws:
DependencyResolutionRequiredException

getSystemArtifacts

@Deprecated
public List<Artifact> getSystemArtifacts()
Deprecated. 


getSystemDependencies

@Deprecated
public List<Dependency> getSystemDependencies()
Deprecated. 


setModelVersion

public void setModelVersion(String pomVersion)

getModelVersion

public String getModelVersion()

getId

public String getId()

setGroupId

public void setGroupId(String groupId)

getGroupId

public String getGroupId()

setArtifactId

public void setArtifactId(String artifactId)

getArtifactId

public String getArtifactId()

setName

public void setName(String name)

getName

public String getName()

setVersion

public void setVersion(String version)

getVersion

public String getVersion()

getPackaging

public String getPackaging()

setPackaging

public void setPackaging(String packaging)

setInceptionYear

public void setInceptionYear(String inceptionYear)

getInceptionYear

public String getInceptionYear()

setUrl

public void setUrl(String url)

getUrl

public String getUrl()

getPrerequisites

public Prerequisites getPrerequisites()

setIssueManagement

public void setIssueManagement(IssueManagement issueManagement)

getCiManagement

public CiManagement getCiManagement()

setCiManagement

public void setCiManagement(CiManagement ciManagement)

getIssueManagement

public IssueManagement getIssueManagement()

setDistributionManagement

public void setDistributionManagement(DistributionManagement distributionManagement)

getDistributionManagement

public DistributionManagement getDistributionManagement()

setDescription

public void setDescription(String description)

getDescription

public String getDescription()

setOrganization

public void setOrganization(Organization organization)

getOrganization

public Organization getOrganization()

setScm

public void setScm(Scm scm)

getScm

public Scm getScm()

setMailingLists

public void setMailingLists(List<MailingList> mailingLists)

getMailingLists

public List<MailingList> getMailingLists()

addMailingList

public void addMailingList(MailingList mailingList)

setDevelopers

public void setDevelopers(List<Developer> developers)

getDevelopers

public List<Developer> getDevelopers()

addDeveloper

public void addDeveloper(Developer developer)

setContributors

public void setContributors(List<Contributor> contributors)

getContributors

public List<Contributor> getContributors()

addContributor

public void addContributor(Contributor contributor)

setBuild

public void setBuild(Build build)

getBuild

public Build getBuild()

getResources

public List<Resource> getResources()

getTestResources

public List<Resource> getTestResources()

addResource

public void addResource(Resource resource)

addTestResource

public void addTestResource(Resource testResource)

setReporting

@Deprecated
public void setReporting(Reporting reporting)
Deprecated. 


getReporting

@Deprecated
public Reporting getReporting()
Deprecated. 


setLicenses

public void setLicenses(List<License> licenses)

getLicenses

public List<License> getLicenses()

addLicense

public void addLicense(License license)

setArtifacts

public void setArtifacts(Set<Artifact> artifacts)

getArtifacts

public Set<Artifact> getArtifacts()
All dependencies that this project has, including transitive ones. Contents are lazily populated, so depending on what phases have run dependencies in some scopes won't be included. eg. if only compile phase has run, dependencies with scope test won't be included.

Returns:
Set < Artifact >
See Also:
to get only direct dependencies

getArtifactMap

public Map<String,Artifact> getArtifactMap()

setPluginArtifacts

public void setPluginArtifacts(Set<Artifact> pluginArtifacts)

getPluginArtifacts

public Set<Artifact> getPluginArtifacts()

getPluginArtifactMap

public Map<String,Artifact> getPluginArtifactMap()

setReportArtifacts

@Deprecated
public void setReportArtifacts(Set<Artifact> reportArtifacts)
Deprecated. 


getReportArtifacts

@Deprecated
public Set<Artifact> getReportArtifacts()
Deprecated. 


getReportArtifactMap

@Deprecated
public Map<String,Artifact> getReportArtifactMap()
Deprecated. 


setExtensionArtifacts

public void setExtensionArtifacts(Set<Artifact> extensionArtifacts)

getExtensionArtifacts

public Set<Artifact> getExtensionArtifacts()

getExtensionArtifactMap

public Map<String,Artifact> getExtensionArtifactMap()

setParentArtifact

public void setParentArtifact(Artifact parentArtifact)

getParentArtifact

public Artifact getParentArtifact()

getRepositories

public List<Repository> getRepositories()

getReportPlugins

@Deprecated
public List<ReportPlugin> getReportPlugins()
Deprecated. 


getBuildPlugins

public List<Plugin> getBuildPlugins()

getModules

public List<String> getModules()

getPluginManagement

public PluginManagement getPluginManagement()

setRemoteArtifactRepositories

public void setRemoteArtifactRepositories(List<ArtifactRepository> remoteArtifactRepositories)

getRemoteArtifactRepositories

public List<ArtifactRepository> getRemoteArtifactRepositories()

setPluginArtifactRepositories

public void setPluginArtifactRepositories(List<ArtifactRepository> pluginArtifactRepositories)

getPluginArtifactRepositories

public List<ArtifactRepository> getPluginArtifactRepositories()
Returns:
a list of ArtifactRepository objects constructed from the Repository objects returned by getPluginRepositories.

getDistributionManagementArtifactRepository

public ArtifactRepository getDistributionManagementArtifactRepository()

getPluginRepositories

public List<Repository> getPluginRepositories()

getRemoteProjectRepositories

public List<RemoteRepository> getRemoteProjectRepositories()

getRemotePluginRepositories

public List<RemoteRepository> getRemotePluginRepositories()

setActiveProfiles

public void setActiveProfiles(List<Profile> activeProfiles)

getActiveProfiles

public List<Profile> getActiveProfiles()

setInjectedProfileIds

public void setInjectedProfileIds(String source,
                                  List<String> injectedProfileIds)

getInjectedProfileIds

public Map<String,List<String>> getInjectedProfileIds()
Gets the identifiers of all profiles that contributed to this project's effective model. This includes active profiles from the project's POM and all its parent POMs as well as from external sources like the settings.xml. The profile identifiers are grouped by the identifier of their source, e.g. <groupId>:<artifactId>:<version> for a POM profile or external for profiles from the settings.xml.

Returns:
The identifiers of all injected profiles, indexed by the source from which the profiles originated, never null.

addAttachedArtifact

public void addAttachedArtifact(Artifact artifact)
                         throws DuplicateArtifactAttachmentException
Throws:
DuplicateArtifactAttachmentException

getAttachedArtifacts

public List<Artifact> getAttachedArtifacts()

getGoalConfiguration

public org.codehaus.plexus.util.xml.Xpp3Dom getGoalConfiguration(String pluginGroupId,
                                                                 String pluginArtifactId,
                                                                 String executionId,
                                                                 String goalId)

getReportConfiguration

@Deprecated
public org.codehaus.plexus.util.xml.Xpp3Dom getReportConfiguration(String pluginGroupId,
                                                                              String pluginArtifactId,
                                                                              String reportSetId)
Deprecated. 


getExecutionProject

public MavenProject getExecutionProject()

setExecutionProject

public void setExecutionProject(MavenProject executionProject)

getCollectedProjects

public List<MavenProject> getCollectedProjects()

setCollectedProjects

public void setCollectedProjects(List<MavenProject> collectedProjects)

getDependencyArtifacts

public Set<Artifact> getDependencyArtifacts()
Direct dependencies that this project has.

Returns:
Set < Artifact >
See Also:
to get all transitive dependencies

setDependencyArtifacts

public void setDependencyArtifacts(Set<Artifact> dependencyArtifacts)

setReleaseArtifactRepository

public void setReleaseArtifactRepository(ArtifactRepository releaseArtifactRepository)

setSnapshotArtifactRepository

public void setSnapshotArtifactRepository(ArtifactRepository snapshotArtifactRepository)

setOriginalModel

public void setOriginalModel(Model originalModel)

getOriginalModel

public Model getOriginalModel()

setManagedVersionMap

public void setManagedVersionMap(Map<String,Artifact> map)

getManagedVersionMap

public Map<String,Artifact> getManagedVersionMap()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getBuildExtensions

public List<Extension> getBuildExtensions()

addProjectReference

public void addProjectReference(MavenProject project)

attachArtifact

@Deprecated
public void attachArtifact(String type,
                                      String classifier,
                                      File file)
Deprecated. Use MavenProjectHelper.attachArtifact(..) instead.


getProperties

public Properties getProperties()

getFilters

public List<String> getFilters()

getProjectReferences

public Map<String,MavenProject> getProjectReferences()

isExecutionRoot

public boolean isExecutionRoot()

setExecutionRoot

public void setExecutionRoot(boolean executionRoot)

getDefaultGoal

public String getDefaultGoal()

getPlugin

public Plugin getPlugin(String pluginKey)

toString

public String toString()
Default toString

Overrides:
toString in class Object

writeModel

@Deprecated
public void writeModel(Writer writer)
                throws IOException
Deprecated. Use ModelWriter.

Throws:
IOException

writeOriginalModel

@Deprecated
public void writeOriginalModel(Writer writer)
                        throws IOException
Deprecated. Use ModelWriter.

Throws:
IOException

clone

public MavenProject clone()
Overrides:
clone in class Object
Throws:
CloneNotSupportedException
Since:
2.0.9

setModel

protected void setModel(Model model)

setAttachedArtifacts

protected void setAttachedArtifacts(List<Artifact> attachedArtifacts)

setCompileSourceRoots

protected void setCompileSourceRoots(List<String> compileSourceRoots)

setTestCompileSourceRoots

protected void setTestCompileSourceRoots(List<String> testCompileSourceRoots)

setScriptSourceRoots

protected void setScriptSourceRoots(List<String> scriptSourceRoots)

getReleaseArtifactRepository

protected ArtifactRepository getReleaseArtifactRepository()

getSnapshotArtifactRepository

protected ArtifactRepository getSnapshotArtifactRepository()

replaceWithActiveArtifact

@Deprecated
public Artifact replaceWithActiveArtifact(Artifact pluginArtifact)
Deprecated. 


setContextValue

public void setContextValue(String key,
                            Object value)
Sets the value of the context value of this project identified by the given key. If the supplied value is null, the context value is removed from this project. Context values are intended to allow core extensions to associate derived state with project instances.


getContextValue

public Object getContextValue(String key)
Returns context value of this project associated with the given key or null if this project has no such value.


setClassRealm

public void setClassRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)
Sets the project's class realm. Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Parameters:
classRealm - The class realm hosting the build extensions of this project, may be null.

getClassRealm

public org.codehaus.plexus.classworlds.realm.ClassRealm getClassRealm()
Gets the project's class realm. This class realm hosts the build extensions of the project. Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Returns:
The project's class realm or null.

setExtensionDependencyFilter

public void setExtensionDependencyFilter(DependencyFilter extensionDependencyFilter)
Sets the artifact filter used to exclude shared extension artifacts from plugin realms. Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Parameters:
extensionDependencyFilter - The dependency filter to apply to plugins, may be null.

getExtensionDependencyFilter

public DependencyFilter getExtensionDependencyFilter()
Gets the dependency filter used to exclude shared extension artifacts from plugin realms. Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Returns:
The dependency filter or null.

setResolvedArtifacts

public void setResolvedArtifacts(Set<Artifact> artifacts)
Sets the transitive dependency artifacts that have been resolved/collected for this project. Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Parameters:
artifacts - The set of artifacts, may be null.

setArtifactFilter

public void setArtifactFilter(ArtifactFilter artifactFilter)
Sets the scope filter to select the artifacts being exposed to the currently executed mojo. Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Parameters:
artifactFilter - The artifact filter, may be null to exclude all artifacts.

hasLifecyclePhase

public boolean hasLifecyclePhase(String phase)
Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Parameters:
phase - The phase to check for, must not be null.
Returns:
true if the phase has been seen.

addLifecyclePhase

public void addLifecyclePhase(String lifecyclePhase)
Warning: This is an internal utility method that is only public for technical reasons, it is not part of the public API. In particular, this method can be changed or deleted without prior notice and must not be used by plugins.

Parameters:
lifecyclePhase - The lifecycle phase to add, must not be null.

getProjectBuildingRequest

public ProjectBuildingRequest getProjectBuildingRequest()
Gets the project building request from which this project instance was created. Warning: This is an utility method that is meant to assist integrators of Maven, it must not be used by Maven plugins.

Returns:
The project building request or null.

setProjectBuildingRequest

public void setProjectBuildingRequest(ProjectBuildingRequest projectBuildingRequest)
Sets the project building request from which this project instance was created. Warning: This is an utility method that is meant to assist integrators of Maven, it must not be used by Maven plugins.

Parameters:
projectBuildingRequest - The project building request, may be null.


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.