From 34dfd489220c748c0144067b98c30d5fc5c00de8 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 2 Jun 2009 18:49:44 +0000 Subject: [PATCH] o Added some API docs git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@781120 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/model/ModelBuilder.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/ModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/ModelBuilder.java index 9d4f4a060b..76780d8abe 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/ModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/ModelBuilder.java @@ -24,14 +24,39 @@ import java.io.File; import org.apache.maven.model.resolution.ModelResolver; /** + * Builds the effective model from a POM. + * * @author Benjamin Bentmann */ public interface ModelBuilder { + /** + * Builds the effective model of the specified POM file. Note that this method overload is meant to build the + * effective model for the build process of a project. Hence the effective model supports the notion of a project + * directory. + * + * @param pomFile The POM file of the project to build the effective model from, must not be {@code null}. + * @param request The model building request that holds further settings, must not be {@code null}. + * @param modelResolver The model resolver used to resolve parent POMs that are not locally reachable from the + * project directory, must not be {@code null}. + * @return The result of the model building, never {@code null}. + * @throws ModelBuildingException If the effective model could not be built. + */ ModelBuildingResult build( File pomFile, ModelBuildingRequest request, ModelResolver modelResolver ) throws ModelBuildingException; + /** + * Builds the effective model for the specified POM. In contrast to + * {@link #build(File, ModelBuildingRequest, ModelResolver)} the resulting model does not support the notion of a + * project directory. As a consequence, parent POMs are always resolved via the provided model resolver. + * + * @param modelSource The source of the POM, must not be {@code null}. + * @param request The model building request that holds further settings, must not be {@code null}. + * @param modelResolver The model resolver used to resolve parent POMs, must not be {@code null}. + * @return The result of the model building, never {@code null}. + * @throws ModelBuildingException If the effective model could not be built. + */ ModelBuildingResult build( ModelSource modelSource, ModelBuildingRequest request, ModelResolver modelResolver ) throws ModelBuildingException;