org.apache.maven.project
Class DefaultMavenProjectBuilder

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.apache.maven.project.DefaultMavenProjectBuilder
All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.logging.LogEnabled, MavenProjectBuilder

public class DefaultMavenProjectBuilder
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements MavenProjectBuilder, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

Version:
$Id: DefaultMavenProjectBuilder.java,v 1.37 2005/03/08 01:55:22 trygvis Exp $

Field Summary
protected  org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
           
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
           
static java.lang.String MAVEN_MODEL_VERSION
           
protected  org.apache.maven.profiles.MavenProfilesBuilder profilesBuilder
           
 
Fields inherited from interface org.apache.maven.project.MavenProjectBuilder
ROLE, STANDALONE_SUPERPOM_ARTIFACTID, STANDALONE_SUPERPOM_GROUPID, STANDALONE_SUPERPOM_VERSION
 
Constructor Summary
DefaultMavenProjectBuilder()
           
 
Method Summary
 MavenProject build(java.io.File projectDescriptor, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager profileManager)
           
 MavenProject build(java.io.File projectDescriptor, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager profileManager, boolean checkDistributionManagementStatus)
           
 MavenProject buildFromRepository(org.apache.maven.artifact.Artifact artifact, java.util.List remoteArtifactRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository)
          Build the artifact from the local repository, resolving it if necessary.
 MavenProject buildFromRepository(org.apache.maven.artifact.Artifact artifact, java.util.List remoteArtifactRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository, boolean allowStubModel)
          Build the artifact from the local repository, resolving it if necessary.
 MavenProject buildStandaloneSuperProject(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
           
 MavenProject buildWithDependencies(java.io.File projectDescriptor, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager profileManager)
           
 MavenProject buildWithDependencies(java.io.File projectDescriptor, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager profileManager, org.apache.maven.wagon.events.TransferListener transferListener)
           
 void contextualize(org.codehaus.plexus.context.Context context)
           
protected  java.util.Set createExtensionArtifacts(java.lang.String projectId, java.util.List extensions)
           
protected  java.util.Set createPluginArtifacts(java.lang.String projectId, java.util.List plugins)
           
protected  java.util.Set createReportArtifacts(java.lang.String projectId, java.util.List reports)
           
 void initialize()
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

profilesBuilder

protected org.apache.maven.profiles.MavenProfilesBuilder profilesBuilder

artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver

artifactMetadataSource

protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource

MAVEN_MODEL_VERSION

public static final java.lang.String MAVEN_MODEL_VERSION
See Also:
Constant Field Values
Constructor Detail

DefaultMavenProjectBuilder

public DefaultMavenProjectBuilder()
Method Detail

initialize

public void initialize()
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable

buildWithDependencies

public MavenProject buildWithDependencies(java.io.File projectDescriptor,
                                          org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                                          ProfileManager profileManager)
                                   throws ProjectBuildingException,
                                          org.apache.maven.artifact.resolver.ArtifactResolutionException,
                                          org.apache.maven.artifact.resolver.ArtifactNotFoundException
Specified by:
buildWithDependencies in interface MavenProjectBuilder
Throws:
ProjectBuildingException
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException

buildWithDependencies

public MavenProject buildWithDependencies(java.io.File projectDescriptor,
                                          org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                                          ProfileManager profileManager,
                                          org.apache.maven.wagon.events.TransferListener transferListener)
                                   throws ProjectBuildingException,
                                          org.apache.maven.artifact.resolver.ArtifactResolutionException,
                                          org.apache.maven.artifact.resolver.ArtifactNotFoundException
Specified by:
buildWithDependencies in interface MavenProjectBuilder
Throws:
ProjectBuildingException
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException

build

public MavenProject build(java.io.File projectDescriptor,
                          org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                          ProfileManager profileManager)
                   throws ProjectBuildingException
Specified by:
build in interface MavenProjectBuilder
Throws:
ProjectBuildingException

build

public MavenProject build(java.io.File projectDescriptor,
                          org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                          ProfileManager profileManager,
                          boolean checkDistributionManagementStatus)
                   throws ProjectBuildingException
Specified by:
build in interface MavenProjectBuilder
Throws:
ProjectBuildingException

buildFromRepository

public MavenProject buildFromRepository(org.apache.maven.artifact.Artifact artifact,
                                        java.util.List remoteArtifactRepositories,
                                        org.apache.maven.artifact.repository.ArtifactRepository localRepository)
                                 throws ProjectBuildingException
Description copied from interface: MavenProjectBuilder
Build the artifact from the local repository, resolving it if necessary.

Specified by:
buildFromRepository in interface MavenProjectBuilder
Parameters:
artifact - the artifact description
localRepository - the local repository
remoteArtifactRepositories - the remote repository list
Returns:
the built project
Throws:
ProjectBuildingException

buildFromRepository

public MavenProject buildFromRepository(org.apache.maven.artifact.Artifact artifact,
                                        java.util.List remoteArtifactRepositories,
                                        org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                                        boolean allowStubModel)
                                 throws ProjectBuildingException
Description copied from interface: MavenProjectBuilder
Build the artifact from the local repository, resolving it if necessary.

Specified by:
buildFromRepository in interface MavenProjectBuilder
Parameters:
artifact - the artifact description
localRepository - the local repository
remoteArtifactRepositories - the remote repository list
allowStubModel - return a stub if the POM is not found
Returns:
the built project
Throws:
ProjectBuildingException

createPluginArtifacts

protected java.util.Set createPluginArtifacts(java.lang.String projectId,
                                              java.util.List plugins)
                                       throws ProjectBuildingException
Throws:
ProjectBuildingException

createReportArtifacts

protected java.util.Set createReportArtifacts(java.lang.String projectId,
                                              java.util.List reports)
                                       throws ProjectBuildingException
Throws:
ProjectBuildingException

createExtensionArtifacts

protected java.util.Set createExtensionArtifacts(java.lang.String projectId,
                                                 java.util.List extensions)
                                          throws ProjectBuildingException
Throws:
ProjectBuildingException

buildStandaloneSuperProject

public MavenProject buildStandaloneSuperProject(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
                                         throws ProjectBuildingException
Specified by:
buildStandaloneSuperProject in interface MavenProjectBuilder
Throws:
ProjectBuildingException

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException


Copyright 2006 Apache Software Foundation. All Rights Reserved.