KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > project > MavenProjectBuilder


1 package org.apache.maven.project;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * 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, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.artifact.Artifact;
20 import org.apache.maven.artifact.repository.ArtifactRepository;
21 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
22 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
23 import org.apache.maven.profiles.ProfileManager;
24 import org.apache.maven.wagon.events.TransferListener;
25
26 import java.io.File JavaDoc;
27 import java.util.List JavaDoc;
28
29 public interface MavenProjectBuilder
30 {
31     String JavaDoc ROLE = MavenProjectBuilder.class.getName();
32
33     String JavaDoc STANDALONE_SUPERPOM_GROUPID = "org.apache.maven";
34
35     String JavaDoc STANDALONE_SUPERPOM_ARTIFACTID = "super-pom";
36
37     String JavaDoc STANDALONE_SUPERPOM_VERSION = "2.0";
38
39     MavenProject build( File JavaDoc project, ArtifactRepository localRepository, ProfileManager globalProfileManager )
40         throws ProjectBuildingException;
41
42     MavenProject build( File JavaDoc project, ArtifactRepository localRepository, ProfileManager globalProfileManager,
43                         boolean checkDistributionManagementStatus )
44         throws ProjectBuildingException;
45
46     // ----------------------------------------------------------------------
47
// These methods are used by the MavenEmbedder
48
// ----------------------------------------------------------------------
49

50     MavenProject buildWithDependencies( File JavaDoc project, ArtifactRepository localRepository,
51                                         ProfileManager globalProfileManager, TransferListener transferListener )
52         throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException;
53
54     MavenProject buildWithDependencies( File JavaDoc project, ArtifactRepository localRepository,
55                                         ProfileManager globalProfileManager )
56         throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException;
57
58     // ----------------------------------------------------------------------
59
//
60
// ----------------------------------------------------------------------
61

62     /**
63      * Build the artifact from the local repository, resolving it if necessary.
64      *
65      * @param artifact the artifact description
66      * @param localRepository the local repository
67      * @param remoteArtifactRepositories the remote repository list
68      * @return the built project
69      * @throws ProjectBuildingException
70      */

71     MavenProject buildFromRepository( Artifact artifact, List JavaDoc remoteArtifactRepositories,
72                                       ArtifactRepository localRepository )
73         throws ProjectBuildingException;
74
75     /**
76      * Build the artifact from the local repository, resolving it if necessary.
77      *
78      * @param artifact the artifact description
79      * @param localRepository the local repository
80      * @param remoteArtifactRepositories the remote repository list
81      * @param allowStubModel return a stub if the POM is not found
82      * @return the built project
83      * @throws ProjectBuildingException
84      */

85     MavenProject buildFromRepository( Artifact artifact, List JavaDoc remoteArtifactRepositories,
86                                       ArtifactRepository localRepository, boolean allowStubModel )
87         throws ProjectBuildingException;
88
89     MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository )
90         throws ProjectBuildingException;
91 }
92
Popular Tags