maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r800468 - in /maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model: building/ composition/ inheritance/ interpolation/ management/ normalization/ plugin/ profile/
Date Mon, 03 Aug 2009 17:15:12 GMT
Author: bentmann
Date: Mon Aug  3 17:15:11 2009
New Revision: 800468

URL: http://svn.apache.org/viewvc?rev=800468&view=rev
Log:
o Refactored model building components to use problem collector

Removed:
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolationException.java
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/composition/DefaultDependencyManagementImporter.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/InheritanceAssembler.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DependencyManagementInjector.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/PluginManagementInjector.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/ModelNormalizer.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/PluginConfigurationExpander.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileInjector.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=800468&r1=800467&r2=800468&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
Mon Aug  3 17:15:11 2009
@@ -35,7 +35,6 @@
 import org.apache.maven.model.Repository;
 import org.apache.maven.model.composition.DependencyManagementImporter;
 import org.apache.maven.model.inheritance.InheritanceAssembler;
-import org.apache.maven.model.interpolation.ModelInterpolationException;
 import org.apache.maven.model.interpolation.ModelInterpolator;
 import org.apache.maven.model.io.ModelParseException;
 import org.apache.maven.model.io.ModelReader;
@@ -137,7 +136,7 @@
 
             problems.setSourceHint( tmpModel );
 
-            modelNormalizer.mergeDuplicates( tmpModel, request );
+            modelNormalizer.mergeDuplicates( tmpModel, request, problems );
 
             List<Profile> activePomProfiles =
                 profileSelector.getActiveProfiles( rawModel.getProfiles(), profileActivationContext,
problems );
@@ -145,14 +144,14 @@
 
             for ( Profile activeProfile : activePomProfiles )
             {
-                profileInjector.injectProfile( tmpModel, activeProfile, request );
+                profileInjector.injectProfile( tmpModel, activeProfile, request, problems
);
             }
 
             if ( currentData == resultData )
             {
                 for ( Profile activeProfile : activeExternalProfiles )
                 {
-                    profileInjector.injectProfile( tmpModel, activeProfile, request );
+                    profileInjector.injectProfile( tmpModel, activeProfile, request, problems
);
                 }
             }
 
@@ -166,7 +165,7 @@
         superData.setActiveProfiles( Collections.<Profile> emptyList() );
         lineage.add( superData );
 
-        assembleInheritance( lineage, request );
+        assembleInheritance( lineage, request, problems );
 
         Model resultModel = resultData.getModel();
 
@@ -212,7 +211,7 @@
 
         modelPathTranslator.alignToBaseDirectory( resultModel, resultModel.getProjectDirectory(),
request );
 
-        pluginManagementInjector.injectBasicManagement( resultModel, request );
+        pluginManagementInjector.injectBasicManagement( resultModel, request, problems );
 
         fireBuildExtensionsAssembled( resultModel, request, problems );
 
@@ -221,17 +220,17 @@
             lifecycleBindingsInjector.injectLifecycleBindings( resultModel, problems );
         }
 
-        pluginManagementInjector.injectManagement( resultModel, request );
+        pluginManagementInjector.injectManagement( resultModel, request, problems );
 
         importDependencyManagement( resultModel, request, problems );
 
-        dependencyManagementInjector.injectManagement( resultModel, request );
+        dependencyManagementInjector.injectManagement( resultModel, request, problems );
 
-        modelNormalizer.injectDefaultValues( resultModel, request );
+        modelNormalizer.injectDefaultValues( resultModel, request, problems );
 
         if ( request.isProcessPlugins() )
         {
-            pluginConfigurationExpander.expandPluginConfiguration( resultModel, request );
+            pluginConfigurationExpander.expandPluginConfiguration( resultModel, request,
problems );
         }
 
         modelValidator.validateEffectiveModel( resultModel, request, problems );
@@ -345,30 +344,22 @@
         }
     }
 
-    private void assembleInheritance( List<ModelData> lineage, ModelBuildingRequest
request )
+    private void assembleInheritance( List<ModelData> lineage, ModelBuildingRequest
request,
+                                      ModelProblemCollector problems )
     {
         for ( int i = lineage.size() - 2; i >= 0; i-- )
         {
             Model parent = lineage.get( i + 1 ).getModel();
             Model child = lineage.get( i ).getModel();
-            inheritanceAssembler.assembleModelInheritance( child, parent, request );
+            inheritanceAssembler.assembleModelInheritance( child, parent, request, problems
);
         }
     }
 
     private Model interpolateModel( Model model, ModelBuildingRequest request, ModelProblemCollector
problems )
     {
-        try
-        {
-            Model result = modelInterpolator.interpolateModel( model, model.getProjectDirectory(),
request );
-            result.setPomFile( model.getPomFile() );
-            return result;
-        }
-        catch ( ModelInterpolationException e )
-        {
-            problems.addError( "Invalid expression: " + e.getMessage(), e );
-
-            return model;
-        }
+        Model result = modelInterpolator.interpolateModel( model, model.getProjectDirectory(),
request, problems );
+        result.setPomFile( model.getPomFile() );
+        return result;
     }
 
     private ModelData readParent( Model childModel, ModelBuildingRequest request, DefaultModelProblemCollector
problems )
@@ -635,7 +626,7 @@
             importMngts.add( importMngt );
         }
 
-        dependencyManagementImporter.importManagement( model, importMngts, request );
+        dependencyManagementImporter.importManagement( model, importMngts, request, problems
);
     }
 
     private <T> void putCache( ModelCache modelCache, String groupId, String artifactId,
String version,

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
Mon Aug  3 17:15:11 2009
@@ -28,6 +28,7 @@
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.codehaus.plexus.component.annotations.Component;
 
 /**
@@ -41,7 +42,7 @@
 {
 
     public void importManagement( Model target, List<? extends DependencyManagement>
sources,
-                                  ModelBuildingRequest request )
+                                  ModelBuildingRequest request, ModelProblemCollector problems
)
     {
         if ( sources != null && !sources.isEmpty() )
         {

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java
Mon Aug  3 17:15:11 2009
@@ -24,6 +24,7 @@
 import org.apache.maven.model.DependencyManagement;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 /**
  * Handles the import of dependency management from other models into the target model.
@@ -39,7 +40,9 @@
      * @param target The model into which to import the dependency management section, must
not be <code>null</code>.
      * @param sources The dependency management sections to import, may be <code>null</code>.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void importManagement( Model target, List<? extends DependencyManagement> sources,
ModelBuildingRequest request );
+    void importManagement( Model target, List<? extends DependencyManagement> sources,
ModelBuildingRequest request,
+                           ModelProblemCollector problems );
 
 }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
Mon Aug  3 17:15:11 2009
@@ -32,6 +32,7 @@
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.model.Reporting;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
 
@@ -47,7 +48,8 @@
 
     private InheritanceModelMerger merger = new InheritanceModelMerger();
 
-    public void assembleModelInheritance( Model child, Model parent, ModelBuildingRequest
request )
+    public void assembleModelInheritance( Model child, Model parent, ModelBuildingRequest
request,
+                                          ModelProblemCollector problems )
     {
         Map<Object, Object> hints = new HashMap<Object, Object>();
         hints.put( MavenModelMerger.CHILD_PATH_ADJUSTMENT, getChildPathAdjustment( child,
parent ) );

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/InheritanceAssembler.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/InheritanceAssembler.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/InheritanceAssembler.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/InheritanceAssembler.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 /**
  * Handles inheritance of model values.
@@ -39,7 +40,9 @@
      *            <code>null</code>.
      * @param parent The (read-only) parent model from which to inherit the values, may be
<code>null</code>.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void assembleModelInheritance( Model child, Model parent, ModelBuildingRequest request
);
+    void assembleModelInheritance( Model child, Model parent, ModelBuildingRequest request,
+                                   ModelProblemCollector problems );
 
 }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.path.PathTranslator;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.interpolation.AbstractValueSource;
@@ -187,8 +188,8 @@
     }
     
     protected String interpolateInternal( String src, List<? extends ValueSource> valueSources,
-                                          List<? extends InterpolationPostProcessor>
postProcessors )
-        throws ModelInterpolationException
+                                          List<? extends InterpolationPostProcessor>
postProcessors,
+                                          ModelProblemCollector problems )
     {
         if ( src.indexOf( "${" ) < 0 )
         {
@@ -215,9 +216,9 @@
                 {
                     result = interpolator.interpolate( result, recursionInterceptor );
                 }
-                catch( InterpolationException e )
+                catch ( InterpolationException e )
                 {
-                    throw new ModelInterpolationException( e.getMessage(), e );
+                    problems.addError( e.getMessage(), e );
                 }
 
                 interpolator.clearFeedback();

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 import java.io.File;
 
@@ -44,11 +45,9 @@
      * @param projectDir The project directory, may be {@code null} if the model does not
belong to a local project but
      *            to some artifact's metadata.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      * @return The interpolated model, never {@code null}.
-     * @throws ModelInterpolationException If the model could not be interpolated (e.g. due
to expressions with cyclic
-     *             references).
      */
-    Model interpolateModel( Model model, File projectDir, ModelBuildingRequest request )
-        throws ModelInterpolationException;
+    Model interpolateModel( Model model, File projectDir, ModelBuildingRequest request, ModelProblemCollector
problems );
 
 }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.interpolation.InterpolationPostProcessor;
 import org.codehaus.plexus.interpolation.Interpolator;
@@ -47,16 +48,15 @@
     private static final Map<Class<?>, Field[]> fieldsByClass = new WeakHashMap<Class<?>,
Field[]>();
     private static final Map<Class<?>, Boolean> fieldIsPrimitiveByClass = new
WeakHashMap<Class<?>, Boolean>();
 
-    public Model interpolateModel( Model model, File projectDir, ModelBuildingRequest config
)
-        throws ModelInterpolationException
+    public Model interpolateModel( Model model, File projectDir, ModelBuildingRequest config,
+                                   ModelProblemCollector problems )
     {
-        interpolateObject( model, model, projectDir, config );
+        interpolateObject( model, model, projectDir, config, problems );
         
         return model;
     }
     
-    protected void interpolateObject( Object obj, Model model, File projectDir, ModelBuildingRequest
config )
-        throws ModelInterpolationException
+    protected void interpolateObject( Object obj, Model model, File projectDir, ModelBuildingRequest
config, ModelProblemCollector problems )
     {
         try
         {
@@ -64,14 +64,9 @@
             List<? extends InterpolationPostProcessor> postProcessors = createPostProcessors(
model, projectDir, config );
             
             InterpolateObjectAction action =
-                new InterpolateObjectAction( obj, valueSources, postProcessors, this );
+                new InterpolateObjectAction( obj, valueSources, postProcessors, this, problems
);
             
-            ModelInterpolationException error = AccessController.doPrivileged( action );
-            
-            if ( error != null )
-            {
-                throw error;
-            }
+            AccessController.doPrivileged( action );
         }
         finally
         {
@@ -87,17 +82,18 @@
         return interpolator;
     }
     
-    private static final class InterpolateObjectAction implements PrivilegedAction<ModelInterpolationException>
+    private static final class InterpolateObjectAction implements PrivilegedAction<Object>
     {
 
         private final LinkedList<Object> interpolationTargets;
         private final StringSearchModelInterpolator modelInterpolator;
         private final List<? extends ValueSource> valueSources;
         private final List<? extends InterpolationPostProcessor> postProcessors;
+        private final ModelProblemCollector problems;
         
         public InterpolateObjectAction( Object target, List<? extends ValueSource>
valueSources,
                                         List<? extends InterpolationPostProcessor>
postProcessors,
-                                        StringSearchModelInterpolator modelInterpolator )
+                                        StringSearchModelInterpolator modelInterpolator,
ModelProblemCollector problems )
         {
             this.valueSources = valueSources;
             this.postProcessors = postProcessors;
@@ -106,22 +102,17 @@
             interpolationTargets.add( target );
             
             this.modelInterpolator = modelInterpolator;
+
+            this.problems = problems;
         }
 
-        public ModelInterpolationException run()
+        public Object run()
         {
             while( !interpolationTargets.isEmpty() )
             {
                 Object obj = interpolationTargets.removeFirst();
                 
-                try
-                {
-                    traverseObjectWithParents( obj.getClass(), obj );
-                }
-                catch ( ModelInterpolationException e )
-                {
-                    return e;
-                }
+                traverseObjectWithParents( obj.getClass(), obj );
             }
             
             return null;
@@ -129,7 +120,6 @@
 
         @SuppressWarnings("unchecked")
         private void traverseObjectWithParents( Class<?> cls, Object target )
-            throws ModelInterpolationException
         {
             if ( cls == null )
             {
@@ -166,7 +156,9 @@
                                     String value = (String) fields[i].get( target );
                                     if ( value != null )
                                     {
-                                        String interpolated = modelInterpolator.interpolateInternal(
value, valueSources, postProcessors );
+                                        String interpolated =
+                                            modelInterpolator.interpolateInternal( value,
valueSources, postProcessors,
+                                                                                   problems
);
                                         
                                         if ( !interpolated.equals( value ) )
                                         {
@@ -195,7 +187,10 @@
                                             {
                                                 if( String.class == value.getClass() )
                                                 {
-                                                    String interpolated = modelInterpolator.interpolateInternal(
(String) value, valueSources, postProcessors );
+                                                    String interpolated =
+                                                        modelInterpolator.interpolateInternal(
(String) value,
+                                                                                        
      valueSources,
+                                                                                        
      postProcessors, problems );
                                                     
                                                     if ( !interpolated.equals( value ) )
                                                     {
@@ -240,7 +235,10 @@
                                             {
                                                 if( String.class == value.getClass() )
                                                 {
-                                                    String interpolated = modelInterpolator.interpolateInternal(
(String) value, valueSources, postProcessors );
+                                                    String interpolated =
+                                                        modelInterpolator.interpolateInternal(
(String) value,
+                                                                                        
      valueSources,
+                                                                                        
      postProcessors, problems );
                                                     
                                                     if ( !interpolated.equals( value ) )
                                                     {
@@ -287,11 +285,13 @@
                             }
                             catch ( IllegalArgumentException e )
                             {
-                                throw new ModelInterpolationException( "Failed to interpolate
field: " + fields[i] + " on class: " + cls.getName(), e );
+                                problems.addError( "Failed to interpolate field: " + fields[i]
+ " on class: "
+                                    + cls.getName(), e );
                             }
                             catch ( IllegalAccessException e )
                             {
-                                throw new ModelInterpolationException( "Failed to interpolate
field: " + fields[i] + " on class: " + cls.getName(), e );
+                                problems.addError( "Failed to interpolate field: " + fields[i]
+ " on class: "
+                                    + cls.getName(), e );
                             }
                         }
                         finally
@@ -336,7 +336,6 @@
         }
 
         private void evaluateArray( Object target )
-            throws ModelInterpolationException
         {
             int len = Array.getLength( target );
             for( int i = 0; i < len; i++ )
@@ -346,7 +345,9 @@
                 {
                     if ( String.class == value.getClass() )
                     {
-                        String interpolated = modelInterpolator.interpolateInternal( (String)
value, valueSources, postProcessors );
+                        String interpolated =
+                            modelInterpolator.interpolateInternal( (String) value, valueSources,
postProcessors,
+                                                                   problems );
                         
                         if ( !interpolated.equals( value ) )
                         {

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java
Mon Aug  3 17:15:11 2009
@@ -30,6 +30,7 @@
 import org.apache.maven.model.Exclusion;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
 
@@ -45,7 +46,7 @@
 
     private ManagementModelMerger merger = new ManagementModelMerger();
 
-    public void injectManagement( Model model, ModelBuildingRequest request )
+    public void injectManagement( Model model, ModelBuildingRequest request, ModelProblemCollector
problems )
     {
         merger.mergeManagedDependencies( model );
     }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java
Mon Aug  3 17:15:11 2009
@@ -33,6 +33,7 @@
 import org.apache.maven.model.PluginExecution;
 import org.apache.maven.model.PluginManagement;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
 
@@ -48,12 +49,12 @@
 
     private ManagementModelMerger merger = new ManagementModelMerger();
 
-    public void injectManagement( Model model, ModelBuildingRequest request )
+    public void injectManagement( Model model, ModelBuildingRequest request, ModelProblemCollector
problems )
     {
         merger.mergeManagedBuildPlugins( model, false );
     }
 
-    public void injectBasicManagement( Model model, ModelBuildingRequest request )
+    public void injectBasicManagement( Model model, ModelBuildingRequest request, ModelProblemCollector
problems )
     {
         merger.mergeManagedBuildPlugins( model, true );
     }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DependencyManagementInjector.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DependencyManagementInjector.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DependencyManagementInjector.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/DependencyManagementInjector.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 /**
  * Handles injection of dependency management into the model.
@@ -36,7 +37,8 @@
      * @param child The model into which to merge the values specified by its dependency
management sections, must not
      *            be <code>null</code>.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void injectManagement( Model child, ModelBuildingRequest request );
+    void injectManagement( Model child, ModelBuildingRequest request, ModelProblemCollector
problems );
 
 }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/PluginManagementInjector.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/PluginManagementInjector.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/PluginManagementInjector.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/management/PluginManagementInjector.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 /**
  * Handles injection of plugin management into the model.
@@ -36,8 +37,9 @@
      * @param child The model into which to merge the values specified by its plugin management
section, must not be
      *            <code>null</code>.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void injectManagement( Model child, ModelBuildingRequest request );
+    void injectManagement( Model child, ModelBuildingRequest request, ModelProblemCollector
problems );
 
     /**
      * Merges important default values from the plugin management section of the given model
into itself. In detail,
@@ -47,7 +49,8 @@
      * @param child The model into which to merge the values specified by its plugin management
section, must not be
      *            <code>null</code>.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void injectBasicManagement( Model child, ModelBuildingRequest request );
+    void injectBasicManagement( Model child, ModelBuildingRequest request, ModelProblemCollector
problems );
 
 }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
Mon Aug  3 17:15:11 2009
@@ -30,6 +30,7 @@
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.StringUtils;
@@ -46,7 +47,7 @@
 
     private DuplicateMerger merger = new DuplicateMerger();
 
-    public void mergeDuplicates( Model model, ModelBuildingRequest request )
+    public void mergeDuplicates( Model model, ModelBuildingRequest request, ModelProblemCollector
problems )
     {
         Build build = model.getBuild();
         if ( build != null )
@@ -95,7 +96,7 @@
 
     }
 
-    public void injectDefaultValues( Model model, ModelBuildingRequest request )
+    public void injectDefaultValues( Model model, ModelBuildingRequest request, ModelProblemCollector
problems )
     {
         injectDependencyDefaults( model.getDependencies() );
 

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/ModelNormalizer.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/ModelNormalizer.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/ModelNormalizer.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/normalization/ModelNormalizer.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 /**
  * Handles normalization of a model. In this context, normalization is the process of producing
a canonical
@@ -34,10 +35,11 @@
     /**
      * Merges duplicate elements like multiple declarations of the same build plugin in the
specified model.
      * 
-     * @param model The model whose duplicate elements should be merged, must not be <code>null</code>.
+     * @param model The model whose duplicate elements should be merged, must not be {@code
null}.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void mergeDuplicates( Model model, ModelBuildingRequest request );
+    void mergeDuplicates( Model model, ModelBuildingRequest request, ModelProblemCollector
problems );
 
     /**
      * Sets default values in the specified model that for technical reasons cannot be set
directly in the Modello
@@ -45,7 +47,8 @@
      * 
      * @param model The model in which to set the default values, must not be {@code null}.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void injectDefaultValues( Model model, ModelBuildingRequest request );
+    void injectDefaultValues( Model model, ModelBuildingRequest request, ModelProblemCollector
problems );
 
 }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java
Mon Aug  3 17:15:11 2009
@@ -27,6 +27,7 @@
 import org.apache.maven.model.ReportSet;
 import org.apache.maven.model.Reporting;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
@@ -40,7 +41,7 @@
     implements PluginConfigurationExpander
 {
 
-    public void expandPluginConfiguration( Model model, ModelBuildingRequest request )
+    public void expandPluginConfiguration( Model model, ModelBuildingRequest request, ModelProblemCollector
problems )
     {
         Build build = model.getBuild();
         Reporting reporting = model.getReporting();

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/PluginConfigurationExpander.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/PluginConfigurationExpander.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/PluginConfigurationExpander.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/plugin/PluginConfigurationExpander.java
Mon Aug  3 17:15:11 2009
@@ -21,6 +21,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 /**
  * Handles expansion of general plugin configuration into individual executions and report
sets.
@@ -36,7 +37,8 @@
      * 
      * @param model The model whose plugin configuration should be expanded, must not be
<code>null</code>.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void expandPluginConfiguration( Model model, ModelBuildingRequest request );
+    void expandPluginConfiguration( Model model, ModelBuildingRequest request, ModelProblemCollector
problems );
 
 }

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
Mon Aug  3 17:15:11 2009
@@ -36,6 +36,7 @@
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.model.Reporting;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
 
@@ -51,7 +52,8 @@
 
     private ProfileModelMerger merger = new ProfileModelMerger();
 
-    public void injectProfile( Model model, Profile profile, ModelBuildingRequest request
)
+    public void injectProfile( Model model, Profile profile, ModelBuildingRequest request,
+                               ModelProblemCollector problems )
     {
         if ( profile != null )
         {

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileInjector.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileInjector.java?rev=800468&r1=800467&r2=800468&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileInjector.java
(original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileInjector.java
Mon Aug  3 17:15:11 2009
@@ -22,6 +22,7 @@
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.building.ModelProblemCollector;
 
 /**
  * Handles profile injection into the model.
@@ -38,7 +39,8 @@
      * @param model The model into which to merge the values defined by the profile, must
not be <code>null</code>.
      * @param profile The (read-only) profile whose values should be injected, may be <code>null</code>.
      * @param request The model building request that holds further settings, must not be
{@code null}.
+     * @param problems The container used to collect problems that were encountered, must
not be {@code null}.
      */
-    void injectProfile( Model model, Profile profile, ModelBuildingRequest request );
+    void injectProfile( Model model, Profile profile, ModelBuildingRequest request, ModelProblemCollector
problems );
 
 }



Mime
View raw message