svn commit: r758241 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java

2009-03-25 Thread ltheussl
Author: ltheussl
Date: Wed Mar 25 12:51:44 2009
New Revision: 758241

URL: http://svn.apache.org/viewvc?rev=758241view=rev
Log:
Remove unnecessary eol filtering

Modified:

maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java

Modified: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java?rev=758241r1=758240r2=758241view=diff
==
--- 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
 Wed Mar 25 12:51:44 2009
@@ -142,8 +142,8 @@
 }
 
 // No section, only subsection 1 and 2
-assertTrue( noNewLine( content ).indexOf( a 
href=\#Section_11\Section 11/a ) != -1 );
-assertTrue( noNewLine( content ).indexOf( a 
href=\#Section_1211\Section 1211/a ) == -1 );
+assertTrue( content.indexOf( a href=\#Section_11\Section 11/a 
) != -1 );
+assertTrue( content.indexOf( a href=\#Section_1211\Section 
1211/a ) == -1 );
 }
 
 /** @throws Exception  */
@@ -315,17 +315,6 @@
 }
 
 /**
- * TODO move me!
- *
- * @param text
- * @return
- */
-private String noNewLine( String text )
-{
-return text.replaceAll( EOL,  );
-}
-
-/**
  * Test section with ids.
  *
  * @throws java.lang.Exception if any.




svn commit: r758309 - in /maven/components/branches/MNG-2766/maven-core/src/test: java/org/apache/maven/lifecycle/LifecycleExecutorTest.java projects/lifecycle-executor/project-with-inheritance/ repos

2009-03-25 Thread jvanzyl
Author: jvanzyl
Date: Wed Mar 25 15:40:52 2009
New Revision: 758309

URL: http://svn.apache.org/viewvc?rev=758309view=rev
Log:
o finished a pattern for the testing of lifecycles, now it's time to create 
tests for the plugin manager and default maven component

Added:

maven/components/branches/MNG-2766/maven-core/src/test/projects/lifecycle-executor/project-with-inheritance/
Removed:
maven/components/branches/MNG-2766/maven-core/src/test/repository-projects/
Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java?rev=758309r1=758308r2=758309view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java
 Wed Mar 25 15:40:52 2009
@@ -41,26 +41,38 @@
 
 @Requirement
 private DefaultLifecycleExecutor lifecycleExecutor;
-
-File pom;
-File targetPom;
 
 protected void setUp()
 throws Exception
 {
+// Components 
 projectBuilder = lookup( MavenProjectBuilder.class );
 repositorySystem = lookup( RepositorySystem.class );
 pluginManager = lookup( PluginManager.class );
 lifecycleExecutor = (DefaultLifecycleExecutor) lookup( 
LifecycleExecutor.class );
-targetPom = new File( getBasedir(), 
target/lifecycle-executor/pom-plugin.xml );
+}
 
-if ( !targetPom.exists() )
+protected String getProjectsDirectory()
+{
+return src/test/projects/lifecycle-executor;
+}
+
+protected File getProject( String name )
+throws Exception
+{
+File source = new File( new File( getBasedir(), getProjectsDirectory() 
), name );
+File target = new File( new File ( getBasedir(), target ), name );
+if ( !target.exists() )
 {
-pom = new File( getBasedir(), src/test/pom.xml );
-FileUtils.copyFile( pom, targetPom );
+FileUtils.copyDirectoryStructure( source, target );
 }
+return new File( target, pom.xml );
 }
-
+
+// 
---
+// 
+// 
---

+
 public void testLifecyclePhases()
 {
 assertNotNull( lifecycleExecutor.getLifecyclePhases() );
@@ -73,18 +85,10 @@
 public void testLifecycleQueryingUsingADefaultLifecyclePhase()
 throws Exception
 {   
-// This stuff all needs to be reduced, reduced, reduced
-String base = 
projects/lifecycle-executor/project-with-additional-lifecycle-elements;
-File sourceDirectory = new File( getBasedir(), src/test/ + base );
-File targetDirectory = new File( getBasedir(), target/ + base );
-FileUtils.copyDirectoryStructure( sourceDirectory, targetDirectory );
-File targetPom = new File( targetDirectory, pom.xml );
-MavenSession session = createMavenSession( targetPom );
+File pom = getProject( project-with-additional-lifecycle-elements );
+MavenSession session = createMavenSession( pom );
 assertEquals( project-with-additional-lifecycle-elements, 
session.getCurrentProject().getArtifactId() );
 assertEquals( 1.0-SNAPSHOT, session.getCurrentProject().getVersion() 
);
-// So this is wrong if we already have the session, which contains a 
request, which in turn contains
-// the goals we are trying to run
-
 ListMojoDescriptor lifecyclePlan = 
lifecycleExecutor.calculateLifecyclePlan( package, session );
 
 // resources:resources
@@ -109,12 +113,8 @@
 public void testLifecycleExecutionUsingADefaultLifecyclePhase()
 throws Exception
 {
-String base = 
projects/lifecycle-executor/project-with-additional-lifecycle-elements;
-File sourceDirectory = new File( getBasedir(), src/test/ + base );
-File targetDirectory = new File( getBasedir(), target/ + base );
-FileUtils.copyDirectoryStructure( sourceDirectory, targetDirectory );
-File targetPom = new File( targetDirectory, pom.xml );   
 
-MavenSession session = createMavenSession( targetPom );
+File pom = getProject( project-with-additional-lifecycle-elements );
+MavenSession session = createMavenSession( pom );
 assertEquals( 

svn commit: r758314 - /maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java

2009-03-25 Thread jvanzyl
Author: jvanzyl
Date: Wed Mar 25 15:48:51 2009
New Revision: 758314

URL: http://svn.apache.org/viewvc?rev=758314view=rev
Log:
o setting up a base test i will use for all the core components

Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java?rev=758314r1=758313r2=758314view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java
 Wed Mar 25 15:48:51 2009
@@ -5,6 +5,7 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.maven.AbstractCoreMavenComponentTest;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.execution.DefaultMavenExecutionRequest;
 import org.apache.maven.execution.MavenExecutionRequest;
@@ -28,15 +29,9 @@
 import org.codehaus.plexus.util.FileUtils;
 
 public class LifecycleExecutorTest
-extends PlexusTestCase
+extends AbstractCoreMavenComponentTest
 {
 @Requirement
-private MavenProjectBuilder projectBuilder;
-
-@Requirement
-private RepositorySystem repositorySystem;
-
-@Requirement
 private PluginManager pluginManager;
 
 @Requirement
@@ -45,9 +40,7 @@
 protected void setUp()
 throws Exception
 {
-// Components 
-projectBuilder = lookup( MavenProjectBuilder.class );
-repositorySystem = lookup( RepositorySystem.class );
+super.setUp();
 pluginManager = lookup( PluginManager.class );
 lifecycleExecutor = (DefaultLifecycleExecutor) lookup( 
LifecycleExecutor.class );
 }
@@ -56,19 +49,7 @@
 {
 return src/test/projects/lifecycle-executor;
 }
-
-protected File getProject( String name )
-throws Exception
-{
-File source = new File( new File( getBasedir(), getProjectsDirectory() 
), name );
-File target = new File( new File ( getBasedir(), target ), name );
-if ( !target.exists() )
-{
-FileUtils.copyDirectoryStructure( source, target );
-}
-return new File( target, pom.xml );
-}
-
+
 // 
---
 // 
 // 
---





svn commit: r758338 - in /maven/components/trunk: maven-model/src/main/mdo/ maven-project/src/test/java/org/apache/maven/project/ maven-project/src/test/resources-project-builder/dual-execution-ids/su

2009-03-25 Thread sisbell
Author: sisbell
Date: Wed Mar 25 16:40:21 2009
New Revision: 758338

URL: http://svn.apache.org/viewvc?rev=758338view=rev
Log:
[MNG-3938] -  Plugin executions with default id are not always merged. Had 
previously changed the id to default-execution-id to make default clearer. Some 
tests had changed this value, others had not. Brought back inline with Maven 2.x

Modified:
maven/components/trunk/maven-model/src/main/mdo/maven.mdo

maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

maven/components/trunk/maven-project/src/test/resources-project-builder/dual-execution-ids/sub/pom.xml

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-merging/w-plugin-mngt/sub/pom.xml

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-merging/wo-plugin-mngt/sub/pom.xml

Modified: maven/components/trunk/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-model/src/main/mdo/maven.mdo?rev=758338r1=758337r2=758338view=diff
==
--- maven/components/trunk/maven-model/src/main/mdo/maven.mdo (original)
+++ maven/components/trunk/maven-model/src/main/mdo/maven.mdo Wed Mar 25 
16:40:21 2009
@@ -2742,7 +2742,7 @@
   nameid/name
   version4.0.0/version
   typeString/type
-  defaultValuedefault-execution-id/defaultValue
+  defaultValuedefault/defaultValue
   descriptionThe identifier of this execution for labelling the 
goals during the build,
 and for matching executions to merge during 
inheritance./description
 /field
@@ -2768,7 +2768,7 @@
   version4.0.0/version
   code
 ![CDATA[
-public static final String DEFAULT_EXECUTION_ID = default-execution-id;
+public static final String DEFAULT_EXECUTION_ID = default;
 ]]
   /code
 /codeSegment

Modified: 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=758338r1=758337r2=758338view=diff
==
--- 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Wed Mar 25 16:40:21 2009
@@ -472,12 +472,13 @@
 assertEquals( parent-a, pom.getValue( 
build/plugins[1]/executions[1]/goals[5] ) );
 }
 
+/*MNG-3938*/
 public void 
testOverridingOfInheritedPluginExecutionsWithoutPluginManagement()
 throws Exception
 {
 PomTestWrapper pom = buildPom( 
plugin-exec-merging/wo-plugin-mngt/sub );
 assertEquals( 2, ( (List?) pom.getValue( 
build/plugins[1]/executions ) ).size() );
-assertEquals( child-default, pom.getValue( 
build/plugins[1]/executio...@id='default-execution-id']/phase ) );
+assertEquals( child-default, pom.getValue( 
build/plugins[1]/executio...@id='default']/phase ) );
 assertEquals( child-non-default, pom.getValue( 
build/plugins[1]/executio...@id='non-default']/phase ) );
 }
 
@@ -487,7 +488,7 @@
 {
 PomTestWrapper pom = buildPom( plugin-exec-merging/w-plugin-mngt/sub 
);
 assertEquals( 2, ( (List?) pom.getValue( 
build/plugins[1]/executions ) ).size() );
-assertEquals( child-default, pom.getValue( 
build/plugins[1]/executio...@id='default-execution-id']/phase ) );
+assertEquals( child-default, pom.getValue( 
build/plugins[1]/executio...@id='default']/phase ) );
 assertEquals( child-non-default, pom.getValue( 
build/plugins[1]/executio...@id='non-default']/phase ) );
 }
 
@@ -1205,8 +1206,7 @@
 assertEquals( CHILD, pom.getValue( properties/overridden ) );
 assertEquals( CHILD, pom.getValue( properties/interpolated ) );
 }
-
-
+
 private void assertPathSuffixEquals( String expected, Object actual )
 {
 String a = actual.toString();

Modified: 
maven/components/trunk/maven-project/src/test/resources-project-builder/dual-execution-ids/sub/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/dual-execution-ids/sub/pom.xml?rev=758338r1=758337r2=758338view=diff
==
--- 
maven/components/trunk/maven-project/src/test/resources-project-builder/dual-execution-ids/sub/pom.xml
 (original)
+++ 
maven/components/trunk/maven-project/src/test/resources-project-builder/dual-execution-ids/sub/pom.xml
 Wed Mar 25 16:40:21 2009
@@ -26,7 +26,7 @@
   version1.0/version
   executions
 execution
-

svn commit: r758357 - in /maven/components/trunk/maven-project/src: main/java/org/apache/maven/project/processor/ReportingProcessor.java test/java/org/apache/maven/project/PomConstructionTest.java

2009-03-25 Thread sisbell
Author: sisbell
Date: Wed Mar 25 17:26:55 2009
New Revision: 758357

URL: http://svn.apache.org/viewvc?rev=758357view=rev
Log:
[MNG-3811] - Report plugins don't inherit configuration

Modified:

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ReportingProcessor.java

maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ReportingProcessor.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ReportingProcessor.java?rev=758357r1=758356r2=758357view=diff
==
--- 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ReportingProcessor.java
 (original)
+++ 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ReportingProcessor.java
 Wed Mar 25 17:26:55 2009
@@ -20,11 +20,14 @@
  */
 
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.model.ReportSet;
 import org.apache.maven.model.Reporting;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 public class ReportingProcessor extends BaseProcessor
 {
@@ -51,9 +54,7 @@
 }
 
 copy(c.getReporting(), t.getReporting());
-}
-
-   
+} 
 }
 
 private static void copy(Reporting source, Reporting target)
@@ -68,11 +69,67 @@
 
 for ( ReportPlugin plugin : source.getPlugins() )
 {
-target.addPlugin( copyPlugin( plugin ) );
+ReportPlugin match = contains(plugin, target.getPlugins());
+if(match == null)
+{
+target.addPlugin( copyNewPlugin( plugin ) );
+}
+else
+{
+copyPluginToPlugin(plugin, match);
+}
+
+}
+}
+
+private static ReportPlugin contains(ReportPlugin plugin, 
ListReportPlugin list)
+{
+for(ReportPlugin p :list)
+{
+if(match(p, plugin))
+{
+return p;
+}
+}
+return null;
+}
+
+private static void copyPluginToPlugin(ReportPlugin source, ReportPlugin 
target)
+{
+if(source.getInherited() != null)
+{
+target.setInherited( source.getInherited() );
+}
+
+if(source.getVersion() != null)
+{
+target.setVersion( source.getVersion() );
+}
+
+if(source.getConfiguration() != null)
+{
+if(target.getConfiguration() != null)
+{
+target.setConfiguration( Xpp3Dom.mergeXpp3Dom( (Xpp3Dom) 
source.getConfiguration(), (Xpp3Dom) target.getConfiguration() )); 
+}
+else
+{
+target.setConfiguration( source.getConfiguration() );
+}   
 }
+
+for(ReportSet rs : source.getReportSets())
+{
+ReportSet r = new ReportSet();
+r.setId( rs.getId() );
+r.setInherited( rs.getInherited() );
+r.setReports( new ArrayListString(rs.getReports()) );
+r.setConfiguration( rs.getConfiguration() );
+target.addReportSet( r );
+}
 }
 
-private static ReportPlugin copyPlugin(ReportPlugin plugin)
+private static ReportPlugin copyNewPlugin(ReportPlugin plugin)
 {
 ReportPlugin rp = new ReportPlugin();
 rp.setArtifactId( plugin.getArtifactId() );
@@ -92,4 +149,16 @@
 }
 return rp;
 }
+
+private static boolean match( ReportPlugin d1, ReportPlugin d2 )
+{
+return getId( d1 ).equals( getId( d2 ));
+}
+
+private static String getId( ReportPlugin d )
+{
+StringBuilder sb = new StringBuilder();
+sb.append( d.getGroupId() ).append( : ).append( d.getArtifactId() 
).append( : );
+return sb.toString();
+}  
 }

Modified: 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=758357r1=758356r2=758357view=diff
==
--- 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Wed Mar 25 17:26:55 2009
@@ -953,6 +953,18 @@
 assertEquals( 

svn commit: r758358 - in /maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config: ./ pom.xml sub/ sub/pom.xml

2009-03-25 Thread sisbell
Author: sisbell
Date: Wed Mar 25 17:28:34 2009
New Revision: 758358

URL: http://svn.apache.org/viewvc?rev=758358view=rev
Log:
Unit test for reporting plugin config.

Added:

maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/

maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/pom.xml

maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/sub/

maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml

Added: 
maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/pom.xml?rev=758358view=auto
==
--- 
maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/pom.xml
 (added)
+++ 
maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/pom.xml
 Wed Mar 25 17:28:34 2009
@@ -0,0 +1,51 @@
+?xml version=1.0 encoding=UTF-8?
+
+  !--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version
+2.0 (the License); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+applicable law or agreed to in writing, software distributed under
+the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES
+OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and
+limitations under the License.
+  --
+
+project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
+  modelVersion4.0.0/modelVersion
+
+  groupIdorg.apache.maven.its.mng3811/groupId
+  artifactIdtest-parent/artifactId
+  version1.0-SNAPSHOT/version
+  packagingpom/packaging
+
+  nameMNG-3811 :: Parent/name
+  descriptionTest inheritance of reporting plugin configuration/description
+
+  modules
+modulechild/module
+  /modules
+
+  reporting
+plugins
+  plugin
+groupIdorg.apache.maven.its.plugins/groupId
+artifactIdmaven-it-plugin-configuration/artifactId
+version2.1-SNAPSHOT/version
+configuration
+  booleanParamtrue/booleanParam
+  stringParams
+stringParamparentParam/stringParam
+  /stringParams
+/configuration
+  /plugin
+/plugins
+  /reporting
+/project
+

Added: 
maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml?rev=758358view=auto
==
--- 
maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
 (added)
+++ 
maven/components/trunk/maven-project/src/test/resources-project-builder/reporting-plugin-config/sub/pom.xml
 Wed Mar 25 17:28:34 2009
@@ -0,0 +1,47 @@
+?xml version=1.0 encoding=UTF-8?
+
+  !--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version
+2.0 (the License); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+applicable law or agreed to in writing, software distributed under
+the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES
+OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and
+limitations under the License.
+  --
+
+project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
+  modelVersion4.0.0/modelVersion
+
+parent
+  groupIdorg.apache.maven.its.mng3811/groupId
+  artifactIdtest-parent/artifactId
+  version1.0-SNAPSHOT/version
+  /parent
+  artifactIdtest-child/artifactId
+
+  nameMNG-3811 :: Child/name
+
+  reporting

svn commit: r758436 - in /maven/components/trunk/maven-project/src/test: java/org/apache/maven/project/ resources-project-builder/plugin-config-append/ resources-project-builder/plugin-config-append/n

2009-03-25 Thread bentmann
Author: bentmann
Date: Wed Mar 25 21:06:56 2009
New Revision: 758436

URL: http://svn.apache.org/viewvc?rev=758436view=rev
Log:
[MNG-2591] Plugins are merged incorrectly

o Extended UT to exhibit negative side-effects of profile injection

Added:

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/
   (with props)

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/pom.xml
  - copied unchanged from r758386, 
maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/subproject/
  - copied from r758386, 
maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/
   (with props)

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/pom.xml
  - copied, changed from r758386, 
maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/subproject/
  - copied from r758386, 
maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/
Removed:

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/
Modified:

maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/subproject/pom.xml

Modified: 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=758436r1=758435r2=758436view=diff
==
--- 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Wed Mar 25 21:06:56 2009
@@ -761,11 +761,25 @@
 assertEquals( PASSED-4, pom.getValue( prefix + 
listParam/listParam[4] ) );
 }
 
-/* FIXME: MNG-2591*/
-public void testAppendOfInheritedPluginConfiguration()
+/* MNG-2591 */
+public void testAppendOfInheritedPluginConfigurationWithNoProfile()
 throws Exception
 {
-PomTestWrapper pom = buildPom( plugin-config-append/subproject );
+testAppendOfInheritedPluginConfiguration( no-profile );
+}
+
+/* FIXME: MNG-2591
+public void testAppendOfInheritedPluginConfigurationWithActiveProfile()
+throws Exception
+{
+testAppendOfInheritedPluginConfiguration( with-profile );
+}
+//*/
+
+private void testAppendOfInheritedPluginConfiguration( String test )
+throws Exception
+{
+PomTestWrapper pom = buildPom( plugin-config-append/ + test + 
/subproject );
 
 String prefix = build/plugins[1]/configuration/;
 assertEquals( PARENT-1, pom.getValue( prefix + 
stringParams/stringParam[1] ) );
@@ -776,6 +790,7 @@
 assertEquals( CHILD-3, pom.getValue( prefix + 
stringParams/stringParam[6] ) );
 assertEquals( CHILD-2, pom.getValue( prefix + 
stringParams/stringParam[7] ) );
 assertEquals( CHILD-4, pom.getValue( prefix + 
stringParams/stringParam[8] ) );
+assertEquals( null, pom.getValue( prefix + 
stringParams/stringParam[9] ) );
 assertEquals( PARENT-1, pom.getValue( prefix + 
listParam/listParam[1] ) );
 assertEquals( PARENT-3, pom.getValue( prefix + 
listParam/listParam[2] ) );
 assertEquals( PARENT-2, pom.getValue( prefix + 
listParam/listParam[3] ) );
@@ -784,8 +799,8 @@
 assertEquals( CHILD-3, pom.getValue( prefix + 
listParam/listParam[6] ) );
 assertEquals( CHILD-2, pom.getValue( prefix + 
listParam/listParam[7] ) );
 assertEquals( CHILD-4, pom.getValue( prefix + 
listParam/listParam[8] ) );
+assertEquals( null, pom.getValue( prefix + listParam/listParam[9] ) 
);
 }
-//*/
 
 /* MNG-4000 */
 public void 
testMultiplePluginExecutionsWithAndWithoutIdsWithoutPluginManagement()

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/
--
bugtraq:label = Enter issue 

svn commit: r758437 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-2591/ resources/mng-2591/no-profile/ resources/mng-2591/no-profile/subpro

2009-03-25 Thread bentmann
Author: bentmann
Date: Wed Mar 25 21:09:53 2009
New Revision: 758437

URL: http://svn.apache.org/viewvc?rev=758437view=rev
Log:
[MNG-2591] Plugins are merged incorrectly

o Extended IT to exhibit negative side-effects of profile injection

Added:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/no-profile/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/no-profile/pom.xml
  - copied unchanged from r757826, 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/pom.xml

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/no-profile/subproject/
  - copied from r757826, 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/subproject/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml
  - copied, changed from r757826, 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/pom.xml

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/subproject/
  - copied from r757826, 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/subproject/
Removed:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/pom.xml

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/subproject/
Modified:

maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/subproject/pom.xml

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java?rev=758437r1=758436r2=758437view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java
 Wed Mar 25 21:09:53 2009
@@ -41,13 +41,29 @@
 }
 
 /**
- * Test aggregation of list configuration items for build plugins when 
using
- * 'combine.children=append' attribute.
+ * Test aggregation of list configuration items for build plugins when 
using 'combine.children=append' attribute.
+ * This variation of the test does not employ profiles.
  */
-public void testitMNG2591()
+public void testitNoProfile()
 throws Exception
 {
-File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
/mng-2591 );
+testit( no-profile );
+}
+
+/**
+ * Test aggregation of list configuration items for build plugins when 
using 'combine.children=append' attribute.
+ * This variation of the test employs active profiles which however are 
empty and should not change the result.
+ */
+public void testitWithProfile()
+throws Exception
+{
+testit( with-profile );
+}
+
+private void testit( String project )
+throws Exception
+{
+File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
/mng-2591/ + project );
 Verifier verifier = new Verifier( testDir.getAbsolutePath() );
 verifier.setAutoclean( false );
 verifier.deleteDirectory( subproject/target );

Copied: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml
 (from r757826, 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/pom.xml)
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml?p2=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xmlp1=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/pom.xmlr1=757826r2=758437rev=758437view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/pom.xml
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml
 Wed Mar 25 21:09:53 2009
@@ -77,4 +77,14 @@
   /plugin
 /plugins
   /build
+
+  profiles
+profile
+  !-- an active but empty profile to ensure profile injection does not 
interfere with plugin configuration --
+  idparent/id
+ 

svn commit: r758457 - /maven/site/trunk/src/site/apt/plugins/index.apt

2009-03-25 Thread dennisl
Author: dennisl
Date: Wed Mar 25 22:52:33 2009
New Revision: 758457

URL: http://svn.apache.org/viewvc?rev=758457view=rev
Log:
o Release maven-install-plugin 2.3.

Modified:
maven/site/trunk/src/site/apt/plugins/index.apt

Modified: maven/site/trunk/src/site/apt/plugins/index.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/plugins/index.apt?rev=758457r1=758456r2=758457view=diff
==
--- maven/site/trunk/src/site/apt/plugins/index.apt (original)
+++ maven/site/trunk/src/site/apt/plugins/index.apt Wed Mar 25 22:52:33 2009
@@ -4,7 +4,7 @@
  Brett Porter
  Jason van Zyl
  -
- 2009-03-22
+ 2009-03-25
  -
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -58,7 +58,7 @@
 
*---+--++--+++
 | {{{/plugins/maven-deploy-plugin/} deploy}}  | 2.4  | 
2008-08-06 | Deploy the built artifact to the remote repository. | 
{{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-deploy-plugin}SVN}}
 | {{{http://jira.codehaus.org/browse/MDEPLOY}JIRA}}
 
*---+--++--+++
-| {{{/plugins/maven-install-plugin/} install}}| 2.2  | 
2007-05-17 | Install the built artifact into the local repository. | 
{{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-install-plugin}SVN}}
 | {{{http://jira.codehaus.org/browse/MINSTALL}JIRA}}
+| {{{/plugins/maven-install-plugin/} install}}| 2.3  | 
2009-03-25 | Install the built artifact into the local repository. | 
{{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-install-plugin}SVN}}
 | {{{http://jira.codehaus.org/browse/MINSTALL}JIRA}}
 
*---+--++--+++
 | {{{/plugins/maven-resources-plugin/} resources}}| 2.3  | 
2008-10-17 | Copy the resources to the output directory for including in the 
JAR. | 
{{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-resources-plugin}SVN}}
 | {{{http://jira.codehaus.org/browse/MRESOURCES}JIRA}}
 
*---+--++--+++




svn commit: r758473 - in /maven/components/trunk/maven-project/src: main/java/org/apache/maven/profiles/ main/java/org/apache/maven/project/ main/java/org/apache/maven/project/processor/ test/java/org

2009-03-25 Thread sisbell
Author: sisbell
Date: Thu Mar 26 00:06:09 2009
New Revision: 758473

URL: http://svn.apache.org/viewvc?rev=758473view=rev
Log:
Fixed profile activation for profiles in pom. Profile injection was causing 
double injection of some elements from plugin mng. Partial fix.

Modified:

maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java

maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/ProfileContext.java

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ProcessorContext.java

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ProfilesProcessor.java

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ScmProcessor.java

maven/components/trunk/maven-project/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java

maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/processor/ProcessorContextTest.java

Modified: 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java?rev=758473r1=758472r2=758473view=diff
==
--- 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
 (original)
+++ 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
 Thu Mar 26 00:06:09 2009
@@ -23,29 +23,19 @@
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.Parent;
-import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
 import org.apache.maven.profiles.ProfileActivationContext;
 import org.apache.maven.profiles.ProfileActivationException;
 import org.apache.maven.profiles.ProfileManager;
-import org.apache.maven.shared.model.ModelContainer;
-import org.apache.maven.shared.model.ModelProperty;
-import org.apache.maven.shared.model.ModelMarshaller;
+import org.apache.maven.profiles.matchers.DefaultMatcher;
+import org.apache.maven.profiles.matchers.ProfileMatcher;
+import org.apache.maven.profiles.matchers.PropertyMatcher;
 import org.apache.maven.shared.model.InterpolatorProperty;
-import org.apache.maven.project.builder.factories.IdModelContainerFactory;
-import org.apache.maven.project.builder.ProjectUri;
-import org.apache.maven.project.builder.PomTransformer;
 import org.apache.maven.project.builder.PomInterpolatorTag;
-import org.apache.maven.project.builder.profile.*;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.MutablePlexusContainer;
-import org.codehaus.plexus.util.xml.pull.XmlSerializer;
-import org.codehaus.plexus.util.xml.pull.MXSerializer;
 
 import java.util.*;
 import java.util.Map.Entry;
-import java.io.*;
-import java.lang.reflect.Method;
-
 
 public class DefaultProfileManager
 implements ProfileManager
@@ -193,16 +183,33 @@
 
 allActive.addAll( activeExternal );
 allActive.addAll( activeFromPom );
-
+ListProfile defaults = getDefaultProfiles(allActive);
+if(defaults.size()  allActive.size())
+{
+allActive.removeAll( defaults );
+}
 return allActive;
 }
+
+private static ListProfile getDefaultProfiles(ListProfile profiles)
+{
+ListProfile defaults = new ArrayListProfile();
+for(Profile p : profiles)
+{
+if(p.getActivation() != null  
p.getActivation().isActiveByDefault() )
+{
+defaults.add( p );
+}
+}
+return defaults;
+}
 
-private static ListActiveProfileMatcher matchers = Arrays.asList(new 
FileMatcher(),
-new JdkMatcher(), new OperatingSystemMatcher(), new PropertyMatcher());
+private static ListProfileMatcher matchers = Arrays.asList( 
(ProfileMatcher) new DefaultMatcher(),
+(ProfileMatcher) new PropertyMatcher());
 
 private boolean isActive( Profile profile, ProfileActivationContext 
context )
 throws ProfileActivationException
-{
+{/*
 //TODO: Using reflection now. Need to replace with custom mapper
 StringWriter writer = new StringWriter();
 XmlSerializer serializer = new MXSerializer();
@@ -264,6 +271,23 @@
 }
 }
 return false;
+*/
+ListInterpolatorProperty interpolatorProperties = new 

svn commit: r758477 - /maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

2009-03-25 Thread sisbell
Author: sisbell
Date: Thu Mar 26 00:20:13 2009
New Revision: 758477

URL: http://svn.apache.org/viewvc?rev=758477view=rev
Log:
Removed unneeded test.

Modified:

maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=758477r1=758476r2=758477view=diff
==
--- 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Thu Mar 26 00:20:13 2009
@@ -1243,14 +1243,7 @@
 {
 PomTestWrapper pom = buildPom( boolean-interpolation );
 }
-*/
-
-public void testBuildConfigDominant()
-throws Exception
-{
-PomTestWrapper pom = buildPom( build-config-dominant );
-System.out.println(pom.getDomainModel().asString());
-}
+*/ 
  
 private void assertPathSuffixEquals( String expected, Object actual )
 {




svn commit: r758480 - in /maven/site/trunk/src/site: apt/developers/release/releasing.apt resources/images/Validate_Artifacts.png

2009-03-25 Thread brianf
Author: brianf
Date: Thu Mar 26 00:22:50 2009
New Revision: 758480

URL: http://svn.apache.org/viewvc?rev=758480view=rev
Log:
updated the docs and screenshot for the new 1.3 flow

Modified:
maven/site/trunk/src/site/apt/developers/release/releasing.apt
maven/site/trunk/src/site/resources/images/Validate_Artifacts.png

Modified: maven/site/trunk/src/site/apt/developers/release/releasing.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/developers/release/releasing.apt?rev=758480r1=758479r2=758480view=diff
==
--- maven/site/trunk/src/site/apt/developers/release/releasing.apt (original)
+++ maven/site/trunk/src/site/apt/developers/release/releasing.apt Thu Mar 26 
00:22:50 2009
@@ -162,10 +162,9 @@
 
  [[6]] Verify the Staged artifacts
 
- Still logged in to {{https://repository.apache.org}}, click on Browse 
Repositories. Next select the drop down and
- choose Nexus Managed Repositories. You will see a list of existing stage 
repositories. Find yours and then browse the
+ If you click on your repository, a tree view will appear below. You can then 
browse the
  contents to ensure the artifacts are as you expect them. Pay particular 
attention to the existence of .asc (signature)
- files. If the you don't like the content of the repository, go back to the 
Staging Repositories screen, right click
+ files. If the you don't like the content of the repository, right click
  your repository and choose Drop. You can then rollback your release and 
repeat the process.
 
  Note the repository URL, you will need this in your vote email.

Modified: maven/site/trunk/src/site/resources/images/Validate_Artifacts.png
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/resources/images/Validate_Artifacts.png?rev=758480r1=758479r2=758480view=diff
==
Binary files - no diff available.




svn commit: r758487 - in /maven/components/trunk/maven-project/src: main/java/org/apache/maven/project/processor/ test/java/org/apache/maven/project/ test/resources-project-builder/build-extension-inh

2009-03-25 Thread sisbell
Author: sisbell
Date: Thu Mar 26 00:50:45 2009
New Revision: 758487

URL: http://svn.apache.org/viewvc?rev=758487view=rev
Log:
[MNG-3899] - Inheritance does not merge extensions with same gid and aid

Added:

maven/components/trunk/maven-project/src/test/resources-project-builder/build-extension-inheritance/

maven/components/trunk/maven-project/src/test/resources-project-builder/build-extension-inheritance/pom.xml

maven/components/trunk/maven-project/src/test/resources-project-builder/build-extension-inheritance/sub/

maven/components/trunk/maven-project/src/test/resources-project-builder/build-extension-inheritance/sub/pom.xml
Modified:

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java

maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java?rev=758487r1=758486r2=758487view=diff
==
--- 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java
 (original)
+++ 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java
 Thu Mar 26 00:50:45 2009
@@ -25,6 +25,7 @@
 
 import org.apache.maven.model.Build;
 import org.apache.maven.model.BuildBase;
+import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Extension;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
@@ -205,15 +206,50 @@
 if(source.getTestSourceDirectory() != null)
 {
 target.setTestSourceDirectory( source.getTestSourceDirectory() );  
  
-}
-  
+}   
+/*
+ListDependency childDependencies = 
+new ArrayListDependency(dependencies.subList( length - 1 , 
dependencies.size() ) );
+dependencies.removeAll( childDependencies );
+dependencies.addAll( 0, childDependencies );   
+*/
+int i = target.getExtensions().size();
+
+ListExtension m = new ArrayListExtension();
 for(Extension extension : source.getExtensions())
 {
-Extension e = new Extension();
-e.setArtifactId( extension.getArtifactId() );
-e.setGroupId( extension.getGroupId() );
-e.setVersion( extension.getVersion() );
-target.addExtension( e );
+Extension match = isMatch(extension, target.getExtensions());
+if(match != null)
+{
+match.setArtifactId( extension.getArtifactId() );
+match.setGroupId( extension.getGroupId() );
+match.setVersion( extension.getVersion() );  
+m.add( match );
+}
+else
+{
+Extension e = new Extension();
+e.setArtifactId( extension.getArtifactId() );
+e.setGroupId( extension.getGroupId() );
+e.setVersion( extension.getVersion() );
+m.add( e );
+   // target.addExtension( e );   
+}
+} 
+target.getExtensions().removeAll( m );
+target.getExtensions().addAll( 0, m );
+}
+
+private static Extension isMatch(Extension extension, ListExtension 
extensions)
+{
+for(Extension e : extensions)
+{
+if(e.getGroupId().equals( extension.getGroupId() )  
e.getArtifactId().equals( extension.getArtifactId() ))
+{
+return e;
+}
 }
+return null;
 }
+
 }

Modified: 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=758487r1=758486r2=758487view=diff
==
--- 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Thu Mar 26 00:50:45 2009
@@ -1244,6 +1244,19 @@
 PomTestWrapper pom = buildPom( boolean-interpolation );
 }
 */ 
+
+/* MNG-3899 */
+public void testBuildExtensionInheritance()
+throws Exception
+{
+PomTestWrapper pom = buildPom( build-extension-inheritance/sub ); 
+System.out.println(pom.getDomainModel().asString());
+assertEquals(3, ( (List?) pom.getValue( build/extensions )).size() 
);
+assertEquals(b, pom.getValue( 

svn commit: r758493 - in /maven/components/trunk: maven-project-builder/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java maven-project/src/main/java/org/apache/maven/project/p

2009-03-25 Thread sisbell
Author: sisbell
Date: Thu Mar 26 01:23:53 2009
New Revision: 758493

URL: http://svn.apache.org/viewvc?rev=758493view=rev
Log:
[MNG-3680] - POM validation fails on projects in repo.

Modified:

maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java

maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java

Modified: 
maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java?rev=758493r1=758492r2=758493view=diff
==
--- 
maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
 (original)
+++ 
maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
 Thu Mar 26 01:23:53 2009
@@ -86,7 +86,7 @@
 MavenXpp3Reader reader = new MavenXpp3Reader();
 try
 {
-model =  reader.read( is ) ;
+model =  reader.read( is, false ) ;
 }
 catch ( XmlPullParserException e )
 {

Modified: 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java?rev=758493r1=758492r2=758493view=diff
==
--- 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java
 (original)
+++ 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/BuildProcessor.java
 Thu Mar 26 01:23:53 2009
@@ -232,8 +232,7 @@
 e.setArtifactId( extension.getArtifactId() );
 e.setGroupId( extension.getGroupId() );
 e.setVersion( extension.getVersion() );
-m.add( e );
-   // target.addExtension( e );   
+m.add( e );
 }
 } 
 target.getExtensions().removeAll( m );




svn commit: r758515 - in /maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion: pom.xml verify.bsh

2009-03-25 Thread baerrach
Author: baerrach
Date: Thu Mar 26 04:25:49 2009
New Revision: 758515

URL: http://svn.apache.org/viewvc?rev=758515view=rev
Log:
removed SNAPSHOT from IT test dependency - otherwise it will fail because the 
snapshot repo is not available

Modified:

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/pom.xml

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/verify.bsh

Modified: 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/pom.xml?rev=758515r1=758514r2=758515view=diff
==
--- 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/pom.xml
 (original)
+++ 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/pom.xml
 Thu Mar 26 04:25:49 2009
@@ -26,7 +26,7 @@
 dependency
   groupIdorg.codehaus.plexus/groupId
   artifactIdplexus-utils/artifactId
-  version1.3-SNAPSHOT/version
+  version1.3/version
 /dependency
   /dependencies
 

Modified: 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/verify.bsh?rev=758515r1=758514r2=758515view=diff
==
--- 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/verify.bsh
 (original)
+++ 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/outputFileNameMapping-withArtifactBaseVersion/verify.bsh
 Thu Mar 26 04:25:49 2009
@@ -6,7 +6,7 @@
 
 try
 {
-result = new File( basedir, 
target/outputFileNameMapping-withArtifactBaseVersion-1.0-SNAPSHOT-bin/lib/plexus-utils-1.3-SNAPSHOT.jar
 ).exists();   
+result = new File( basedir, 
target/outputFileNameMapping-withArtifactBaseVersion-1.0-SNAPSHOT-bin/lib/plexus-utils-1.3.jar
 ).exists();   
 }
 catch( IOException e )
 {