maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r797988 - in /maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building: DefaultModelBuilder.java DefaultModelBuildingRequest.java ModelBuildingRequest.java
Date Sun, 26 Jul 2009 20:36:32 GMT
Author: bentmann
Date: Sun Jul 26 20:36:32 2009
New Revision: 797988

URL: http://svn.apache.org/viewvc?rev=797988&view=rev
Log:
o Enabled two-phase model building which allows to address inter-model dependencies within
a reactor build

Modified:
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java?rev=797988&r1=797987&r2=797988&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Sun Jul 26 20:36:32 2009
@@ -190,7 +190,10 @@
             result.setRawModel( modelId, currentData.getRawModel() );
         }
 
-        build( request, result );
+        if ( !request.isTwoPhaseBuilding() )
+        {
+            build( request, result );
+        }
 
         return result;
     }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java?rev=797988&r1=797987&r2=797988&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
Sun Jul 26 20:36:32 2009
@@ -45,6 +45,8 @@
 
     private boolean processPlugins;
 
+    private boolean twoPhaseBuilding;
+
     private List<Profile> profiles;
 
     private List<String> activeProfileIds;
@@ -111,6 +113,18 @@
         return this;
     }
 
+    public boolean isTwoPhaseBuilding()
+    {
+        return twoPhaseBuilding;
+    }
+
+    public DefaultModelBuildingRequest setTwoPhaseBuilding( boolean twoPhaseBuilding )
+    {
+        this.twoPhaseBuilding = twoPhaseBuilding;
+
+        return this;
+    }
+
     public List<Profile> getProfiles()
     {
         if ( profiles == null )

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java?rev=797988&r1=797987&r2=797988&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java
Sun Jul 26 20:36:32 2009
@@ -135,6 +135,27 @@
     ModelBuildingRequest setProcessPlugins( boolean processPlugins );
 
     /**
+     * Indicates whether the model building should happen in two phases. If enabled, the
initial invocation of the model
+     * builder will only produce an interim result which may be used to analyze inter-model
dependencies before the
+     * final invocation of the model builder is performed.
+     * 
+     * @return {@code true} if two-phase building is enabled, {@code false} if the model
should be build in a single
+     *         step.
+     */
+    boolean isTwoPhaseBuilding();
+
+    /**
+     * Enables/disables two-phase building. If enabled, the initial invocation of the model
builder will only produce an
+     * interim result which may be used to analyze inter-model dependencies before the final
invocation of the model
+     * builder is performed.
+     * 
+     * @param twoPhaseBuilding {@code true} to enable two-phase building, {@code false} if
the model should be build in
+     *            a single step.
+     * @return This request, never {@code null}.
+     */
+    ModelBuildingRequest setTwoPhaseBuilding( boolean twoPhaseBuilding );
+
+    /**
      * Gets the external profiles that should be considered for model building.
      * 
      * @return The external profiles that should be considered for model building, never
{@code null}.



Mime
View raw message