001: package org.apache.maven.project;
002:
003: /*
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021:
022: /*
023: * Licensed to the Apache Software Foundation (ASF) under one
024: * or more contributor license agreements. See the NOTICE file
025: * distributed with this work for additional information
026: * regarding copyright ownership. The ASF licenses this file
027: * to you under the Apache License, Version 2.0 (the
028: * "License"); you may not use this file except in compliance
029: * with the License. You may obtain a copy of the License at
030: *
031: * http://www.apache.org/licenses/LICENSE-2.0
032: *
033: * Unless required by applicable law or agreed to in writing,
034: * software distributed under the License is distributed on an
035: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
036: * KIND, either express or implied. See the License for the
037: * specific language governing permissions and limitations
038: * under the License.
039: */
040:
041: import org.apache.maven.artifact.Artifact;
042: import org.apache.maven.artifact.repository.ArtifactRepository;
043: import org.apache.maven.profiles.ProfileManager;
044: import org.apache.maven.wagon.events.TransferListener;
045:
046: import java.io.File;
047: import java.util.List;
048:
049: public interface MavenProjectBuilder {
050: String ROLE = MavenProjectBuilder.class.getName();
051:
052: String STANDALONE_SUPERPOM_GROUPID = "org.apache.maven";
053:
054: String STANDALONE_SUPERPOM_ARTIFACTID = "super-pom";
055:
056: String STANDALONE_SUPERPOM_VERSION = "2.0";
057:
058: boolean STRICT_MODEL_PARSING = true;
059:
060: MavenProject build(File project,
061: ArtifactRepository localRepository,
062: ProfileManager globalProfileManager)
063: throws ProjectBuildingException;
064:
065: MavenProject build(File project,
066: ArtifactRepository localRepository,
067: ProfileManager globalProfileManager,
068: boolean checkDistributionManagementStatus)
069: throws ProjectBuildingException;
070:
071: // ----------------------------------------------------------------------
072: // These methods are used by the MavenEmbedder
073: // ----------------------------------------------------------------------
074:
075: MavenProjectBuildingResult buildWithDependencies(File project,
076: ArtifactRepository localRepository,
077: ProfileManager globalProfileManager,
078: TransferListener transferListener)
079: throws ProjectBuildingException;
080:
081: MavenProjectBuildingResult buildWithDependencies(File project,
082: ArtifactRepository localRepository,
083: ProfileManager globalProfileManager)
084: throws ProjectBuildingException;
085:
086: // ----------------------------------------------------------------------
087: //
088: // ----------------------------------------------------------------------
089:
090: /**
091: * Build the artifact from the local repository, resolving it if necessary.
092: *
093: * @param artifact the artifact description
094: * @param localRepository the local repository
095: * @param remoteArtifactRepositories the remote repository list
096: * @return the built project
097: * @throws ProjectBuildingException
098: */
099: MavenProject buildFromRepository(Artifact artifact,
100: List remoteArtifactRepositories,
101: ArtifactRepository localRepository)
102: throws ProjectBuildingException;
103:
104: /**
105: * Build the artifact from the local repository, resolving it if necessary.
106: *
107: * @param artifact the artifact description
108: * @param localRepository the local repository
109: * @param remoteArtifactRepositories the remote repository list
110: * @param allowStubModel return a stub if the POM is not found
111: * @return the built project
112: * @throws ProjectBuildingException
113: */
114: MavenProject buildFromRepository(Artifact artifact,
115: List remoteArtifactRepositories,
116: ArtifactRepository localRepository, boolean allowStubModel)
117: throws ProjectBuildingException;
118:
119: MavenProject buildStandaloneSuperProject()
120: throws ProjectBuildingException;
121: }
|