org.apache.maven.project

## Interface MavenProjectBuilder

- All Known Implementing Classes:
    DefaultMavenProjectBuilder

      public interface MavenProjectBuilder

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ROLE`
    `static java.lang.String` | `STANDALONE_SUPERPOM_ARTIFACTID`
    `static java.lang.String` | `STANDALONE_SUPERPOM_GROUPID`
    `static java.lang.String` | `STANDALONE_SUPERPOM_VERSION`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MavenProject` | `build(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager)`
    `MavenProject` | `build(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, boolean checkDistributionManagementStatus)`
    `MavenProject` | `build(java.io.File pom, ProjectBuilderConfiguration config)`
    `MavenProject` | `build(java.io.File pom, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus)`
    `MavenProject` | `buildFromRepository(Artifact artifact, java.util.List remoteArtifactRepositories, ArtifactRepository localRepository)` Build the artifact from the local repository, resolving it if necessary.
    `MavenProject` | `buildFromRepository(Artifact artifact, java.util.List remoteArtifactRepositories, ArtifactRepository localRepository, boolean allowStubModel)` Build the artifact from the local repository, resolving it if necessary.
    `MavenProject` | `buildStandaloneSuperProject(ArtifactRepository localRepository)` Deprecated. Use `buildStandaloneSuperProject(ProjectBuilderConfiguration)` instead.
    `MavenProject` | `buildStandaloneSuperProject(ArtifactRepository localRepository, ProfileManager profileManager)` Deprecated. Use `buildStandaloneSuperProject(ProjectBuilderConfiguration)` instead.
    `MavenProject` | `buildStandaloneSuperProject(ProjectBuilderConfiguration config)`
    `MavenProject` | `buildWithDependencies(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager)`
    `MavenProject` | `buildWithDependencies(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, TransferListener transferListener)`
    `void` | `calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config)` Variant of `calculateConcreteState(MavenProject, ProjectBuilderConfiguration, boolean)` which assumes that project references should be processed.
    `void` | `calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config, boolean processReferences)` Up to this point, the build section of the POM remains uninterpolated except for the artifact coordinates it contains.

- - ### Field Detail

    - #### ROLE

          static final java.lang.String ROLE

    - #### STANDALONE_SUPERPOM_GROUPID

          static final java.lang.String STANDALONE_SUPERPOM_GROUPID

      See Also:
        Constant Field Values

    - #### STANDALONE_SUPERPOM_ARTIFACTID

          static final java.lang.String STANDALONE_SUPERPOM_ARTIFACTID

      See Also:
        Constant Field Values

    - #### STANDALONE_SUPERPOM_VERSION

          static final java.lang.String STANDALONE_SUPERPOM_VERSION

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### build

          MavenProject build(java.io.File project,
                           ArtifactRepository localRepository,
                           ProfileManager globalProfileManager)
                             throws ProjectBuildingException

      Throws:
        `ProjectBuildingException`

    - #### build

          MavenProject build(java.io.File project,
                           ArtifactRepository localRepository,
                           ProfileManager globalProfileManager,
                           boolean checkDistributionManagementStatus)
                             throws ProjectBuildingException

      Throws:
        `ProjectBuildingException`

    - #### buildWithDependencies

          MavenProject buildWithDependencies(java.io.File project,
                                           ArtifactRepository localRepository,
                                           ProfileManager globalProfileManager,
                                           TransferListener transferListener)
                                             throws ProjectBuildingException,
                                                    ArtifactResolutionException,
                                                    ArtifactNotFoundException

      Throws:
        `ProjectBuildingException`
        `ArtifactResolutionException`
        `ArtifactNotFoundException`

    - #### buildWithDependencies

          MavenProject buildWithDependencies(java.io.File project,
                                           ArtifactRepository localRepository,
                                           ProfileManager globalProfileManager)
                                             throws ProjectBuildingException,
                                                    ArtifactResolutionException,
                                                    ArtifactNotFoundException

      Throws:
        `ProjectBuildingException`
        `ArtifactResolutionException`
        `ArtifactNotFoundException`

    - #### buildFromRepository

          MavenProject buildFromRepository(Artifact artifact,
                                         java.util.List remoteArtifactRepositories,
                                         ArtifactRepository localRepository)
                                           throws ProjectBuildingException

      Build the artifact from the local repository, resolving it if necessary.
      Parameters:
        `artifact` - the artifact description
        `localRepository` - the local repository
        `remoteArtifactRepositories` - the remote repository list
      Returns:
        the built project
      Throws:
        `ProjectBuildingException`

    - #### buildFromRepository

          MavenProject buildFromRepository(Artifact artifact,
                                         java.util.List remoteArtifactRepositories,
                                         ArtifactRepository localRepository,
                                         boolean allowStubModel)
                                           throws ProjectBuildingException

      Build the artifact from the local repository, resolving it if necessary.
      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`

    - #### buildStandaloneSuperProject

          MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository)
                                                   throws ProjectBuildingException

      Deprecated. Use `buildStandaloneSuperProject(ProjectBuilderConfiguration)` instead.
      Throws:
        `ProjectBuildingException`

    - #### buildStandaloneSuperProject

          MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository,
                                                 ProfileManager profileManager)
                                                   throws ProjectBuildingException

      Deprecated. Use `buildStandaloneSuperProject(ProjectBuilderConfiguration)` instead.
      need to pass a profilemanager with correct context (eg. with execution properties)
      Throws:
        `ProjectBuildingException`

    - #### buildStandaloneSuperProject

          MavenProject buildStandaloneSuperProject(ProjectBuilderConfiguration config)
                                                   throws ProjectBuildingException

      Throws:
        `ProjectBuildingException`

    - #### build

          MavenProject build(java.io.File pom,
                           ProjectBuilderConfiguration config)
                             throws ProjectBuildingException

      Throws:
        `ProjectBuildingException`

    - #### build

          MavenProject build(java.io.File pom,
                           ProjectBuilderConfiguration config,
                           boolean checkDistributionManagementStatus)
                             throws ProjectBuildingException

      Throws:
        `ProjectBuildingException`

    - #### calculateConcreteState

          void calculateConcreteState(MavenProject project,
                                    ProjectBuilderConfiguration config)
                                      throws ModelInterpolationException

      Variant of `calculateConcreteState(MavenProject, ProjectBuilderConfiguration, boolean)` which assumes that project references should be processed. This is provided for performance reasons, for cases where you know all projects in the reactor will be processed, making traversal of project references unnecessary.
      Throws:
        `ModelInterpolationException`

    - #### calculateConcreteState

          void calculateConcreteState(MavenProject project,
                                    ProjectBuilderConfiguration config,
                                    boolean processReferences)
                                      throws ModelInterpolationException

      Up to this point, the build section of the POM remains uninterpolated except for the artifact coordinates it contains. This method will interpolate the build section and associated project-instance data structures. Along with the `MavenProjectBuilder#restoreDynamicState(MavenProject, ProjectBuilderConfiguration, boolean)` method, this method allows expressions in these areas of the POM and project instance to be reevaluated in the event that a mojo changes one the build-path values, or a project property.
      This method will process the following:
      1. the specified project's parent project (if not null)
      2. specified project
      3. its execution project (if not null)
      4. any project references (iff processReferences == true)
      Throws:
        `ModelInterpolationException`