org.apache.maven.project
Class DefaultMavenProjectBuilder
java.lang.Object
  
org.codehaus.plexus.logging.AbstractLogEnabled
      
org.apache.maven.project.DefaultMavenProjectBuilder
- All Implemented Interfaces: 
 - MavenProjectBuilder, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
 
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 763811 2009-04-09 21:26:37Z bentmann $
 
 
 
 
| 
Method Summary | 
 MavenProject | 
build(File projectDescriptor,
      ArtifactRepository localRepository,
      ProfileManager profileManager)
 
            | 
 MavenProject | 
build(File projectDescriptor,
      ArtifactRepository localRepository,
      ProfileManager profileManager,
      boolean checkDistributionManagementStatus)
 
            | 
 MavenProject | 
build(File pom,
      ProjectBuilderConfiguration config)
 
            | 
 MavenProject | 
build(File pom,
      ProjectBuilderConfiguration config,
      boolean checkDistributionManagementStatus)
 
            | 
 MavenProject | 
buildFromRepository(Artifact artifact,
                    List remoteArtifactRepositories,
                    ArtifactRepository localRepository)
 
          Build the artifact from the local repository, resolving it if necessary. | 
 MavenProject | 
buildFromRepository(Artifact artifact,
                    List remoteArtifactRepositories,
                    ArtifactRepository localRepository,
                    boolean allowStubModel)
 
          Build the artifact from the local repository, resolving it if necessary. | 
 MavenProject | 
buildStandaloneSuperProject(ArtifactRepository localRepository)
 
            | 
 MavenProject | 
buildStandaloneSuperProject(ArtifactRepository localRepository,
                            ProfileManager profileManager)
 
          need to pass a profilemanager with correct context (eg. | 
 MavenProject | 
buildStandaloneSuperProject(ProjectBuilderConfiguration config)
 
            | 
 MavenProject | 
buildWithDependencies(File projectDescriptor,
                      ArtifactRepository localRepository,
                      ProfileManager profileManager)
 
            | 
 MavenProject | 
buildWithDependencies(File projectDescriptor,
                      ArtifactRepository localRepository,
                      ProfileManager profileManager,
                      org.apache.maven.wagon.events.TransferListener transferListener)
 
            | 
 void | 
contextualize(org.codehaus.plexus.context.Context context)
 
            | 
protected  Set | 
createExtensionArtifacts(String projectId,
                         List extensions)
 
            | 
protected  Set | 
createPluginArtifacts(String projectId,
                      List plugins)
 
            | 
protected  Set | 
createReportArtifacts(String projectId,
                      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 | 
 
profilesBuilder
protected MavenProfilesBuilder profilesBuilder
artifactResolver
protected ArtifactResolver artifactResolver
artifactMetadataSource
protected ArtifactMetadataSource artifactMetadataSource
MAVEN_MODEL_VERSION
public static final String MAVEN_MODEL_VERSION
- See Also:
 - Constant Field Values
 
DefaultMavenProjectBuilder
public DefaultMavenProjectBuilder()
initialize
public void initialize()
- Specified by:
 initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
 
 
build
public MavenProject build(File pom,
                          ProjectBuilderConfiguration config)
                   throws ProjectBuildingException
- Specified by:
 build in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
 
build
public MavenProject build(File pom,
                          ProjectBuilderConfiguration config,
                          boolean checkDistributionManagementStatus)
                   throws ProjectBuildingException
- Specified by:
 build in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
 
build
public MavenProject build(File projectDescriptor,
                          ArtifactRepository localRepository,
                          ProfileManager profileManager)
                   throws ProjectBuildingException
- Specified by:
 build in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
 
build
public MavenProject build(File projectDescriptor,
                          ArtifactRepository localRepository,
                          ProfileManager profileManager,
                          boolean checkDistributionManagementStatus)
                   throws ProjectBuildingException
- Specified by:
 build in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
 
buildFromRepository
public MavenProject buildFromRepository(Artifact artifact,
                                        List remoteArtifactRepositories,
                                        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 descriptionremoteArtifactRepositories - the remote repository listlocalRepository - the local repositoryallowStubModel - return a stub if the POM is not found
- Returns:
 - the built project
 - Throws:
 ProjectBuildingException
 
 
buildFromRepository
public MavenProject buildFromRepository(Artifact artifact,
                                        List remoteArtifactRepositories,
                                        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 descriptionremoteArtifactRepositories - the remote repository listlocalRepository - the local repository
- Returns:
 - the built project
 - Throws:
 ProjectBuildingException
 
 
buildStandaloneSuperProject
public MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository)
                                         throws ProjectBuildingException
- Specified by:
 buildStandaloneSuperProject in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
 
buildStandaloneSuperProject
public MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository,
                                                ProfileManager profileManager)
                                         throws ProjectBuildingException
- Description copied from interface: 
MavenProjectBuilder 
- need to pass a profilemanager with correct context (eg. with execution properties)
- Specified by:
 buildStandaloneSuperProject in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
 
 
buildStandaloneSuperProject
public MavenProject buildStandaloneSuperProject(ProjectBuilderConfiguration config)
                                         throws ProjectBuildingException
- Specified by:
 buildStandaloneSuperProject in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
 
buildWithDependencies
public MavenProject buildWithDependencies(File projectDescriptor,
                                          ArtifactRepository localRepository,
                                          ProfileManager profileManager)
                                   throws ProjectBuildingException,
                                          ArtifactResolutionException,
                                          ArtifactNotFoundException
- Specified by:
 buildWithDependencies in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
ArtifactResolutionException
ArtifactNotFoundException
 
buildWithDependencies
public MavenProject buildWithDependencies(File projectDescriptor,
                                          ArtifactRepository localRepository,
                                          ProfileManager profileManager,
                                          org.apache.maven.wagon.events.TransferListener transferListener)
                                   throws ProjectBuildingException,
                                          ArtifactResolutionException,
                                          ArtifactNotFoundException
- Specified by:
 buildWithDependencies in interface MavenProjectBuilder
 
- Throws:
 ProjectBuildingException
ArtifactResolutionException
ArtifactNotFoundException
 
createPluginArtifacts
protected Set createPluginArtifacts(String projectId,
                                    List plugins)
                             throws ProjectBuildingException
 
- Throws:
 ProjectBuildingException
 
createReportArtifacts
protected Set createReportArtifacts(String projectId,
                                    List reports)
                             throws ProjectBuildingException
 
- Throws:
 ProjectBuildingException
 
createExtensionArtifacts
protected Set createExtensionArtifacts(String projectId,
                                       List extensions)
                                throws ProjectBuildingException
 
- 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 © 2001-2010 The Apache Software Foundation. All Rights Reserved.