Save This Page
Home » maven-2.0.9-src » org.apache » maven » project » [javadoc | source]
org.apache.maven.project
public class: MavenProject [javadoc | source]
java.lang.Object
   org.apache.maven.project.MavenProject

All Implemented Interfaces:
    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
public static final  String EMPTY_PROJECT_GROUP_ID     
public static final  String EMPTY_PROJECT_ARTIFACT_ID     
public static final  String EMPTY_PROJECT_VERSION     
Constructor:
 public MavenProject() 
 public MavenProject(Model model) 
 public MavenProject(MavenProject project) 
    Method from org.apache.maven.project.MavenProject Summary:
    addAttachedArtifact,   addCompileSourceRoot,   addContributor,   addDeveloper,   addLicense,   addMailingList,   addPlugin,   addProjectReference,   addResource,   addScriptSourceRoot,   addTestCompileSourceRoot,   addTestResource,   attachArtifact,   clone,   createArtifacts,   equals,   getActiveProfiles,   getArtifact,   getArtifactId,   getArtifactMap,   getArtifacts,   getAttachedArtifacts,   getBasedir,   getBuild,   getBuildExtensions,   getBuildPlugins,   getCiManagement,   getCollectedProjects,   getCompileArtifacts,   getCompileClasspathElements,   getCompileDependencies,   getCompileSourceRoots,   getContributors,   getDefaultGoal,   getDependencies,   getDependencyArtifacts,   getDependencyManagement,   getDescription,   getDevelopers,   getDistributionManagement,   getDistributionManagementArtifactRepository,   getExecutionProject,   getExtensionArtifactMap,   getExtensionArtifacts,   getFile,   getFilters,   getGoalConfiguration,   getGroupId,   getId,   getInceptionYear,   getIssueManagement,   getLicenses,   getMailingLists,   getManagedVersionMap,   getModel,   getModelVersion,   getModulePathAdjustment,   getModules,   getName,   getOrganization,   getOriginalModel,   getPackaging,   getParent,   getParentArtifact,   getPluginArtifactMap,   getPluginArtifactRepositories,   getPluginArtifacts,   getPluginManagement,   getPluginRepositories,   getPrerequisites,   getProjectReferences,   getProperties,   getReleaseArtifactRepository,   getRemoteArtifactRepositories,   getReportArtifactMap,   getReportArtifacts,   getReportConfiguration,   getReportPlugins,   getReporting,   getRepositories,   getResources,   getRuntimeArtifacts,   getRuntimeClasspathElements,   getRuntimeDependencies,   getScm,   getScriptSourceRoots,   getSnapshotArtifactRepository,   getSystemArtifacts,   getSystemClasspathElements,   getSystemDependencies,   getTestArtifacts,   getTestClasspathElements,   getTestCompileSourceRoots,   getTestDependencies,   getTestResources,   getUrl,   getVersion,   hasParent,   hashCode,   injectPluginManagementInfo,   isExecutionRoot,   replaceWithActiveArtifact,   setActiveProfiles,   setArtifact,   setArtifactId,   setArtifacts,   setAttachedArtifacts,   setBuild,   setCiManagement,   setCollectedProjects,   setCompileSourceRoots,   setContributors,   setDependencies,   setDependencyArtifacts,   setDescription,   setDevelopers,   setDistributionManagement,   setExecutionProject,   setExecutionRoot,   setExtensionArtifacts,   setFile,   setGroupId,   setInceptionYear,   setIssueManagement,   setLicenses,   setMailingLists,   setManagedVersionMap,   setModel,   setModelVersion,   setName,   setOrganization,   setOriginalModel,   setPackaging,   setParent,   setParentArtifact,   setPluginArtifactRepositories,   setPluginArtifacts,   setReleaseArtifactRepository,   setRemoteArtifactRepositories,   setReportArtifacts,   setReporting,   setScm,   setScriptSourceRoots,   setSnapshotArtifactRepository,   setTestCompileSourceRoots,   setUrl,   setVersion,   toString,   writeModel,   writeOriginalModel
    Methods from java.lang.Object:
    equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
    Method from org.apache.maven.project.MavenProject Detail:
     public  void addAttachedArtifact(Artifact artifact) 
     public  void addCompileSourceRoot(String path) 
     public  void addContributor(Contributor contributor) 
     public  void addDeveloper(Developer developer) 
     public  void addLicense(License license) 
     public  void addMailingList(MailingList mailingList) 
     public  void addPlugin(Plugin plugin) 
     public  void addProjectReference(MavenProject project) 
     public  void addResource(Resource resource) 
     public  void addScriptSourceRoot(String path) 
     public  void addTestCompileSourceRoot(String path) 
     public  void addTestResource(Resource testResource) 
     public  void attachArtifact(String type,
        String classifier,
        File file) 
    Deprecated! Use - MavenProjectHelper.attachArtifact(..) instead.

     public Object clone() throws CloneNotSupportedException 
     public Set createArtifacts(ArtifactFactory artifactFactory,
        String inheritedScope,
        ArtifactFilter dependencyFilter) throws InvalidDependencyVersionException 
     public boolean equals(Object other) 
     public List getActiveProfiles() 
     public Artifact getArtifact() 
     public String getArtifactId() 
     public Map getArtifactMap() 
     public Set 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.
     public List getAttachedArtifacts() 
     public File getBasedir() 
     public Build getBuild() 
     public List getBuildExtensions() 
     public List getBuildPlugins() 
     public CiManagement getCiManagement() 
     public List getCollectedProjects() 
     public List getCompileArtifacts() 
     public List getCompileClasspathElements() throws DependencyResolutionRequiredException 
     public List getCompileDependencies() 
     public List getCompileSourceRoots() 
     public List getContributors() 
     public String getDefaultGoal() 
     public List getDependencies() 
     public Set getDependencyArtifacts() 
      Direct dependencies that this project has.
     public DependencyManagement getDependencyManagement() 
     public String getDescription() 
     public List getDevelopers() 
     public DistributionManagement getDistributionManagement() 
     public ArtifactRepository getDistributionManagementArtifactRepository() 
     public MavenProject getExecutionProject() 
     public Map getExtensionArtifactMap() 
     public Set getExtensionArtifacts() 
     public File getFile() 
     public List getFilters() 
     public Xpp3Dom getGoalConfiguration(String pluginGroupId,
        String pluginArtifactId,
        String executionId,
        String goalId) 
     public String getGroupId() 
     public String getId() 
     public String getInceptionYear() 
     public IssueManagement getIssueManagement() 
     public List getLicenses() 
     public List getMailingLists() 
     public Map getManagedVersionMap() 
     public Model getModel() 
     public String getModelVersion() 
     public String getModulePathAdjustment(MavenProject moduleProject) throws IOException 
     public List getModules() 
     public String getName() 
     public Organization getOrganization() 
     public Model getOriginalModel() 
     public String getPackaging() 
     public MavenProject getParent() 
     public Artifact getParentArtifact() 
     public Map getPluginArtifactMap() 
     public List getPluginArtifactRepositories() 
     public Set getPluginArtifacts() 
     public PluginManagement getPluginManagement() 
     public List getPluginRepositories() 
     public Prerequisites getPrerequisites() 
     public Map getProjectReferences() 
     public Properties getProperties() 
     protected ArtifactRepository getReleaseArtifactRepository() 
     public List getRemoteArtifactRepositories() 
     public Map getReportArtifactMap() 
     public Set getReportArtifacts() 
     public Xpp3Dom getReportConfiguration(String pluginGroupId,
        String pluginArtifactId,
        String reportSetId) 
     public List getReportPlugins() 
     public Reporting getReporting() 
     public List getRepositories() 
     public List getResources() 
     public List getRuntimeArtifacts() 
     public List getRuntimeClasspathElements() throws DependencyResolutionRequiredException 
     public List getRuntimeDependencies() 
     public Scm getScm() 
     public List getScriptSourceRoots() 
     protected ArtifactRepository getSnapshotArtifactRepository() 
     public List getSystemArtifacts() 
     public List getSystemClasspathElements() throws DependencyResolutionRequiredException 
     public List getSystemDependencies() 
     public List getTestArtifacts() 
     public List getTestClasspathElements() throws DependencyResolutionRequiredException 
     public List getTestCompileSourceRoots() 
     public List getTestDependencies() 
     public List getTestResources() 
     public String getUrl() 
     public String getVersion() 
     public boolean hasParent() 
     public int hashCode() 
     public  void injectPluginManagementInfo(Plugin plugin) 
     public boolean isExecutionRoot() 
     public Artifact replaceWithActiveArtifact(Artifact pluginArtifact) 
     public  void setActiveProfiles(List activeProfiles) 
     public  void setArtifact(Artifact artifact) 
     public  void setArtifactId(String artifactId) 
     public  void setArtifacts(Set artifacts) 
     protected  void setAttachedArtifacts(List attachedArtifacts) 
     public  void setBuild(Build build) 
     public  void setCiManagement(CiManagement ciManagement) 
     public  void setCollectedProjects(List collectedProjects) 
     protected  void setCompileSourceRoots(List compileSourceRoots) 
     public  void setContributors(List contributors) 
     public  void setDependencies(List dependencies) 
     public  void setDependencyArtifacts(Set dependencyArtifacts) 
     public  void setDescription(String description) 
     public  void setDevelopers(List developers) 
     public  void setDistributionManagement(DistributionManagement distributionManagement) 
     public  void setExecutionProject(MavenProject executionProject) 
     public  void setExecutionRoot(boolean executionRoot) 
     public  void setExtensionArtifacts(Set extensionArtifacts) 
     public  void setFile(File file) 
     public  void setGroupId(String groupId) 
     public  void setInceptionYear(String inceptionYear) 
     public  void setIssueManagement(IssueManagement issueManagement) 
     public  void setLicenses(List licenses) 
     public  void setMailingLists(List mailingLists) 
     public  void setManagedVersionMap(Map map) 
     protected  void setModel(Model model) 
     public  void setModelVersion(String pomVersion) 
     public  void setName(String name) 
     public  void setOrganization(Organization organization) 
     public  void setOriginalModel(Model originalModel) 
     public  void setPackaging(String packaging) 
     public  void setParent(MavenProject parent) 
     public  void setParentArtifact(Artifact parentArtifact) 
     public  void setPluginArtifactRepositories(List pluginArtifactRepositories) 
     public  void setPluginArtifacts(Set pluginArtifacts) 
     public  void setReleaseArtifactRepository(ArtifactRepository releaseArtifactRepository) 
     public  void setRemoteArtifactRepositories(List remoteArtifactRepositories) 
     public  void setReportArtifacts(Set reportArtifacts) 
     public  void setReporting(Reporting reporting) 
     public  void setScm(Scm scm) 
     protected  void setScriptSourceRoots(List scriptSourceRoots) 
     public  void setSnapshotArtifactRepository(ArtifactRepository snapshotArtifactRepository) 
     protected  void setTestCompileSourceRoots(List testCompileSourceRoots) 
     public  void setUrl(String url) 
     public  void setVersion(String version) 
     public String toString() 
      Default toString
     public  void writeModel(Writer writer) throws IOException 
     public  void writeOriginalModel(Writer writer) throws IOException