View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.project;
20  
21  import java.io.File;
22  import java.util.List;
23  
24  import org.apache.maven.artifact.Artifact;
25  import org.apache.maven.artifact.repository.ArtifactRepository;
26  import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
27  import org.apache.maven.artifact.resolver.ArtifactResolutionException;
28  import org.apache.maven.profiles.ProfileManager;
29  import org.apache.maven.wagon.events.TransferListener;
30  
31  /**
32   * @deprecated use {@link ProjectBuilder} instead
33   */
34  @Deprecated
35  public interface MavenProjectBuilder {
36  
37      MavenProject build(File pom, ProjectBuilderConfiguration configuration) throws ProjectBuildingException;
38  
39      // TODO maven-site-plugin -- not used by the plugin directly, but used by Doxia Integration Tool & MPIR
40      // see DOXIASITETOOLS-167 & MPIR-349
41      MavenProject build(File pom, ArtifactRepository localRepository, ProfileManager profileManager)
42              throws ProjectBuildingException;
43  
44      // TODO remote-resources-plugin
45      MavenProject buildFromRepository(
46              Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository)
47              throws ProjectBuildingException;
48  
49      // TODO remote-resources-plugin
50      MavenProject buildFromRepository(
51              Artifact artifact,
52              List<ArtifactRepository> remoteRepositories,
53              ArtifactRepository localRepository,
54              boolean allowStubModel)
55              throws ProjectBuildingException;
56  
57      // TODO this is only to provide a project for plugins that don't need a project to execute but need some
58      // of the values from a MavenProject. Ideally this should be something internal and nothing outside Maven
59      // would ever need this so it should not be exposed in a public API
60      MavenProject buildStandaloneSuperProject(ProjectBuilderConfiguration configuration) throws ProjectBuildingException;
61  
62      MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository) throws ProjectBuildingException;
63  
64      MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository, ProfileManager profileManager)
65              throws ProjectBuildingException;
66  
67      MavenProject buildWithDependencies(
68              File pom,
69              ArtifactRepository localRepository,
70              ProfileManager globalProfileManager,
71              TransferListener transferListener)
72              throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException;
73  
74      MavenProject buildWithDependencies(
75              File pom, ArtifactRepository localRepository, ProfileManager globalProfileManager)
76              throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException;
77  }