svn commit: r765782 - in /maven/site/trunk/src/site/apt: pom.apt release-notes.apt.vm

2009-04-16 Thread bentmann
Author: bentmann
Date: Thu Apr 16 22:00:18 2009
New Revision: 765782

URL: http://svn.apache.org/viewvc?rev=765782&view=rev
Log:
[MNG-3940] Interpolation of environment variables is not case-insensitive on 
Windows

o Documented env var handling

Modified:
maven/site/trunk/src/site/apt/pom.apt
maven/site/trunk/src/site/apt/release-notes.apt.vm

Modified: maven/site/trunk/src/site/apt/pom.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/pom.apt?rev=765782&r1=765781&r2=765782&view=diff
==
--- maven/site/trunk/src/site/apt/pom.apt (original)
+++ maven/site/trunk/src/site/apt/pom.apt Thu Apr 16 22:00:18 2009
@@ -566,7 +566,11 @@
   They come in five different styles:
 
   [[1]]  <<>>: Prefixing a variable with "env." will return the shell's 
environment variable. For example,
-  <<<$\{env.PATH\}>>> contains the $path environment variable (<<<%PATH%>>> in 
Windows).
+  <<<$\{env.PATH\}>>> contains the PATH environment variable.
+   While environment variables themselves are case-insensitive on 
Windows, lookup of properties is
+  case-sensitive. In other words, while the Windows shell returns the same 
value for <<<%PATH%>>> and <<<%Path%>>>,
+  Maven distinguishes between <<<$\{env.PATH\}>>> and <<<$\{env.Path\}>>>. As 
of Maven 2.1.0, the names of environment
+  variables are normalized to all upper-case for the sake of reliability.
 
   [[2]]  <<>>: A dot (.) notated path in the POM will contain the 
corresponding element's value.
   For example: <<<\\1.0\\>>> is 
accessible via

Modified: maven/site/trunk/src/site/apt/release-notes.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/release-notes.apt.vm?rev=765782&r1=765781&r2=765782&view=diff
==
--- maven/site/trunk/src/site/apt/release-notes.apt.vm (original)
+++ maven/site/trunk/src/site/apt/release-notes.apt.vm Thu Apr 16 22:00:18 2009
@@ -56,6 +56,13 @@
 
 * MNG-3475 - neither the script source directory nor the reporting output 
directory were aligned to the base directory. While this was a bug, if you used 
an expression such as <<<$\{basedir\}/$\{project.reporting.outputDirectory\}>>> 
then where this would of worked in Maven 2.0.10, it will have two copies of the 
project base directory in Maven 2.1.0+. You should remove the leading 
<<<$\{basedir\}>>> from the expression - however note that in some cases this 
will cause the build to be incompatible with earlier versions of Maven.
 
+* MNG-3940 - While environment variables are case-insensitive on Windows, 
Maven internally stores them in a
+  <<>> collection. For the time being, the names of 
environment variables are normalized to all
+  upper-case when Maven executes on Windows, thereby at least partly 
abstracting from different character casing of
+  the original variable name. Hence, <<<$\{env.PATH\}>>> will now be 
reliably resolved on Windows. However, POMs
+  that previously used lower-case or mixed-case variable names like 
<<<$\{env.ProgramFiles\}>>> will need to be
+  updated.
+
 * MNG-4056 - Dependencies specified with a classifier of <<>> and 
type of <<>> are correctly considered source JARs and no longer added to 
the classpath. This is 
{{{http://code.google.com/p/gwt-maven/issues/detail?id=200} known to affect the 
GWT plugin}}
 
 ** Noteworthy Changes and improvements  




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

2009-04-17 Thread bentmann
Author: bentmann
Date: Fri Apr 17 17:38:26 2009
New Revision: 766096

URL: http://svn.apache.org/viewvc?rev=766096&view=rev
Log:
o Recorded release of maven-shade-plugin:1.2.1

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=766096&r1=766095&r2=766096&view=diff
==
--- maven/site/trunk/src/site/apt/plugins/index.apt (original)
+++ maven/site/trunk/src/site/apt/plugins/index.apt Fri Apr 17 17:38:26 2009
@@ -80,7 +80,7 @@
 
*---+--++--+++
 | {{{/plugins/maven-war-plugin/} <<>>}}| 2.1-beta-1   | 
2009-03-22 | Build a WAR from the current project. | 
{{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-war-plugin}SVN}} | 
{{{http://jira.codehaus.org/browse/MWAR}JIRA}}
 
*---+--++--+++
-| {{{/plugins/maven-shade-plugin/} <<>>}}| 1.2  | 
2008-10-17 | Build an Uber-JAR from the current project, including 
dependencies. | 
{{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-shade-plugin}SVN}} 
| {{{http://jira.codehaus.org/browse/MSHADE}JIRA}}
+| {{{/plugins/maven-shade-plugin/} <<>>}}| 1.2.1| 
2009-04-17 | Build an Uber-JAR from the current project, including 
dependencies. | 
{{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-shade-plugin}SVN}} 
| {{{http://jira.codehaus.org/browse/MSHADE}JIRA}}
 
*---+--++--+++
 | <> |  |   
 | <> | |
 
*---+--++--+++




svn commit: r766886 - in /maven/plugins/trunk/maven-source-plugin/src/it: jar/pom.xml jar/verify.bsh test-jar/pom.xml test-jar/verify.bsh

2009-04-20 Thread bentmann
Author: bentmann
Date: Mon Apr 20 21:37:12 2009
New Revision: 766886

URL: http://svn.apache.org/viewvc?rev=766886&view=rev
Log:
o Extended ITs to check forking

Modified:
maven/plugins/trunk/maven-source-plugin/src/it/jar/pom.xml
maven/plugins/trunk/maven-source-plugin/src/it/jar/verify.bsh
maven/plugins/trunk/maven-source-plugin/src/it/test-jar/pom.xml
maven/plugins/trunk/maven-source-plugin/src/it/test-jar/verify.bsh

Modified: maven/plugins/trunk/maven-source-plugin/src/it/jar/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/it/jar/pom.xml?rev=766886&r1=766885&r2=766886&view=diff
==
--- maven/plugins/trunk/maven-source-plugin/src/it/jar/pom.xml (original)
+++ maven/plugins/trunk/maven-source-plugin/src/it/jar/pom.xml Mon Apr 20 
21:37:12 2009
@@ -40,6 +40,26 @@
 maven-source-plugin
 @pom.version@
   
+  
+org.apache.maven.plugins
+maven-antrun-plugin
+1.3
+
+  
+generated-sources
+generate-sources
+
+  run
+
+
+  
+
+  
+  target/generated-sources/ant
+
+  
+
+  
 
   
 

Modified: maven/plugins/trunk/maven-source-plugin/src/it/jar/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/it/jar/verify.bsh?rev=766886&r1=766885&r2=766886&view=diff
==
--- maven/plugins/trunk/maven-source-plugin/src/it/jar/verify.bsh (original)
+++ maven/plugins/trunk/maven-source-plugin/src/it/jar/verify.bsh Mon Apr 20 
21:37:12 2009
@@ -19,6 +19,7 @@
 "META-INF/MANIFEST.MF",
 "MyClass.java",
 "main.properties",
+"generated.properties",
 };
 for ( String included : includedEntries )
 {

Modified: maven/plugins/trunk/maven-source-plugin/src/it/test-jar/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/it/test-jar/pom.xml?rev=766886&r1=766885&r2=766886&view=diff
==
--- maven/plugins/trunk/maven-source-plugin/src/it/test-jar/pom.xml (original)
+++ maven/plugins/trunk/maven-source-plugin/src/it/test-jar/pom.xml Mon Apr 20 
21:37:12 2009
@@ -40,6 +40,26 @@
 maven-source-plugin
 @pom.version@
   
+  
+org.apache.maven.plugins
+maven-antrun-plugin
+1.3
+
+  
+generated-sources
+generate-sources
+
+  run
+
+
+  
+
+  
+  target/generated-sources/ant
+
+  
+
+  
 
   
 

Modified: maven/plugins/trunk/maven-source-plugin/src/it/test-jar/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/it/test-jar/verify.bsh?rev=766886&r1=766885&r2=766886&view=diff
==
--- maven/plugins/trunk/maven-source-plugin/src/it/test-jar/verify.bsh 
(original)
+++ maven/plugins/trunk/maven-source-plugin/src/it/test-jar/verify.bsh Mon Apr 
20 21:37:12 2009
@@ -19,6 +19,7 @@
 "META-INF/MANIFEST.MF",
 "MyTest.java",
 "test.properties",
+"generated.properties",
 };
 for ( String included : includedEntries )
 {




svn commit: r767320 - /maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java

2009-04-21 Thread bentmann
Author: bentmann
Date: Tue Apr 21 22:42:24 2009
New Revision: 767320

URL: http://svn.apache.org/viewvc?rev=767320&view=rev
Log:
o Fixed mojo parameter annotation

Modified:

maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java

Modified: 
maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java
URL: 
http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java?rev=767320&r1=767319&r2=767320&view=diff
==
--- 
maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java
 (original)
+++ 
maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java
 Tue Apr 21 22:42:24 2009
@@ -64,6 +64,7 @@
  * The MavenSession
  * 
  * @parameter expression="${session}"
+ * @readonly
  */
 protected MavenSession session;
 




svn commit: r768812 - in /maven/sandbox/trunk/plugins/maven-jarsigner-plugin: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/jav

2009-04-26 Thread bentmann
Author: bentmann
Date: Sun Apr 26 22:16:23 2009
New Revision: 768812

URL: http://svn.apache.org/viewvc?rev=768812&view=rev
Log:
[MSANDBOX-46] Import maven-jarsigner-plugin
Submitted by: Christian Schulte (via MJAVADOC-228)

Added:
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/   (with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml   (with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/apache/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/apache/maven/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/apache/maven/plugins/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/apache/maven/plugins/jarsigner/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java
   (with props)

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojo.java
   (with props)

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/java/org/apache/maven/plugins/jarsigner/JarsignerVerifyMojo.java
   (with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/apache/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/apache/maven/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/apache/maven/plugins/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/apache/maven/plugins/jarsigner/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.properties
   (with props)

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo_de.properties
   (with props)

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/main/resources/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo_en.properties
   (with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/apt/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/apt/examples/

maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/apt/examples/sign-and-verify-project.apt
   (with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/apt/index.apt   
(with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/apt/usage.apt   
(with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/fml/
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/fml/faq.fml   
(with props)
maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/site/site.xml   
(with props)

Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/
--
--- svn:ignore (added)
+++ svn:ignore Sun Apr 26 22:16:23 2009
@@ -0,0 +1,8 @@
+target
+.classpath
+.settings
+.project
+bin
+*.iml
+*.ipr
+*.iws

Added: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml?rev=768812&view=auto
==
--- maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml (added)
+++ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml Sun Apr 26 
22:16:23 2009
@@ -0,0 +1,92 @@
+
+
+
+
+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/xsd/maven-4.0.0.xsd";>
+  4.0.0
+
+  
+maven-plugins
+org.apache.maven.plugins
+13
+  
+
+  maven-jarsigner-plugin
+  1.0-SNAPSHOT
+  maven-plugin
+
+  Maven Jarsigner Plugin
+  Signs or verifies a project artifact and attachments using 
jarsigner.
+
+  
+
+  Christian Schulte
+
+  
+
+  
+
scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-jarsigner-plugin/
+
scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-jarsigner-plugin/
+
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jarsigner-plugin/
+  
+  
+JIRA
+http://jira.codehaus.org/browse/MJARSIGNER
+  
+
+  
+2.0.10
+  
+
+  
+
+  org.apache.maven
+  maven-plugin-api
+  ${mavenVersion}
+
+
+  org.apache.maven
+ 

svn commit: r768817 - /maven/components/branches/maven-2.1.x/build.xml

2009-04-26 Thread bentmann
Author: bentmann
Date: Sun Apr 26 22:28:48 2009
New Revision: 768817

URL: http://svn.apache.org/viewvc?rev=768817&view=rev
Log:
o Updated bootstrap due to r768762

Modified:
maven/components/branches/maven-2.1.x/build.xml

Modified: maven/components/branches/maven-2.1.x/build.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/build.xml?rev=768817&r1=768816&r2=768817&view=diff
==
--- maven/components/branches/maven-2.1.x/build.xml (original)
+++ maven/components/branches/maven-2.1.x/build.xml Sun Apr 26 22:28:48 2009
@@ -151,7 +151,7 @@
 
 
 
-
+
 
   
 




svn commit: r768818 - /maven/components/branches/maven-2.2.x/build.xml

2009-04-26 Thread bentmann
Author: bentmann
Date: Sun Apr 26 22:33:25 2009
New Revision: 768818

URL: http://svn.apache.org/viewvc?rev=768818&view=rev
Log:
o Updated bootstrap due to r768763

Modified:
maven/components/branches/maven-2.2.x/build.xml

Modified: maven/components/branches/maven-2.2.x/build.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/build.xml?rev=768818&r1=768817&r2=768818&view=diff
==
--- maven/components/branches/maven-2.2.x/build.xml (original)
+++ maven/components/branches/maven-2.2.x/build.xml Sun Apr 26 22:33:25 2009
@@ -151,7 +151,7 @@
 
 
 
-
+
 
   
 




svn commit: r768821 - /maven/components/branches/maven-2.2.x/

2009-04-26 Thread bentmann
Author: bentmann
Date: Sun Apr 26 22:45:34 2009
New Revision: 768821

URL: http://svn.apache.org/viewvc?rev=768821&view=rev
Log:
o Added merge info

Modified:
maven/components/branches/maven-2.2.x/   (props changed)

Propchange: maven/components/branches/maven-2.2.x/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Apr 26 22:45:34 2009
@@ -2,6 +2,6 @@
 
/maven/components/branches/maven-2.0.x:679552-679867,693956-728820,728836,728940,729060,729738,729785,730461,730631,734502,734803,736543,746381
 /maven/components/branches/maven-2.1.0-M1-RC:690315,691793-694304
 
/maven/components/branches/maven-2.1.0-RC:63,689695,689976,689990,752168,752428,752622,752653,753089-753090,753320,755086,755199,755215
-/maven/components/branches/maven-2.1.x:751686,767628,767631
+/maven/components/branches/maven-2.1.x:751686,767628,767631,768817
 /maven/components/trunk:572229,720001,721902,726845,729292
 /maven/sandbox/branches/maven/MNG-3379:678167




svn commit: r768823 - in /maven/components/trunk: ./ build.xml

2009-04-26 Thread bentmann
Author: bentmann
Date: Sun Apr 26 22:47:12 2009
New Revision: 768823

URL: http://svn.apache.org/viewvc?rev=768823&view=rev
Log:
o Updated bootstrap due to r768764

Modified:
maven/components/trunk/   (props changed)
maven/components/trunk/build.xml

Propchange: maven/components/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Apr 26 22:47:12 2009
@@ -1,6 +1,6 @@
 /maven/components/branches/MNG-3932-1:746145-746157
 /maven/components/branches/maven-2.0.10-RC:680477
 
/maven/components/branches/maven-2.0.x:679206,708871,720042,726541,727548,727998,728264,728940,729060,729738,729785,730631
-/maven/components/branches/maven-2.1.x:739385,741841,747468,747683,748815,749612,766523
+/maven/components/branches/maven-2.1.x:739385,741841,747468,747683,748815,749612,766523,768817
 /maven/components/branches/sisbell-plugin-manager:738973-739966
 /maven/components/sisbell-plugin-manager:738757-738972

Modified: maven/components/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/build.xml?rev=768823&r1=768822&r2=768823&view=diff
==
--- maven/components/trunk/build.xml (original)
+++ maven/components/trunk/build.xml Sun Apr 26 22:47:12 2009
@@ -168,7 +168,7 @@
 
 
 
-
+
 
   
 




svn commit: r770418 - in /maven/components/branches/maven-2.1.x: ./ pom.xml

2009-04-30 Thread bentmann
Author: bentmann
Date: Thu Apr 30 19:57:37 2009
New Revision: 770418

URL: http://svn.apache.org/viewvc?rev=770418&view=rev
Log:
o Updated to plexus-sec-dispatcher:1.3 (merged from r769913)

Modified:
maven/components/branches/maven-2.1.x/   (props changed)
maven/components/branches/maven-2.1.x/pom.xml

Propchange: maven/components/branches/maven-2.1.x/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Apr 30 19:57:37 2009
@@ -3,5 +3,6 @@
 /maven/components/branches/maven-2.1.0-M1-RC:690315,691793-694304
 
/maven/components/branches/maven-2.1.0-RC:63,689695,689976,689990,752168,752428,752622,752653,753089-753090,753320,755086,755199,755215
 /maven/components/branches/maven-2.1.x:751686
+/maven/components/branches/maven-2.2.x:769913
 /maven/components/trunk:572229,720001,721902,726845,729292
 /maven/sandbox/branches/maven/MNG-3379:678167

Modified: maven/components/branches/maven-2.1.x/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/pom.xml?rev=770418&r1=770417&r2=770418&view=diff
==
--- maven/components/branches/maven-2.1.x/pom.xml (original)
+++ maven/components/branches/maven-2.1.x/pom.xml Thu Apr 30 19:57:37 2009
@@ -442,7 +442,7 @@
   
 org.sonatype.plexus
 plexus-sec-dispatcher
-1.3-SNAPSHOT
+1.3
   
   
 org.apache.maven.wagon




svn commit: r770448 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/IntegrationTestSuite.java java/org/apache/maven/it/MavenITmng3118TestClassPathOrderTest.

2009-04-30 Thread bentmann
Author: bentmann
Date: Thu Apr 30 21:14:26 2009
New Revision: 770448

URL: http://svn.apache.org/viewvc?rev=770448&view=rev
Log:
[MNG-3118] Test-classes should come before classes in the classpath
[MNG-2365] classes before test-classes in 
MavenProject.getTestClasspathElements() - should be the other way around?

o Added IT

Added:

maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3118TestClassPathOrderTest.java
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3118/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3118/pom.xml
   (with props)
Modified:

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=770448&r1=770447&r2=770448&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
 Thu Apr 30 21:14:26 2009
@@ -233,6 +233,7 @@
 suite.addTestSuite( MavenITmng3220ImportScopeTest.class );
 suite.addTestSuite( MavenITmng3217InterPluginDependencyTest.class );
 suite.addTestSuite( 
MavenITmng3139UseCachedMetadataOfBlacklistedRepoTest.class );
+suite.addTestSuite( MavenITmng3118TestClassPathOrderTest.class );
 suite.addTestSuite( MavenITmng3106ProfileMultipleActivatorsTest.class 
);
 suite.addTestSuite( MavenITmng3099SettingsProfilesWithNoPomTest.class 
);
 suite.addTestSuite( MavenITmng3057VersionExprTransformationsTest.class 
);

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3118TestClassPathOrderTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3118TestClassPathOrderTest.java?rev=770448&view=auto
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3118TestClassPathOrderTest.java
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3118TestClassPathOrderTest.java
 Thu Apr 30 21:14:26 2009
@@ -0,0 +1,62 @@
+package org.apache.maven.it;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * This is a test set for http://jira.codehaus.org/browse/MNG-3118";>MNG-3118.
+ *
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng3118TestClassPathOrderTest
+extends AbstractMavenIntegrationTestCase
+{
+
+public MavenITmng3118TestClassPathOrderTest()
+{
+super( "[2.0.8,)" );
+}
+
+/**
+ * Check that test classes appear before main classes on the test class 
path.
+ */
+public void testit()
+throws Exception
+{
+File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-3118" );
+
+Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+verifier.setAutoclean( false );
+verifier.deleteDirectory( "target" );
+verifier.executeGoal( "validate" );
+verifier.verifyErrorFreeLog();
+verifier.resetStreams();
+
+List testClassPath = verifier.loadLines( "target/test-classpath.txt", 
"UTF-8" );
+assertEquals( Arrays.asList( new String[] { "test-classes", "classes" 
} ), testClassPath );
+}
+
+}

Propchange:

svn commit: r770589 - in /maven/components/branches/maven-2.2.x: maven-model/pom.xml maven-profile/pom.xml maven-repository-metadata/pom.xml maven-settings/pom.xml maven-toolchain/pom.xml

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 09:01:31 2009
New Revision: 770589

URL: http://svn.apache.org/viewvc?rev=770589&view=rev
Log:
o Removed superfluos configuration element which is inherited from parent POM 
as per r770515

Modified:
maven/components/branches/maven-2.2.x/maven-model/pom.xml
maven/components/branches/maven-2.2.x/maven-profile/pom.xml
maven/components/branches/maven-2.2.x/maven-repository-metadata/pom.xml
maven/components/branches/maven-2.2.x/maven-settings/pom.xml
maven/components/branches/maven-2.2.x/maven-toolchain/pom.xml

Modified: maven/components/branches/maven-2.2.x/maven-model/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-model/pom.xml?rev=770589&r1=770588&r2=770589&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-model/pom.xml (original)
+++ maven/components/branches/maven-2.2.x/maven-model/pom.xml Fri May  1 
09:01:31 2009
@@ -47,7 +47,6 @@
   
 src/main/mdo/maven.mdo
   
- true
 
   
   

Modified: maven/components/branches/maven-2.2.x/maven-profile/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-profile/pom.xml?rev=770589&r1=770588&r2=770589&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-profile/pom.xml (original)
+++ maven/components/branches/maven-2.2.x/maven-profile/pom.xml Fri May  1 
09:01:31 2009
@@ -54,7 +54,6 @@
   
 src/main/mdo/profiles.mdo
   
- true
 
   
 

Modified: 
maven/components/branches/maven-2.2.x/maven-repository-metadata/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-repository-metadata/pom.xml?rev=770589&r1=770588&r2=770589&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-repository-metadata/pom.xml 
(original)
+++ maven/components/branches/maven-2.2.x/maven-repository-metadata/pom.xml Fri 
May  1 09:01:31 2009
@@ -47,7 +47,6 @@
   
 src/main/mdo/metadata.mdo
   
-  true
 
   
 

Modified: maven/components/branches/maven-2.2.x/maven-settings/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-settings/pom.xml?rev=770589&r1=770588&r2=770589&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-settings/pom.xml (original)
+++ maven/components/branches/maven-2.2.x/maven-settings/pom.xml Fri May  1 
09:01:31 2009
@@ -58,7 +58,6 @@
   
 src/main/mdo/settings.mdo
   
-  true
 
   
 

Modified: maven/components/branches/maven-2.2.x/maven-toolchain/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-toolchain/pom.xml?rev=770589&r1=770588&r2=770589&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-toolchain/pom.xml (original)
+++ maven/components/branches/maven-2.2.x/maven-toolchain/pom.xml Fri May  1 
09:01:31 2009
@@ -66,7 +66,6 @@
   
 src/main/mdo/toolchains.mdo
   
-  true
 
   
   




svn commit: r770604 - /maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/artifact/VersionExpressionTransformation.java

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 10:04:53 2009
New Revision: 770604

URL: http://svn.apache.org/viewvc?rev=770604&view=rev
Log:
o Fixed IOE when running on Java 1.4

Modified:

maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/artifact/VersionExpressionTransformation.java

Modified: 
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/artifact/VersionExpressionTransformation.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/artifact/VersionExpressionTransformation.java?rev=770604&r1=770603&r2=770604&view=diff
==
--- 
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/artifact/VersionExpressionTransformation.java
 (original)
+++ 
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/artifact/VersionExpressionTransformation.java
 Fri May  1 10:04:53 2009
@@ -179,7 +179,7 @@
 return;
 }
 
-protected File transformVersions( File pomFile, Artifact artifact, 
ArtifactRepository localRepository )
+File transformVersions( File pomFile, Artifact artifact, 
ArtifactRepository localRepository )
 throws IOException, ModelInterpolationException
 {
 ProjectBuilderConfiguration pbConfig;
@@ -238,6 +238,21 @@
 
 outputFile = pomFile;
 }
+catch ( NoClassDefFoundError ncdfe )
+{
+if ( ncdfe.getMessage().indexOf( "javax/xml/xpath" ) > -1 )
+{
+getLogger().warn( "Cannot load XPath classes from JDK. Your 
JDK version may be < 1.5." +
+"\n\nNOTE: This prevents the interpolation of version 
expressions in your POMs " +
+"during the install/deploy steps of the build!\n\n" );
+
+outputFile = pomFile;
+}
+else
+{
+throw ncdfe;
+}
+}
 finally
 {
 IOUtil.close( reader );
@@ -246,7 +261,7 @@
 return outputFile;
 }
 
-protected void interpolateVersions( File pomFile, File outputFile, Model 
model, File projectDir,
+void interpolateVersions( File pomFile, File outputFile, Model model, File 
projectDir,
 ProjectBuilderConfiguration config )
 throws ModelInterpolationException
 {
@@ -256,26 +271,7 @@
 // use of the XPP3 Model reader/writers, which have a tendency to lose 
XML comments and such.
 // SOOO, we're using a two-stage string interpolation here. The first 
stage selects all XML 'version'
 // elements, and subjects their values to interpolation in the second 
stage.
-XPathVersionExpressionInterpolator interpolator;
-try
-{
-interpolator = new XPathVersionExpressionInterpolator( getLogger() 
);
-}
-catch ( NoClassDefFoundError ncdfe )
-{
-if ( ncdfe.getMessage().indexOf( "javax/xml/xpath" ) > -1 )
-{
-getLogger().warn( "Cannot load XPath classes from JDK. Your 
JDK version may be < 1.5." +
-   "\n\nNOTE: This prevents the interpolation of 
version expressions in your POMs " +
-   "during the install/deploy steps of the 
build!\n\n" );
-
-return;
-}
-else
-{
-throw ncdfe;
-}
-}
+XPathVersionExpressionInterpolator interpolator = new 
XPathVersionExpressionInterpolator( getLogger() );
 
 // The second-stage interpolator is the 'normal' one used in all Model 
interpolation throughout
 // maven-project.




svn commit: r770638 - /maven/core-integration-testing/trunk/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 11:24:53 2009
New Revision: 770638

URL: http://svn.apache.org/viewvc?rev=770638&view=rev
Log:
o Added support to skip tests based on Java version

Modified:

maven/core-integration-testing/trunk/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java

Modified: 
maven/core-integration-testing/trunk/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java?rev=770638&r1=770637&r2=770638&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
 Fri May  1 11:24:53 2009
@@ -61,6 +61,8 @@
 
 private boolean skip;
 
+private static ArtifactVersion javaVersion;
+
 private ArtifactVersion mavenVersion;
 
 private VersionRange versionRange;
@@ -102,6 +104,27 @@
 }
 
 /**
+ * Gets the Java version used to run this test.
+ * 
+ * @return The Java version, never null.
+ */
+private ArtifactVersion getJavaVersion()
+{
+if ( javaVersion == null )
+{
+String version = System.getProperty( "java.version" );
+version = version.replaceAll( "[_-]", "." );
+Matcher matcher = Pattern.compile( 
"(?s).*?(([0-9]+\\.[0-9]+)(\\.[0-9]+)?).*" ).matcher( version );
+if ( matcher.matches() )
+{
+version = matcher.group( 1 );
+}
+javaVersion = new DefaultArtifactVersion( version );
+}
+return javaVersion;
+}
+
+/**
  * Gets the Maven version used to run this test.
  * 
  * @return The Maven version or null if unknown.
@@ -177,6 +200,12 @@
 String result = "OK " + formatTime( milliseconds );
 out.println( pad( RESULT_COLUMN - line.length() ) + result );
 }
+catch ( UnsupportedJavaVersionException e )
+{
+String result = "SKIPPED - Java version " + e.javaVersion + " not 
in range " + e.supportedRange;
+out.println( pad( RESULT_COLUMN - line.length() ) + result );
+return;
+}
 catch ( UnsupportedMavenVersionException e )
 {
 String result = "SKIPPED - version " + e.mavenVersion + " not in 
range " + e.supportedRange;
@@ -193,6 +222,33 @@
 }
 
 /**
+ * Guards the execution of a test case by checking that the current Java 
version matches the specified version
+ * range. If the check fails, an exception will be thrown which aborts the 
current test and marks it as skipped. One
+ * would usually call this method right at the start of a test method.
+ * 
+ * @param versionRange The version range that specifies the acceptable 
Java versions for the test, must not be
+ *null.
+ */
+protected void requiresJavaVersion( String versionRange )
+{
+VersionRange range;
+try
+{
+range = VersionRange.createFromVersionSpec( versionRange );
+}
+catch ( InvalidVersionSpecificationException e )
+{
+throw (RuntimeException) new IllegalArgumentException( "Invalid 
version range: " + versionRange ).initCause( e );
+}
+
+ArtifactVersion version = getJavaVersion();
+if ( !range.containsVersion( version ) )
+{
+throw new UnsupportedJavaVersionException( version, range );
+}
+}
+
+/**
  * Guards the execution of a test case by checking that the current Maven 
version matches the specified version
  * range. If the check fails, an exception will be thrown which aborts the 
current test and marks it as skipped. One
  * would usually call this method right at the start of a test method.
@@ -227,6 +283,22 @@
 }
 }
 
+private class UnsupportedJavaVersionException
+extends RuntimeException
+{
+
+public ArtifactVersion javaVersion;
+
+public VersionRange supportedRange;
+
+public UnsupportedJavaVersionException( ArtifactVersion javaVersion, 
VersionRange supportedRange )
+{
+this.javaVersion = javaVersion;
+this.supportedRange = supportedRange;
+}
+
+}
+
 private class UnsupportedMavenVersionException
 extends RuntimeException
 {




svn commit: r770640 - /maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 11:27:45 2009
New Revision: 770640

URL: http://svn.apache.org/viewvc?rev=770640&view=rev
Log:
[MNG-3057] properties not expanded in generated POMs when building A/B/C nested 
projects

o Disabled IT under Java 1.4- where the feature is not supported

Modified:

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java?rev=770640&r1=770639&r2=770640&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java
 Fri May  1 11:27:45 2009
@@ -53,6 +53,8 @@
 public void testitMNG3057 ()
 throws Exception
 {
+requiresJavaVersion( "[1.5,)" );
+
 File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-3057" );
 
 File remoteRepo = new File( testDir, "target/deployment" );




svn commit: r770670 - /maven/components/branches/maven-2.2.x/maven-integration-tests/pom.xml

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 13:29:36 2009
New Revision: 770670

URL: http://svn.apache.org/viewvc?rev=770670&view=rev
Log:
o Fixed version of IT importer

Modified:
maven/components/branches/maven-2.2.x/maven-integration-tests/pom.xml

Modified: maven/components/branches/maven-2.2.x/maven-integration-tests/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-integration-tests/pom.xml?rev=770670&r1=770669&r2=770670&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-integration-tests/pom.xml 
(original)
+++ maven/components/branches/maven-2.2.x/maven-integration-tests/pom.xml Fri 
May  1 13:29:36 2009
@@ -21,7 +21,7 @@
 
   org.apache.maven
   maven-integration-tests
-  2.1.x
+  2.2.x
 
   Maven Integration-Test Importer
 




svn commit: r770707 - /maven/mercury/trunk/mercury-core/pom.xml

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 15:12:04 2009
New Revision: 770707

URL: http://svn.apache.org/viewvc?rev=770707&view=rev
Log:
o Excluded unwanted dependency to prevent class path conflict between 
servlet-api:2.3 and servlet-api:2.5

Modified:
maven/mercury/trunk/mercury-core/pom.xml

Modified: maven/mercury/trunk/mercury-core/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-core/pom.xml?rev=770707&r1=770706&r2=770707&view=diff
==
--- maven/mercury/trunk/mercury-core/pom.xml (original)
+++ maven/mercury/trunk/mercury-core/pom.xml Fri May  1 15:12:04 2009
@@ -9,10 +9,10 @@
   Mercury Core
 
   
-   
-   commons-cli
-   commons-cli
-   
+
+  commons-cli
+  commons-cli
+
 
 
 
@@ -74,13 +74,18 @@
   test
 
 
-
 
   commons-digester
   commons-digester
   test
+  
+
+  
+  javax.servlet
+  servlet-api
+
+  
 
- 
 
   
 
@@ -125,4 +130,4 @@
   
 
 
-
\ No newline at end of file
+




svn commit: r770709 - in /maven/mercury/trunk/mercury-core/src/test/resources: repo/a-1.0.txt repo/b-1.0.txt repo/c-1.0.txt repo/d-1.0.txt testRepo/file0.txt testRepo/file1.txt testRepo/file2.txt

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 15:13:49 2009
New Revision: 770709

URL: http://svn.apache.org/viewvc?rev=770709&view=rev
Log:
o Marked repository contents as binary to get platform-independent test results

Modified:
maven/mercury/trunk/mercury-core/src/test/resources/repo/a-1.0.txt   (props 
changed)
maven/mercury/trunk/mercury-core/src/test/resources/repo/b-1.0.txt   (props 
changed)
maven/mercury/trunk/mercury-core/src/test/resources/repo/c-1.0.txt   (props 
changed)
maven/mercury/trunk/mercury-core/src/test/resources/repo/d-1.0.txt   (props 
changed)
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file0.txt   
(props changed)
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file1.txt   
(props changed)
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file2.txt   
(props changed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/a-1.0.txt
('svn:eol-style' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/a-1.0.txt
('svn:eol-stype' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/a-1.0.txt
--
svn:mime-type = application/octet-stream

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/b-1.0.txt
('svn:eol-style' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/b-1.0.txt
('svn:eol-stype' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/b-1.0.txt
--
svn:mime-type = application/octet-stream

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/c-1.0.txt
('svn:eol-style' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/c-1.0.txt
('svn:eol-stype' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/c-1.0.txt
--
svn:mime-type = application/octet-stream

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/d-1.0.txt
('svn:eol-style' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/d-1.0.txt
('svn:eol-stype' removed)

Propchange: maven/mercury/trunk/mercury-core/src/test/resources/repo/d-1.0.txt
--
svn:mime-type = application/octet-stream

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file0.txt
('svn:eol-style' removed)

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file0.txt
('svn:eol-stype' removed)

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file0.txt
--
svn:mime-type = application/octet-stream

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file1.txt
('svn:eol-style' removed)

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file1.txt
('svn:eol-stype' removed)

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file1.txt
--
svn:mime-type = application/octet-stream

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file2.txt
('svn:eol-style' removed)

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file2.txt
('svn:eol-stype' removed)

Propchange: 
maven/mercury/trunk/mercury-core/src/test/resources/testRepo/file2.txt
--
svn:mime-type = application/octet-stream




svn commit: r770750 - /maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 16:51:00 2009
New Revision: 770750

URL: http://svn.apache.org/viewvc?rev=770750&view=rev
Log:
[MASSEMBLY-382] Review IT failure on Windows

o Normalized file separator for platform-independent pattern matching

Modified:

maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java

Modified: 
maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java?rev=770750&r1=770749&r2=770750&view=diff
==
--- 
maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java
 (original)
+++ 
maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java
 Fri May  1 16:51:00 2009
@@ -153,6 +153,8 @@
 
 String name = fileInfo.getName();
 
+name = name.replace( File.separatorChar, '/' );
+
 if ( fileInfo.isFile() && name.matches( filePattern ) )
 {
 readProperties( fileInfo );




svn commit: r770795 - in /maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule: two-levels-includeBaseDir-withBin/ two-levels-includeBaseDir-withBin/child-level1-project1/ two-levels-

2009-05-01 Thread bentmann
Author: bentmann
Date: Fri May  1 19:16:32 2009
New Revision: 770795

URL: http://svn.apache.org/viewvc?rev=770795&view=rev
Log:
o Shortended path names for easier working on Windows

Added:

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/
  - copied from r770402, 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDirectory-withBinaries/

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withSrc/
  - copied from r770402, 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDirectory-withSources/
Removed:

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDirectory-withBinaries/

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDirectory-withSources/
Modified:

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project1/pom.xml

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project2/pom.xml

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/pom.xml

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/verify.bsh

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withSrc/child-level1-project1/pom.xml

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withSrc/child-level1-project2/pom.xml

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withSrc/pom.xml

maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withSrc/verify.bsh

Modified: 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project1/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project1/pom.xml?rev=770795&r1=770402&r2=770795&view=diff
==
--- 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project1/pom.xml
 (original)
+++ 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project1/pom.xml
 Fri May  1 19:16:32 2009
@@ -1,7 +1,7 @@
 
   
 test
-two-levels-includeBaseDirectory-withBinaries
+two-levels-includeBaseDir-withBin
 1.0-SNAPSHOT
   
   4.0.0

Modified: 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project2/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project2/pom.xml?rev=770795&r1=770402&r2=770795&view=diff
==
--- 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project2/pom.xml
 (original)
+++ 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/child-level1-project2/pom.xml
 Fri May  1 19:16:32 2009
@@ -2,7 +2,7 @@
 
   
 test
-two-levels-includeBaseDirectory-withBinaries
+two-levels-includeBaseDir-withBin
 1.0-SNAPSHOT
   
   4.0.0

Modified: 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/pom.xml?rev=770795&r1=770402&r2=770795&view=diff
==
--- 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/pom.xml
 (original)
+++ 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/pom.xml
 Fri May  1 19:16:32 2009
@@ -8,7 +8,7 @@
   
   
   test
-  two-levels-includeBaseDirectory-withBinaries
+  two-levels-includeBaseDir-withBin
   1.0-SNAPSHOT
 
   pom

Modified: 
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/multimodule/two-levels-includeBaseDir-withBin/verify.bsh?

svn commit: r770911 - /maven/components/branches/maven-2.2.x/pom.xml

2009-05-02 Thread bentmann
Author: bentmann
Date: Sat May  2 08:38:26 2009
New Revision: 770911

URL: http://svn.apache.org/viewvc?rev=770911&view=rev
Log:
o Fixed version property

Modified:
maven/components/branches/maven-2.2.x/pom.xml

Modified: maven/components/branches/maven-2.2.x/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/pom.xml?rev=770911&r1=770910&r2=770911&view=diff
==
--- maven/components/branches/maven-2.2.x/pom.xml (original)
+++ maven/components/branches/maven-2.2.x/pom.xml Sat May  2 08:38:26 2009
@@ -298,7 +298,7 @@
   
 
   
-2.2.0-RC1
+2.2.0-RC2-SNAPSHOT
 1.0-beta-5
 1.1
   




svn commit: r770912 - /maven/components/branches/maven-2.2.x/pom.xml

2009-05-02 Thread bentmann
Author: bentmann
Date: Sat May  2 08:42:52 2009
New Revision: 770912

URL: http://svn.apache.org/viewvc?rev=770912&view=rev
Log:
o Fixed SCM info

Modified:
maven/components/branches/maven-2.2.x/pom.xml

Modified: maven/components/branches/maven-2.2.x/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/pom.xml?rev=770912&r1=770911&r2=770912&view=diff
==
--- maven/components/branches/maven-2.2.x/pom.xml (original)
+++ maven/components/branches/maven-2.2.x/pom.xml Sat May  2 08:42:52 2009
@@ -16,7 +16,8 @@
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
--->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/xsd/maven-4.0.0.xsd";>
+-->
+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/xsd/maven-4.0.0.xsd";>
   4.0.0
 
   
@@ -115,9 +116,9 @@
   
 
   
-
scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x
-
scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x
-
http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x
+
scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.2.x
+
scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.2.x
+
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x
   
 
   




svn commit: r770913 - /maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml

2009-05-02 Thread bentmann
Author: bentmann
Date: Sat May  2 08:44:06 2009
New Revision: 770913

URL: http://svn.apache.org/viewvc?rev=770913&view=rev
Log:
o Fixed project version

Modified:
maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml

Modified: maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml?rev=770913&r1=770912&r2=770913&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml 
(original)
+++ maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml Sat May  
2 08:44:06 2009
@@ -21,7 +21,7 @@
   4.0.0
 
   org.apache.maven
-  2.2.0-SNAPSHOT
+  2.2.0-RC2-SNAPSHOT
   maven-core-it-runner
 
   Integration Test Executor




svn commit: r770914 - /maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml

2009-05-02 Thread bentmann
Author: bentmann
Date: Sat May  2 08:44:36 2009
New Revision: 770914

URL: http://svn.apache.org/viewvc?rev=770914&view=rev
Log:
o Fixed SCM info

Modified:
maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml

Modified: maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml?rev=770914&r1=770913&r2=770914&view=diff
==
--- maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml 
(original)
+++ maven/components/branches/maven-2.2.x/maven-core-it-runner/pom.xml Sat May  
2 08:44:36 2009
@@ -27,9 +27,9 @@
   Integration Test Executor
 
   
-
scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x/maven-core-it-runner
-
scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x/maven-core-it-runner
-
https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x/maven-core-it-runner
+
scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.2.x/maven-core-it-runner
+
scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.2.x/maven-core-it-runner
+
https://svn.apache.org/repos/asf/maven/components/branches/maven-2.2.x/maven-core-it-runner
   
 
   




svn commit: r770969 - /maven/ant-tasks/branches/maven-ant-tasks-2.0.x/

2009-05-02 Thread bentmann
Author: bentmann
Date: Sat May  2 16:07:50 2009
New Revision: 770969

URL: http://svn.apache.org/viewvc?rev=770969&view=rev
Log:
o Added IDE files to svn:ignore

Modified:
maven/ant-tasks/branches/maven-ant-tasks-2.0.x/   (props changed)

Propchange: maven/ant-tasks/branches/maven-ant-tasks-2.0.x/
--
--- svn:ignore (original)
+++ svn:ignore Sat May  2 16:07:50 2009
@@ -9,3 +9,4 @@
 *.iml
 .wtpmodules
 target-eclipse
+bin




svn commit: r770974 - in /maven/plugins/trunk/maven-ant-plugin/src: it/plugin-mngt-config-only/ it/plugin-mngt-config-only/src/ it/plugin-mngt-config-only/src/main/ it/plugin-mngt-config-only/src/main

2009-05-02 Thread bentmann
Author: bentmann
Date: Sat May  2 18:10:05 2009
New Revision: 770974

URL: http://svn.apache.org/viewvc?rev=770974&view=rev
Log:
[MANT-51] Configuration from plugin management is not considered

Added:
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config/
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/pom.xml 
  (with props)
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/

maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/

maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/

maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/Main.java
   (with props)

maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/verify.bsh  
 (with props)
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config/pom.xml   
(with props)
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config/src/
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config/src/main/

maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config/src/main/java/

maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config/src/main/java/Main.java
   (with props)
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config/verify.bsh   
(with props)
Modified:

maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java

Added: 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/pom.xml?rev=770974&view=auto
==
--- maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/pom.xml 
(added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/pom.xml 
Sat May  2 18:10:05 2009
@@ -0,0 +1,39 @@
+
+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";>
+  4.0.0
+
+  org.apache.maven.plugins.its.ant
+  plugin-mngt-config-only
+  1.0-SNAPSHOT
+
+  
+Checks the extraction of plugin configuration when only plugin management 
is present.
+  
+
+  
+
+  
+
+  org.apache.maven.plugins
+  maven-compiler-plugin
+  2.0.2
+  
+1.3
+1.4
+  
+
+  
+
+
+  
+  
+org.apache.maven.plugins
+maven-ant-plugin
+@project.version@
+  
+
+  
+
+

Propchange: 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/pom.xml
--
svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/pom.xml
--
svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/Main.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/Main.java?rev=770974&view=auto
==
--- 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/Main.java
 (added)
+++ 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/Main.java
 Sat May  2 18:10:05 2009
@@ -0,0 +1,6 @@
+public class Main
+{
+
+private String test = "it";
+
+}

Propchange: 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/Main.java
--
svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/src/main/java/Main.java
--
svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/verify.bsh?rev=770974&view=auto
==
--- 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/verify.bsh 
(added)
+++ 
maven/plugins/trunk/maven-ant-plugin/src/it/plugin-mngt-config-only/verify.bsh 
Sat May  2 18:10:05 2009
@@ -0,0 +1,25 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+import org.codehaus.plexus.util.*;
+
+File buildFile = new File( basedir, "maven-build.

svn commit: r771143 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

2009-05-03 Thread bentmann
Author: bentmann
Date: Sun May  3 23:02:14 2009
New Revision: 771143

URL: http://svn.apache.org/viewvc?rev=771143&view=rev
Log:
o Fixed conversion of default value for plugin configuration

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=771143&r1=771142&r2=771143&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Sun May  3 23:02:14 2009
@@ -598,7 +598,12 @@
 {
 Xpp3Dom e = new Xpp3Dom( ce.getName() );
 e.setValue( ce.getValue( null ) );
-dom.addChild( e );
+String defaultValue = ce.getAttribute( "default-value", null );
+if ( defaultValue != null )
+{
+e.setAttribute( "default-value", defaultValue );
+}
+dom.addChild( e );
 }
 }
 




svn commit: r771151 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

2009-05-03 Thread bentmann
Author: bentmann
Date: Sun May  3 23:47:56 2009
New Revision: 771151

URL: http://svn.apache.org/viewvc?rev=771151&view=rev
Log:
o Fixed order of plugin configuration merging

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=771151&r1=771150&r2=771151&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Sun May  3 23:47:56 2009
@@ -191,32 +191,44 @@
pln.add(copy);
}

+   // Merge the various sources for mojo configuration:
+// 1. default values from mojo descriptor
+// 2. POM values from per-plugin configuration
+// 3. POM values from per-execution configuration
+// These configuration sources are given in increasing order of 
dominance.
+
Set pl = 
lifecycle.populateDefaultConfigurationForPlugins(new HashSet(pln), 
project, configuration.getLocalRepository());

-   for (Plugin buildPlugin : pl) {
-   Xpp3Dom dom = (Xpp3Dom) 
buildPlugin.getConfiguration();
-   Plugin x = containsPlugin(buildPlugin, 
project.getModel()
-   .getBuild().getPlugins());
-
-   for (PluginExecution e : 
buildPlugin.getExecutions()) {
-   for (String g : e.getGoals()) {
-   if (x != null) {
-   PluginExecution pe = 
contains(g, x.getExecutions());
-   if (pe != null) {
-   Xpp3Dom dom1 = 
Xpp3Dom.mergeXpp3Dom(
-   
(Xpp3Dom) pe.getConfiguration(),
-   
(Xpp3Dom) e.getConfiguration());
-   
e.setConfiguration(dom1);
-   }
-   }
-   Xpp3Dom dom1 = 
Xpp3Dom.mergeXpp3Dom((Xpp3Dom) e
-   
.getConfiguration(), dom);
-   e.setConfiguration(dom1);
-   }
-   }
+   for ( Plugin buildPlugin : pl )
+{
+Xpp3Dom dom = (Xpp3Dom) buildPlugin.getConfiguration();
+Plugin x = containsPlugin( buildPlugin, 
project.getModel().getBuild().getPlugins() );
 
-   }
+for ( PluginExecution e : buildPlugin.getExecutions() )
+{
+if ( dom != null )
+{
+Xpp3Dom dom1 = Xpp3Dom.mergeXpp3Dom( new Xpp3Dom( dom 
), (Xpp3Dom) e.getConfiguration() );
+e.setConfiguration( dom1 );
+}
+for ( String g : e.getGoals() )
+{
+if ( x != null )
+{
+PluginExecution pe = contains( g, 
x.getExecutions() );
+if ( pe != null )
+{
+Xpp3Dom dom2 =
+Xpp3Dom.mergeXpp3Dom( (Xpp3Dom) 
pe.getConfiguration(),
+  (Xpp3Dom) 
e.getConfiguration() );
+e.setConfiguration( dom2 );
+}
+}
+}
+}
+
+}

project.getModel().getBuild().setPlugins(new 
ArrayList(pl));
} 




svn commit: r771154 - in /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven: lifecycle/DefaultLifecycleExecutor.java project/DefaultMavenProjectBuilder.java

2009-05-03 Thread bentmann
Author: bentmann
Date: Mon May  4 01:08:40 2009
New Revision: 771154

URL: http://svn.apache.org/viewvc?rev=771154&view=rev
Log:
o Fixed merging of lifecycle plugins that contribute more than one execution
o Fixed conversion of default value for plugin configuration

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=771154&r1=771153&r2=771154&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Mon May  4 01:08:40 2009
@@ -18,10 +18,10 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -508,7 +508,7 @@
 //
 public Set getPluginsBoundByDefaultToAllLifecycles( String 
packaging )
 {
-Set plugins = new LinkedHashSet();
+Map plugins = new LinkedHashMap();
 
 for ( Lifecycle lifecycle : lifecycles )
 {
@@ -524,23 +524,35 @@
 //
 // org.apache.maven.plugins:maven-compiler-plugin:compile
 //
-for ( String s : lifecyclePhasesForPackaging.values() )
-{
-plugins.add( 
populatePluginWithInformationSpecifiedInLifecyclePhaseDefinition( s ) );
-}
+parseLifecyclePhaseDefinitions( plugins, 
lifecyclePhasesForPackaging.values() );
 }
 else if ( lifecycle.getDefaultPhases() != null )
 {
-for ( String s : lifecycle.getDefaultPhases() )
-{
-plugins.add( 
populatePluginWithInformationSpecifiedInLifecyclePhaseDefinition( s ) );
-}
+parseLifecyclePhaseDefinitions( plugins, 
lifecycle.getDefaultPhases() );
 }
 }
 
-return plugins;
+return plugins.keySet();
 }
-
+
+private void parseLifecyclePhaseDefinitions( Map plugins,
+ Collection 
lifecyclePhaseDefinitions )
+{
+for ( String lifecyclePhaseDefinition : lifecyclePhaseDefinitions )
+{
+Plugin plugin = 
populatePluginWithInformationSpecifiedInLifecyclePhaseDefinition( 
lifecyclePhaseDefinition );
+Plugin existing = plugins.get( plugin );
+if ( existing != null )
+{
+existing.getExecutions().addAll( plugin.getExecutions() );
+}
+else
+{
+plugins.put( plugin, plugin );
+}
+}
+}
+
 private Plugin 
populatePluginWithInformationSpecifiedInLifecyclePhaseDefinition( String 
lifecyclePhaseDefinition )
 {
 String[] p = StringUtils.split( lifecyclePhaseDefinition, ":" );
@@ -548,8 +560,10 @@
 plugin.setGroupId( p[0] );
 plugin.setArtifactId( p[1] );
 PluginExecution execution = new PluginExecution();
-execution.setGoals( Arrays.asList( new String[]{ p[2] } ) );
-plugin.setExecutions( Arrays.asList( new PluginExecution[]{ execution 
} ) );
+// FIXME: Find a better execution id
+execution.setId( "default-" + p[2] );
+execution.setGoals( new ArrayList( Arrays.asList( new String[] 
{ p[2] } ) ) );
+plugin.setExecutions( new ArrayList( Arrays.asList( 
new PluginExecution[] { execution } ) ) );
 return plugin;
 }
 
@@ -563,7 +577,7 @@
 for( String g : e.getGoals() )
 {
 Xpp3Dom dom = getDefaultPluginConfiguration( 
p.getGroupId(), p.getArtifactId(), p.getVersion(), g, project, localRepository 
);
-e.setConfiguration( dom );
+e.setConfiguration( Xpp3Dom.mergeXpp3Dom( (Xpp3Dom) 
e.getConfiguration(), dom, Boolean.TRUE ) );
 }
 }
 }
@@ -594,11 +608,11 @@
 
 for( PlexusConfiguration ce : ces )
 {
-if ( ce.getValue( null ) != null )
+String defaultValue = ce.getAttribute( &quo

svn commit: r771264 - /maven/shared/trunk/pom.xml

2009-05-04 Thread bentmann
Author: bentmann
Date: Mon May  4 10:37:35 2009
New Revision: 771264

URL: http://svn.apache.org/viewvc?rev=771264&view=rev
Log:
o Excluded maven-script from reactor/CI as it's currently not building and 
would need some work

Modified:
maven/shared/trunk/pom.xml

Modified: maven/shared/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/pom.xml?rev=771264&r1=771263&r2=771264&view=diff
==
--- maven/shared/trunk/pom.xml (original)
+++ maven/shared/trunk/pom.xml Mon May  4 10:37:35 2009
@@ -128,7 +128,9 @@
 maven-reporting-impl
 maven-repository-builder
 maven-runtime
+
 maven-shared-io
 maven-shared-jar
 maven-shared-monitor




svn commit: r771298 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

2009-05-04 Thread bentmann
Author: bentmann
Date: Mon May  4 13:16:45 2009
New Revision: 771298

URL: http://svn.apache.org/viewvc?rev=771298&view=rev
Log:
o Filtered non-applicable parameters when converting from plugin execution to 
mojo execution

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=771298&r1=771297&r2=771298&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Mon May  4 13:16:45 2009
@@ -349,9 +349,14 @@
 {
 for( String goal : e.getGoals() )
 {
-if( mojoDescriptor.getGoal().equals( goal ) )
+if ( mojoDescriptor.getGoal().equals( goal ) )
 {
-mojoExecution.setConfiguration( (Xpp3Dom) 
e.getConfiguration() );
+Xpp3Dom executionConfiguration = (Xpp3Dom) 
e.getConfiguration();
+
+Xpp3Dom mojoConfiguration =
+extractMojoConfiguration( 
executionConfiguration, mojoDescriptor );
+
+mojoExecution.setConfiguration( mojoConfiguration 
);
 }
 }
 }
@@ -362,7 +367,36 @@
 
 return lifecyclePlan;
 }  
-   
+
+/**
+ * Extracts the configuration for a single mojo from the specified 
execution configuration by discarding any
+ * non-applicable parameters. This is necessary because a plugin execution 
can have multiple goals with different
+ * parametes whose default configurations are all aggregated into the 
execution configuration. However, the
+ * underlying configurator will error out when trying to configure a mojo 
parameter that is specified in the
+ * configuration but not present in the mojo instance.
+ * 
+ * @param executionConfiguration The configuration from the plugin 
execution, must not be {...@code null}.
+ * @param mojoDescriptor The descriptor for the mojo being configured, 
must not be {...@code null}.
+ * @return The configuration for the mojo, never {...@code null}.
+ */
+private Xpp3Dom extractMojoConfiguration( Xpp3Dom executionConfiguration, 
MojoDescriptor mojoDescriptor )
+{
+Xpp3Dom mojoConfiguration = new Xpp3Dom( executionConfiguration );
+
+Collection mojoParameters = 
mojoDescriptor.getParameterMap().keySet();
+
+for ( int i = mojoConfiguration.getChildCount() - 1; i >= 0; i-- )
+{
+String mojoParameter = mojoConfiguration.getChild( i ).getName();
+if ( !mojoParameters.contains( mojoParameter ) )
+{
+mojoConfiguration.removeChild( i );
+}
+}
+
+return mojoConfiguration;
+}
+
 // org.apache.maven.plugins:maven-remote-resources-plugin:1.0:process
 MojoDescriptor getMojoDescriptor( String task, MavenProject project, 
ArtifactRepository localRepository )
 //MojoDescriptor getMojoDescriptor( String groupId, String artifactId, 
String version, String goal, MavenProject project, ArtifactRepository 
localRepository )
@@ -490,7 +524,7 @@
 {
 if ( lifecycle.getId().equals( "default" ) )
 {
-return (List) lifecycle.getPhases();
+return lifecycle.getPhases();
 }
 }
 




svn commit: r771316 - /maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

2009-05-04 Thread bentmann
Author: bentmann
Date: Mon May  4 14:28:27 2009
New Revision: 771316

URL: http://svn.apache.org/viewvc?rev=771316&view=rev
Log:
o Restored original default value for enabled flag of repository

Modified:
maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

Modified: maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo?rev=771316&r1=771315&r2=771316&view=diff
==
--- maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo Mon 
May  4 14:28:27 2009
@@ -2160,12 +2160,12 @@
 
 public boolean isFiltering()
 {
-return filteringValue != null ? (new 
Boolean(filteringValue)).booleanValue() : false;
+return ( filteringValue != null ) ? Boolean.parseBoolean( 
filteringValue ) : false;
 }
 
 public void setFiltering( boolean filtering )
 {
-filteringValue = String.valueOf(filtering);
+filteringValue = String.valueOf( filtering );
 }  
 
 /**
@@ -2496,12 +2496,12 @@
 
 public boolean isEnabled()
 {
-return enabledValue != null ? (new 
Boolean(enabledValue)).booleanValue() : false;
+return ( enabledValue != null ) ? Boolean.parseBoolean( enabledValue ) 
: true;
 }
 
 public void setEnabled( boolean enabled )
 {
-enabledValue = String.valueOf(enabled);
+enabledValue = String.valueOf( enabled );
 }
 
 ]]>




svn commit: r771441 - in /maven/components/branches/MNG-2766: maven-embedder/src/main/java/org/apache/maven/embedder/execution/ maven-repository/src/main/java/org/apache/maven/repository/

2009-05-04 Thread bentmann
Author: bentmann
Date: Mon May  4 21:05:28 2009
New Revision: 771441

URL: http://svn.apache.org/viewvc?rev=771441&view=rev
Log:
o Fixed creation of default remote repo (e.g. no snapshots from central)

Modified:

maven/components/branches/MNG-2766/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java

maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java

Modified: 
maven/components/branches/MNG-2766/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java?rev=771441&r1=771440&r2=771441&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
 Mon May  4 21:05:28 2009
@@ -210,7 +210,7 @@
 }
 }
 
-if ( !definedRepositories.contains( "central" ) )
+if ( !definedRepositories.contains( 
RepositorySystem.DEFAULT_REMOTE_REPO_ID ) )
 {
 try
 {

Modified: 
maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java?rev=771441&r1=771440&r2=771441&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java
 Mon May  4 21:05:28 2009
@@ -317,7 +317,11 @@
 {
 try
 {
-return createRepository( 
localRepository.toURI().toURL().toString(), 
RepositorySystem.DEFAULT_LOCAL_REPO_ID );
+return createRepository( 
localRepository.toURI().toURL().toString(),
+ RepositorySystem.DEFAULT_LOCAL_REPO_ID, 
true,
+ 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, true,
+ 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
+ 
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
 }
 catch ( MalformedURLException e )
 {
@@ -328,13 +332,19 @@
 public ArtifactRepository createDefaultRemoteRepository()
 throws InvalidRepositoryException
 {
-return createRepository( RepositorySystem.DEFAULT_REMOTE_REPO_URL, 
RepositorySystem.DEFAULT_REMOTE_REPO_ID );
+return createRepository( RepositorySystem.DEFAULT_REMOTE_REPO_URL, 
RepositorySystem.DEFAULT_REMOTE_REPO_ID,
+ true, 
ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER, false,
+ ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY,
+ ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN 
);
 }
 
 public ArtifactRepository createLocalRepository( String url, String 
repositoryId )
 throws IOException
 {
-return createRepository( canonicalFileUrl( url ), repositoryId );
+return createRepository( canonicalFileUrl( url ), repositoryId, true,
+ 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, true,
+ ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
+ 
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
 }
 
 private String canonicalFileUrl( String url )
@@ -366,22 +376,18 @@
 return url;
 }
 
-private ArtifactRepository createRepository( String url, String 
repositoryId )
+private ArtifactRepository createRepository( String url, String 
repositoryId, boolean releases,
+ String releaseUpdates, 
boolean snapshots, String snapshotUpdates,
+ String checksumPolicy )
 {
-// snapshots vs releases
-// offline = to turning the update policy off
+ArtifactRepositoryPolicy snapshotsPolicy =
+new ArtifactRepositoryPolicy( snapshots, snapshotUpdates, 
checksumPolicy );
 
-//TODO: we'll need to allow finer grained creation of repositories but 
this will do for now
+ArtifactReposit

svn commit: r771481 - in /maven/components/branches/MNG-2766: maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java maven-core/src/main/java/org/apache/maven/lifec

2009-05-04 Thread bentmann
Author: bentmann
Date: Mon May  4 22:41:22 2009
New Revision: 771481

URL: http://svn.apache.org/viewvc?rev=771481&view=rev
Log:
o Fixed propagation of POM-level plugin dependencies to the plugin manager

Modified:

maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: 
maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java?rev=771481&r1=771480&r2=771481&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
 Mon May  4 22:41:22 2009
@@ -19,6 +19,8 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -424,8 +426,32 @@
 if ( request.isResolveTransitively() )
 {
 try
-{
-artifacts = source.retrieve( rootArtifact, localRepository, 
remoteRepositories ).getArtifacts();
+{
+Set directArtifacts =
+source.retrieve( rootArtifact, localRepository, 
remoteRepositories ).getArtifacts();
+
+if ( artifacts == null || artifacts.isEmpty() )
+{
+artifacts = directArtifacts;
+}
+else
+{
+List allArtifacts = new ArrayList();
+allArtifacts.addAll( artifacts );
+allArtifacts.addAll( directArtifacts );
+
+Map mergedArtifacts = new 
LinkedHashMap();
+for ( Artifact artifact : allArtifacts )
+{
+String conflictId = artifact.getDependencyConflictId();
+if ( !mergedArtifacts.containsKey( conflictId ) )
+{
+mergedArtifacts.put( conflictId, artifact );
+}
+}
+
+artifacts = new LinkedHashSet( 
mergedArtifacts.values() );
+}
 }
 catch ( ArtifactMetadataRetrievalException e )
 {

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=771481&r1=771480&r2=771481&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Mon May  4 22:41:22 2009
@@ -468,15 +468,15 @@
 throw new LifecycleExecutionException( message );
 }
 
-if ( plugin.getVersion() == null )
+for ( Plugin buildPlugin : project.getBuildPlugins() )
 {
-for ( Plugin buildPlugin : project.getBuildPlugins() )
+if ( buildPlugin.getKey().equals( plugin.getKey() ) )
 {
-if ( buildPlugin.getKey().equals( plugin.getKey() ) )
+if ( plugin.getVersion() == null || 
plugin.getVersion().equals( buildPlugin.getVersion() ) )
 {
 plugin = buildPlugin;
-break;
 }
+break;
 }
 }
 




svn commit: r771668 - /maven/components/branches/MNG-2766/build.xml

2009-05-05 Thread bentmann
Author: bentmann
Date: Tue May  5 11:22:04 2009
New Revision: 771668

URL: http://svn.apache.org/viewvc?rev=771668&view=rev
Log:
o Exposed maven.test.skip as a property of Ant build to more easily switch 
around

Modified:
maven/components/branches/MNG-2766/build.xml

Modified: maven/components/branches/MNG-2766/build.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/build.xml?rev=771668&r1=771667&r2=771668&view=diff
==
--- maven/components/branches/MNG-2766/build.xml (original)
+++ maven/components/branches/MNG-2766/build.xml Tue May  5 11:22:04 2009
@@ -65,6 +65,7 @@
 
 
 
+ 
 
 maven.home = ${maven.home.effective}
 maven.repo.local = ${maven.repo.local}
@@ -200,7 +201,7 @@
   
   
   
-  
+  
   
   
 




svn commit: r771760 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

2009-05-05 Thread bentmann
Author: bentmann
Date: Tue May  5 14:51:56 2009
New Revision: 771760

URL: http://svn.apache.org/viewvc?rev=771760&view=rev
Log:
o Added debug dump of entire build plan

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=771760&r1=771759&r2=771760&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Tue May  5 14:51:56 2009
@@ -177,7 +177,24 @@
 throws LifecycleExecutionException, MojoFailureException
 {
 List lifecyclePlan = calculateLifecyclePlan( task, 
session );
-
+
+if ( logger.isDebugEnabled() )
+{
+logger.debug( "=== BUILD PLAN ===" );
+logger.debug( "Project:   " + project );
+for ( MojoExecution mojoExecution : lifecyclePlan )
+{
+MojoDescriptor mojoDescriptor = 
mojoExecution.getMojoDescriptor();
+PluginDescriptor pluginDescriptor = 
mojoDescriptor.getPluginDescriptor();
+logger.debug( "--" );
+logger.debug( "Goal:  " + 
pluginDescriptor.getGroupId() + ':' + pluginDescriptor.getArtifactId() + ':'
++ pluginDescriptor.getVersion() + ':' + 
mojoDescriptor.getGoal() + ':'
++ mojoExecution.getExecutionId() );
+logger.debug( "Configuration: " + String.valueOf( 
mojoExecution.getConfiguration() ) );
+}
+logger.debug( "==" );
+}
+
 for ( MojoExecution mojoExecution : lifecyclePlan )
 {
 try




svn commit: r771959 [2/2] - in /maven/components/branches/MNG-2766: maven-core/src/test/java/org/apache/maven/profiles/matchers/ maven-core/src/test/java/org/apache/maven/project/harness/ maven-core/s

2009-05-05 Thread bentmann
Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/projects/scope/transitive-test-dep.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/invalid-aggregator-packaging-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/invalid-ids-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-1-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-artifactId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-dependency-artifactId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-dependency-groupId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-dependency-mgmt-artifactId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-dependency-mgmt-groupId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-dependency-mgmt-version-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-dependency-version-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-groupId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-modelVersion-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-plugin-artifactId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-report-artifactId-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-repository-id-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-resource-directory-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-type-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/validation/missing-version-pom.xml
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ModelEventListener.java
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/Interpolator.java
-

svn commit: r771965 - /maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/plugin-management-duplicate/pom.xml

2009-05-05 Thread bentmann
Author: bentmann
Date: Tue May  5 18:50:45 2009
New Revision: 771965

URL: http://svn.apache.org/viewvc?rev=771965&view=rev
Log:
o Fixed POM to be valid

Modified:

maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/plugin-management-duplicate/pom.xml

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/plugin-management-duplicate/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/plugin-management-duplicate/pom.xml?rev=771965&r1=771964&r2=771965&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/plugin-management-duplicate/pom.xml
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/plugin-management-duplicate/pom.xml
 Tue May  5 18:50:45 2009
@@ -17,6 +17,7 @@
-->
 
 
+   4.0.0
 
gid
aid




svn commit: r771971 - in /maven/components/branches/MNG-2766/maven-core/src/test: java/org/apache/maven/project/ java/org/apache/maven/settings/ resources/org/apache/maven/project/ resources/org/apach

2009-05-05 Thread bentmann
Author: bentmann
Date: Tue May  5 19:18:41 2009
New Revision: 771971

URL: http://svn.apache.org/viewvc?rev=771971&view=rev
Log:
o Decoupled POM tests from plugin mananger and repository system (these tests 
were originally written without merging of default configuration in mind)

Added:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java
   (with props)

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/AbstractMavenProjectTestCase.xml
   (with props)

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/PomConstructionTest.xml
   (with props)

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/settings/
   (with props)

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/settings/PomConstructionWithSettingsTest.xml
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java?rev=771971&r1=771970&r2=771971&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
 Tue May  5 19:18:41 2009
@@ -61,6 +61,12 @@
 return projectBuilder;
 }
 
+@Override
+protected String getCustomConfigurationName()
+{
+return AbstractMavenProjectTestCase.class.getName().replace( '.', '/' 
) + ".xml";
+}
+
 // --
 // Local repository
 // --

Added: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java?rev=771971&view=auto
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java
 (added)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java
 Tue May  5 19:18:41 2009
@@ -0,0 +1,81 @@
+package org.apache.maven.project;
+
+/*
+ * 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.
+ */
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.lifecycle.LifecycleExecutionException;
+import org.apache.maven.lifecycle.LifecycleExecutor;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.plugin.MojoExecution;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+/**
+ * A stub implementation that assumes an empty lifecycle to bypass interaction 
with the plugin manager and to avoid
+ * plugin artifact resolution from repositories.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class EmptyLifecycleExecutor
+implements LifecycleExecutor
+{
+
+public List calculateLifecyclePlan( String lifecyclePhase, 
MavenSession session )
+throws Li

svn commit: r772013 - in /maven/components/branches/MNG-2766: maven-model-builder/pom.xml maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java pom.xml

2009-05-05 Thread bentmann
Author: bentmann
Date: Tue May  5 23:31:09 2009
New Revision: 772013

URL: http://svn.apache.org/viewvc?rev=772013&view=rev
Log:
o Migrated from StAX to XPP to have us focus on a single XML parser for now

Modified:
maven/components/branches/MNG-2766/maven-model-builder/pom.xml

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java
maven/components/branches/MNG-2766/pom.xml

Modified: maven/components/branches/MNG-2766/maven-model-builder/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/pom.xml?rev=772013&r1=772012&r2=772013&view=diff
==
--- maven/components/branches/MNG-2766/maven-model-builder/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-model-builder/pom.xml Tue May  5 
23:31:09 2009
@@ -38,14 +38,6 @@
   maven-model
 
 
-  org.codehaus.woodstox
-  wstx-asl
-
-
-  stax
-  stax-api
-
-
   junit
   junit
   4.4

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java?rev=772013&r1=772012&r2=772013&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java
 Tue May  5 23:31:09 2009
@@ -5,6 +5,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.Reader;
 import java.io.Writer;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -20,11 +21,6 @@
 import java.util.Set;
 import java.util.Map.Entry;
 
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
 import org.apache.maven.model.Build;
 import org.apache.maven.model.DomainModel;
 import org.apache.maven.model.Model;
@@ -32,7 +28,12 @@
 import org.apache.maven.model.Resource;
 import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
 import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.WriterFactory;
+import org.codehaus.plexus.util.xml.pull.MXParser;
+import org.codehaus.plexus.util.xml.pull.XmlPullParser;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 @Component(role = Interpolator.class)
 public class DefaultInterpolator
@@ -580,9 +581,6 @@
 }
 
 List modelProperties = new ArrayList();
-XMLInputFactory xmlInputFactory = new 
com.ctc.wstx.stax.WstxInputFactory();
-xmlInputFactory.setProperty( 
XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.FALSE );
-xmlInputFactory.setProperty( XMLInputFactory.IS_NAMESPACE_AWARE, 
Boolean.FALSE );
 
 Uri uri = new Uri( baseUri );
 String tagName = baseUri;
@@ -590,29 +588,28 @@
 
 int depth = 0;
 int depthOfTagValue = depth;
-XMLStreamReader xmlStreamReader = null;
+Reader reader = null;
 try
 {
-xmlStreamReader = xmlInputFactory.createXMLStreamReader( 
inputStream );
+reader = ReaderFactory.newXmlReader( inputStream );
+
+XmlPullParser parser = new MXParser();
+parser.setInput( reader );
 
 Map attributes = new HashMap();
-for ( ;; xmlStreamReader.next() )
+for ( int type = parser.getEventType();; type = parser.next() )
 {
-int type = xmlStreamReader.getEventType();
 switch ( type )
 {
-
-case XMLStreamConstants.CDATA:
-case XMLStreamConstants.CHARACTERS:
+case XmlPullParser.TEXT:
 {
 if ( depth == depthOfTagValue )
 {
-tagValue.append( 
xmlStreamReader.getTextCharacters(), xmlStreamReader.getTextStart(), 
xmlStreamReader.getTextLength() );
+tagValue.append( parser.getText() );
 }
 break;
 }
-
-case XMLStreamConstants.START_ELEMENT:
+case XmlPullParser.START_TAG:
 {
 if ( !tagName.equals( baseUri ) )
 

svn commit: r772758 - in /maven/components/branches/MNG-2766: maven-model-builder/src/main/java/org/apache/maven/model/processors/ maven-model/src/main/mdo/

2009-05-07 Thread bentmann
Author: bentmann
Date: Thu May  7 20:06:41 2009
New Revision: 772758

URL: http://svn.apache.org/viewvc?rev=772758&view=rev
Log:
o Changed boolean fiels to String to enable both filtering and three-valued 
logic for proper merging

Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/BuildProcessor.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/RepositoriesProcessor.java
maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/BuildProcessor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/BuildProcessor.java?rev=772758&r1=772757&r2=772758&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/BuildProcessor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/BuildProcessor.java
 Thu May  7 20:06:41 2009
@@ -159,7 +159,7 @@
 {
 Resource r = new Resource();
 r.setDirectory( resource.getDirectory());
-r.setFilteringValue( resource.getFilteringValue() );
+r.setFiltering( resource.getFiltering() );
 r.setMergeId( resource.getMergeId() );
 r.setTargetPath( resource.getTargetPath() );
 r.setExcludes( new ArrayList(resource.getExcludes()) );

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/RepositoriesProcessor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/RepositoriesProcessor.java?rev=772758&r1=772757&r2=772758&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/RepositoriesProcessor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/RepositoriesProcessor.java
 Thu May  7 20:06:41 2009
@@ -91,7 +91,7 @@
 {
 RepositoryPolicy p = new RepositoryPolicy();
 p.setChecksumPolicy( policy.getChecksumPolicy() );
-p.setEnabledValue(policy.getEnabledValue());
+p.setEnabled(policy.getEnabled());
 p.setUpdatePolicy( policy.getUpdatePolicy() );
 return p;
 }

Modified: maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo?rev=772758&r1=772757&r2=772758&view=diff
==
--- maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo Thu 
May  7 20:06:41 2009
@@ -2116,14 +2116,16 @@
   
   String
 
-
-  filteringValue
+
+  filtering
   3.0.0+
   
 
   
   String
@@ -2160,12 +2162,12 @@
 
 public boolean isFiltering()
 {
-return ( filteringValue != null ) ? Boolean.parseBoolean( 
filteringValue ) : false;
+return ( filtering != null ) ? Boolean.parseBoolean( filtering ) : 
false;
 }
 
 public void setFiltering( boolean filtering )
 {
-filteringValue = String.valueOf( filtering );
+this.filtering = String.valueOf( filtering );
 }  
 
 /**
@@ -2448,10 +2450,16 @@
   4.0.0
   Download policy.
   
-
-  enabledValue
+
+  enabled
   4.0.0
-  Whether to use this repository for downloading this 
type of artifact.
+  
+
+  
   String
 
 
@@ -2496,12 +2504,12 @@
 
 public boolean isEnabled()
 {
-return ( enabledValue != null ) ? Boolean.parseBoolean( enabledValue ) 
: true;
+return ( enabled != null ) ? Boolean.parseBoolean( enabled ) : true;
 }
 
 public void setEnabled( boolean enabled )
 {
-enabledValue = String.valueOf( enabled );
+this.enabled = String.valueOf( enabled );
 }
 
 ]]>
@@ -2554,7 +2562,13 @@
 
   inherited
   4.0.0
-  Whether any configuration should be propagated to child 
POMs.
+  
+
+  
   String
 
 
@@ -2617,10 +2631,15 @@
 
   ext

svn commit: r772760 - /maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

2009-05-07 Thread bentmann
Author: bentmann
Date: Thu May  7 20:10:38 2009
New Revision: 772760

URL: http://svn.apache.org/viewvc?rev=772760&view=rev
Log:
o Fixed typo and restored proper default value

Modified:
maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

Modified: maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo?rev=772760&r1=772759&r2=772760&view=diff
==
--- maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo Thu 
May  7 20:10:38 2009
@@ -2679,7 +2679,7 @@
 

svn commit: r772827 [3/3] - in /maven/components/branches/MNG-2766: maven-core/src/test/java/org/apache/maven/project/ maven-model-builder/src/main/java/org/apache/maven/model/ maven-model-builder/src

2009-05-07 Thread bentmann
Propchange: 
maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
--
svn:eol-style = native

Propchange: 
maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
--
svn:keywords = Author Date Id Revision




svn commit: r772827 [1/3] - in /maven/components/branches/MNG-2766: maven-core/src/test/java/org/apache/maven/project/ maven-model-builder/src/main/java/org/apache/maven/model/ maven-model-builder/src

2009-05-07 Thread bentmann
Author: bentmann
Date: Fri May  8 01:28:10 2009
New Revision: 772827

URL: http://svn.apache.org/viewvc?rev=772827&view=rev
Log:
o Re-introduced 2.x like inheritance assembler and profile injector components 
which mostly delegate to a common model merger class. First of all, the merger 
only deals with two models at a time, simplifying its logic compared to the 
current processors, hopefully allowing us to quickly/easily fix the outstanding 
POM tests. The ultimate goal is to generate the basic ModelMerger automatically 
with a new Modello plugin which could be programatically customized via a sub 
class like MavenModelMerger. It will be interesting to find out how much of the 
merging rules could be generalized via declarative options in the model. This 
could allow for generated documentation about how inheritance and profile 
injection alter the model. Last but not least, generating the merger from the 
MDO would ease addition of new model elements as these would automatically be 
considered for inheritance and profile injection.

Added:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/InheritanceAssembler.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/profile/
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileInjector.java
   (with props)
maven/components/branches/MNG-2766/maven-model/src/main/java/   (with props)
maven/components/branches/MNG-2766/maven-model/src/main/java/org/   (with 
props)
maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/   
(with props)

maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/  
 (with props)

maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/
   (with props)

maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/
   (with props)

maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=772827&r1=772826&r2=772827&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Fri May  8 01:28:10 2009
@@ -1317,7 +1317,7 @@
 throws Exception
 {
 PomTestWrapper pom = buildPom( "boolean-interpolation" );
-assertTrue ((Boolean) pom.getValue( "repositories[2]/releases/enabled" 
) ); 
+assertTrue ((Boolean) pom.getValue( "repositories[1]/releases/enabled" 
) ); 
 assertTrue((Boolean) pom.getValue( "build/resources[1]/filtering" ) ); 
 }
 

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java?rev=772827&r1=772826&r2=772827&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 Fri May  8 01:28:10 2009
@@ -25,8 +25,9 @@
 import java.util.Collection;
 import java.util.C

svn commit: r772946 - in /maven/components/branches/MNG-2766/maven-core/src/test: java/org/apache/maven/project/PomConstructionTest.java resources-project-builder/dependencies-with-different-versions/

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 11:34:47 2009
New Revision: 772946

URL: http://svn.apache.org/viewvc?rev=772946&view=rev
Log:
o Removed duplicate test

Removed:

maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/dependencies-with-different-versions/
Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=772946&r1=772945&r2=772946&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Fri May  8 11:34:47 2009
@@ -176,13 +176,6 @@
 
 }
 */
-  /*MNG-3803*/
-public void testDependenciesWithDifferentVersions()
-   throws Exception
-{
-PomTestWrapper pom = buildPom( "dependencies-with-different-versions" 
);
-assertEquals( 1, ( (List) pom.getValue( "dependencies" ) ).size() );
-}
 
 /* MNG-3567*/
 public void testParentInterpolation()




svn commit: r772964 - in /maven/components/branches/MNG-2766: maven-core/src/main/java/org/apache/maven/project/ maven-core/src/test/java/org/apache/maven/project/ maven-model-builder/src/main/java/or

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 13:10:51 2009
New Revision: 772964

URL: http://svn.apache.org/viewvc?rev=772964&view=rev
Log:
o Continued work on model merging

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileInjector.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=772964&r1=772963&r2=772964&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Fri May  8 13:10:51 2009
@@ -21,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Properties;
 import java.util.Set;
@@ -159,11 +160,12 @@
 
 project = this.fromDomainModelToMavenProject( model, 
domainModel.getParentFile(), configuration, pomFile );
 
-Set pluginsFromProject = new HashSet();
+Set pluginsFromProject = new LinkedHashSet();
 for ( Plugin p : project.getModel().getBuild().getPlugins() )
 {
 Plugin copy = new Plugin();
 PluginProcessor.copy2( p, copy, true );
+copy.setDependencies( p.getDependencies() );
 pluginsFromProject.add( copy );
 }
 

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=772964&r1=772963&r2=772964&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Fri May  8 13:10:51 2009
@@ -925,7 +925,7 @@
 }
 
 /** MNG-2006 */
-public void testUrlAppend()
+public void testUrlAppendWithChildPathAdjustment()
 throws Exception
 {
 PomTestWrapper pom = this.buildPom( "url-append/child" );

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=772964&r1=772963&r2=772964&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 Fri May  8 13:10:51 2009
@@ -1,24 +1,5 @@
 package org.apache.maven.model.merge;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Model;
-import org.apache.maven.model.ModelBase;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.PluginExecution;
-import org.apache.maven.model.Repository;
-import org.apache.maven.model.RepositoryBase;
-import org.apache.maven.model.Site;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -38,8 +19,30 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util

svn commit: r772980 - in /maven/components/branches/MNG-2766: maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java maven-model/src/main/java/org/apache/maven/model/merg

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 13:31:32 2009
New Revision: 772980

URL: http://svn.apache.org/viewvc?rev=772980&view=rev
Log:
o Continued work on model merging

Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=772980&r1=772979&r2=772980&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 Fri May  8 13:31:32 2009
@@ -30,12 +30,21 @@
 import java.util.StringTokenizer;
 
 import org.apache.maven.model.BuildBase;
+import org.apache.maven.model.CiManagement;
 import org.apache.maven.model.Dependency;
+import org.apache.maven.model.DeploymentRepository;
+import org.apache.maven.model.DistributionManagement;
+import org.apache.maven.model.Extension;
+import org.apache.maven.model.IssueManagement;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.ModelBase;
+import org.apache.maven.model.Organization;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginContainer;
 import org.apache.maven.model.PluginExecution;
+import org.apache.maven.model.ReportPlugin;
+import org.apache.maven.model.ReportSet;
+import org.apache.maven.model.Reporting;
 import org.apache.maven.model.Repository;
 import org.apache.maven.model.RepositoryBase;
 import org.apache.maven.model.Scm;
@@ -86,6 +95,57 @@
 }
 }
 
+/*
+ * TODO: Whether the merge continues recursively into an existing node or 
not could be an option for the generated merger
+ */
+@Override
+protected void mergeModel_Organization( Model target, Model source, 
boolean sourceDominant,
+Map context )
+{
+Organization src = source.getOrganization();
+if ( source.getOrganization() != null )
+{
+Organization tgt = target.getOrganization();
+if ( tgt == null )
+{
+target.setOrganization( tgt = new Organization() );
+mergeOrganization( tgt, src, sourceDominant, context );
+}
+}
+}
+
+@Override
+protected void mergeModel_IssueManagement( Model target, Model source, 
boolean sourceDominant,
+   Map context )
+{
+IssueManagement src = source.getIssueManagement();
+if ( source.getIssueManagement() != null )
+{
+IssueManagement tgt = target.getIssueManagement();
+if ( tgt == null )
+{
+target.setIssueManagement( tgt = new IssueManagement() );
+mergeIssueManagement( tgt, src, sourceDominant, context );
+}
+}
+}
+
+@Override
+protected void mergeModel_CiManagement( Model target, Model source, 
boolean sourceDominant,
+Map context )
+{
+CiManagement src = source.getCiManagement();
+if ( source.getCiManagement() != null )
+{
+CiManagement tgt = target.getCiManagement();
+if ( tgt == null )
+{
+target.setCiManagement( tgt = new CiManagement() );
+mergeCiManagement( tgt, src, sourceDominant, context );
+}
+}
+}
+
 @Override
 protected void mergeModelBase_Modules( ModelBase target, ModelBase source, 
boolean sourceDominant,
Map context )
@@ -181,6 +241,56 @@
 }
 
 @Override
+protected void mergeDistributionManagement_Repository( 
DistributionManagement target,
+   
DistributionManagement source, boolean sourceDominant,
+   Map 
context )
+{
+DeploymentRepository src = source.getRepository();
+if ( src != null )
+{
+DeploymentRepository tgt = target.getRepository();
+if ( tgt == null )
+{
+target.setRepository( tgt = new DeploymentRepository() );
+mergeDeploymentRepository( tgt, src, sourceDominant, context );
+}
+}
+}
+
+@Override
+protected void mergeDistributionManagement_SnapshotRepository( 
DistributionM

svn commit: r773011 - /maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 14:35:17 2009
New Revision: 773011

URL: http://svn.apache.org/viewvc?rev=773011&view=rev
Log:
o Added some more toString()'s to ease debugging

Modified:
maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

Modified: maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo?rev=773011&r1=773010&r2=773011&view=diff
==
--- maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo Fri 
May  8 14:35:17 2009
@@ -2361,6 +2361,12 @@
 
 return false;
 }
+
+@Override
+public String toString()
+{
+return getId();
+}
 ]]>
   
 
@@ -2826,6 +2832,12 @@
   
 
   
 
@@ -3377,6 +3389,12 @@
 {
 return inheritanceApplied;
 }
+
+@Override
+public String toString()
+{
+return getId();
+}
 ]]>
   
 




svn commit: r773012 - /maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 14:40:47 2009
New Revision: 773012

URL: http://svn.apache.org/viewvc?rev=773012&view=rev
Log:
o Continued work on model merging

Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=773012&r1=773011&r2=773012&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 Fri May  8 14:40:47 2009
@@ -96,7 +96,8 @@
 }
 
 /*
- * TODO: Whether the merge continues recursively into an existing node or 
not could be an option for the generated merger
+ * TODO: Whether the merge continues recursively into an existing node or 
not could be an option for the generated
+ * merger
  */
 @Override
 protected void mergeModel_Organization( Model target, Model source, 
boolean sourceDominant,
@@ -241,6 +242,26 @@
 }
 
 @Override
+protected void mergeBuildBase_Resources( BuildBase target, BuildBase 
source, boolean sourceDominant,
+ Map context )
+{
+if ( sourceDominant || target.getResources().isEmpty() )
+{
+super.mergeBuildBase_Resources( target, source, sourceDominant, 
context );
+}
+}
+
+@Override
+protected void mergeBuildBase_TestResources( BuildBase target, BuildBase 
source, boolean sourceDominant,
+ Map context )
+{
+if ( sourceDominant || target.getTestResources().isEmpty() )
+{
+super.mergeBuildBase_TestResources( target, source, 
sourceDominant, context );
+}
+}
+
+@Override
 protected void mergeDistributionManagement_Repository( 
DistributionManagement target,

DistributionManagement source, boolean sourceDominant,
Map 
context )
@@ -437,6 +458,65 @@
 }
 
 @Override
+protected void mergePlugin_Executions( Plugin target, Plugin source, 
boolean sourceDominant,
+   Map context )
+{
+List src = source.getExecutions();
+if ( !src.isEmpty() )
+{
+List tgt = target.getExecutions();
+Map merged =
+new LinkedHashMap( ( src.size() + 
tgt.size() ) * 2 );
+
+for ( Iterator it = tgt.iterator(); it.hasNext(); 
)
+{
+PluginExecution element = it.next();
+Object key = getPluginExecutionKey( element );
+merged.put( key, element );
+}
+
+for ( Iterator it = src.iterator(); it.hasNext(); 
)
+{
+PluginExecution element = it.next();
+Object key = getPluginExecutionKey( element );
+PluginExecution existing = merged.get( key );
+if ( existing != null )
+{
+mergePluginExecution( existing, element, sourceDominant, 
context );
+}
+else
+{
+merged.put( key, element );
+}
+}
+
+target.setExecutions( new ArrayList( 
merged.values() ) );
+}
+}
+
+@Override
+protected void mergePluginExecution_Goals( PluginExecution target, 
PluginExecution source, boolean sourceDominant,
+   Map context )
+{
+List src = source.getGoals();
+if ( !src.isEmpty() )
+{
+List tgt = target.getGoals();
+Set excludes = new LinkedHashSet( tgt );
+List merged = new ArrayList( tgt.size() + 
src.size() );
+merged.addAll( tgt );
+for ( String s : src )
+{
+if ( !excludes.contains( s ) )
+{
+merged.add( s );
+}
+}
+target.setGoals( merged );
+}
+}
+
+@Override
 protected Object getDependencyKey( Dependency dependency )
 {
 return dependency.getManagementKey();




svn commit: r773019 - /maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 14:58:26 2009
New Revision: 773019

URL: http://svn.apache.org/viewvc?rev=773019&view=rev
Log:
o Continued work on model merging

Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=773019&r1=773018&r2=773019&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 Fri May  8 14:58:26 2009
@@ -468,26 +468,26 @@
 Map merged =
 new LinkedHashMap( ( src.size() + 
tgt.size() ) * 2 );
 
-for ( Iterator it = tgt.iterator(); it.hasNext(); 
)
+// FIXME: This needs to consider the  flag. If this is 
not detected by a UT/IT, we might want to
+// create one...
+
+for ( Iterator it = src.iterator(); it.hasNext(); 
)
 {
 PluginExecution element = it.next();
 Object key = getPluginExecutionKey( element );
 merged.put( key, element );
 }
 
-for ( Iterator it = src.iterator(); it.hasNext(); 
)
+for ( Iterator it = tgt.iterator(); it.hasNext(); 
)
 {
 PluginExecution element = it.next();
 Object key = getPluginExecutionKey( element );
 PluginExecution existing = merged.get( key );
 if ( existing != null )
 {
-mergePluginExecution( existing, element, sourceDominant, 
context );
-}
-else
-{
-merged.put( key, element );
+mergePluginExecution( element, existing, sourceDominant, 
context );
 }
+merged.put( key, element );
 }
 
 target.setExecutions( new ArrayList( 
merged.values() ) );




svn commit: r773023 - /maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 15:02:05 2009
New Revision: 773023

URL: http://svn.apache.org/viewvc?rev=773023&view=rev
Log:
o Fixed toString() to not return null

Modified:
maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

Modified: maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo?rev=773023&r1=773022&r2=773023&view=diff
==
--- maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo Fri 
May  8 15:02:05 2009
@@ -2365,7 +2365,7 @@
 @Override
 public String toString()
 {
-return getId();
+return ( getId() != null ) ? getId() : "[null]";
 }
 ]]>
   




svn commit: r773030 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 15:14:02 2009
New Revision: 773030

URL: http://svn.apache.org/viewvc?rev=773030&view=rev
Log:
o Fixed profile handling

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=773030&r1=773029&r2=773030&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Fri May  8 15:14:02 2009
@@ -224,6 +224,7 @@
 project.addCompileSourceRoot( build.getSourceDirectory() );
 project.addTestCompileSourceRoot( build.getTestSourceDirectory() );
 project.setFile( pomFile );
+project.setActiveProfiles( projectProfiles );
 
 setBuildOutputDirectoryOnParent( project );
 




svn commit: r773031 - /maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 15:19:51 2009
New Revision: 773031

URL: http://svn.apache.org/viewvc?rev=773031&view=rev
Log:
o Continued work on model merging

Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=773031&r1=773030&r2=773031&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 Fri May  8 15:19:51 2009
@@ -148,6 +148,12 @@
 }
 
 @Override
+protected void mergeModel_Profiles( Model target, Model source, boolean 
sourceDominant, Map context )
+{
+// neither inherited nor injected
+}
+
+@Override
 protected void mergeModelBase_Modules( ModelBase target, ModelBase source, 
boolean sourceDominant,
Map context )
 {




svn commit: r773047 - in /maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model: ProcessorContext.java inheritance/DefaultInheritanceAssembler.java inheritance/In

2009-05-08 Thread bentmann
Author: bentmann
Date: Fri May  8 17:00:45 2009
New Revision: 773047

URL: http://svn.apache.org/viewvc?rev=773047&view=rev
Log:
o Decoupled calculation of child path adjustment from filesystem which would 
make the effective model depend on the user's environment and breaks with our 
goal of reproducible builds

Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/InheritanceAssembler.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java?rev=773047&r1=773046&r2=773047&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 Fri May  8 17:00:45 2009
@@ -242,7 +242,7 @@
 Model previousModel = null;
 for ( Model currentModel : models )
 {
-inheritanceAssembler.assembleModelInheritance( currentModel, 
previousModel, "" );
+inheritanceAssembler.assembleModelInheritance( currentModel, 
previousModel );
 previousModel = currentModel;
 }
 if ( true )

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java?rev=773047&r1=773046&r2=773047&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
 Fri May  8 17:00:45 2009
@@ -38,11 +38,62 @@
 
 private MavenModelMerger merger = new MavenModelMerger();
 
-public void assembleModelInheritance( Model child, Model parent, String 
childPathAdjustment )
+public void assembleModelInheritance( Model child, Model parent )
 {
 Map hints = new HashMap();
-hints.put( MavenModelMerger.CHILD_PATH_ADJUSTMENT, childPathAdjustment 
);
+hints.put( MavenModelMerger.CHILD_PATH_ADJUSTMENT, 
getChildPathAdjustment( child, parent ) );
 merger.merge( child, parent, false, hints );
 }
 
+/**
+ * Calculates the relative path from the base directory of the parent to 
the parent directory of the base directory
+ * of the child. The general idea is to adjust inherited URLs to match the 
project layout (in SCM). This calculation
+ * is only a heuristic based on our conventions. In detail, the algo 
relies on the following assumptions. The parent
+ * uses aggregation and refers to the child via the modules section. The 
module path to the child is considered to
+ * point at the POM rather than its base directory if the path ends with 
".xml" (ignoring case). The name of the
+ * child's base directory matches the artifact id of the child. Note that 
for the sake of independence from the user
+ * environment, the filesystem is intentionally not used for the 
calculation.
+ * 
+ * @param child The child model, must not be null.
+ * @param parent The parent model, may be null.
+ * @return The path adjustment, can be empty but never null.
+ */
+private String getChildPathAdjustment( Model child, Model parent )
+{
+String adjustment = "";
+
+if ( parent != null )
+{
+String childArtifactId = child.getArtifactId();
+
+for ( String module : parent.getModules() )
+{
+module = module.replace( '\\', '/' );
+
+if ( module.regionMatches( true, module.length() - 4, ".xml", 
0, 4 ) )
+{
+module = module.substring( 0, module.lastIndexOf( '/' ) + 
1 );
+}
+
+String moduleName = module;
+if ( moduleName.endsWith( &q

svn commit: r773198 - /maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 10:47:59 2009
New Revision: 773198

URL: http://svn.apache.org/viewvc?rev=773198&view=rev
Log:
o Added boolean accessors for inherited field of plugin execution

Modified:
maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

Modified: maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo?rev=773198&r1=773197&r2=773198&view=diff
==
--- maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo Sat 
May  9 10:47:59 2009
@@ -2588,6 +2588,16 @@
   4.0.0
   
 

svn commit: r773212 - /maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 12:15:26 2009
New Revision: 773212

URL: http://svn.apache.org/viewvc?rev=773212&view=rev
Log:
o Fixed merging of plugin executions

Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=773212&r1=773211&r2=773212&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
 Sat May  9 12:15:26 2009
@@ -474,14 +474,14 @@
 Map merged =
 new LinkedHashMap( ( src.size() + 
tgt.size() ) * 2 );
 
-// FIXME: This needs to consider the  flag. If this is 
not detected by a UT/IT, we might want to
-// create one...
-
 for ( Iterator it = src.iterator(); it.hasNext(); 
)
 {
 PluginExecution element = it.next();
-Object key = getPluginExecutionKey( element );
-merged.put( key, element );
+if ( sourceDominant || ( source.isInherited() && 
element.isInherited() ) )
+{
+Object key = getPluginExecutionKey( element );
+merged.put( key, element );
+}
 }
 
 for ( Iterator it = tgt.iterator(); it.hasNext(); 
)




svn commit: r773213 - in /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project: DefaultMavenProjectBuilder.java artifact/MavenMetadataSource.java

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 12:17:06 2009
New Revision: 773213

URL: http://svn.apache.org/viewvc?rev=773213&view=rev
Log:
o Fixed resolution of project dependencies

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=773213&r1=773212&r2=773213&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Sat May  9 12:17:06 2009
@@ -306,7 +306,7 @@
 Artifact pomArtifact = repositorySystem.createProjectArtifact( 
project.getGroupId(), project.getArtifactId(), project.getVersion() );
 pomArtifact.setFile( pomFile );
 
-ArtifactResolutionRequest request = new 
ArtifactResolutionRequest().setArtifact( pomArtifact ).setArtifactDependencies( 
project.getDependencyArtifacts() )
+ArtifactResolutionRequest request = new 
ArtifactResolutionRequest().setArtifact( pomArtifact ).setResolveTransitively( 
true ).setArtifactDependencies( project.getDependencyArtifacts() )
 .setLocalRepository( configuration.getLocalRepository() 
).setRemoteRepostories( project.getRemoteArtifactRepositories() 
).setManagedVersionMap( project.getManagedVersionMap() );
 
 ArtifactResolutionResult result = repositorySystem.resolve( request );

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java?rev=773213&r1=773212&r2=773213&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
 Sat May  9 12:17:06 2009
@@ -65,6 +65,11 @@
 {
 Artifact pomArtifact = repositorySystem.createProjectArtifact( 
artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );
 
+if ( "pom".equals( artifact.getType() ) )
+{
+pomArtifact.setFile( artifact.getFile() );
+}
+
 Set artifacts = Collections.emptySet();
 
 ProjectBuilderConfiguration configuration = new 
DefaultProjectBuilderConfiguration();
@@ -79,7 +84,15 @@
 
 if ( !artifact.getArtifactHandler().isIncludesDependencies() )
 {
-ArtifactFilter filter = new ScopeArtifactFilter( 
artifact.getScope() ); 
+ArtifactFilter filter;
+if ( artifact.getScope() == null )
+{
+filter = null;
+}
+else
+{
+filter = new ScopeArtifactFilter( artifact.getScope() );
+}
 
 artifacts = project.createArtifacts( filter );
 




svn commit: r773219 - in /maven/components/branches/MNG-2766/maven-core/src: main/java/org/apache/maven/project/ test/java/org/apache/maven/project/inheritance/t04/ test/java/org/apache/maven/project/

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 13:02:06 2009
New Revision: 773219

URL: http://svn.apache.org/viewvc?rev=773219&view=rev
Log:
o Excluded POM artifact from dependency artifacts

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=773219&r1=773218&r2=773219&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Sat May  9 13:02:06 2009
@@ -320,6 +320,7 @@
 }
 
 project.setArtifacts( result.getArtifacts() );
+project.getArtifacts().remove( pomArtifact );
 
 return new MavenProjectBuildingResult( project, result );
 }

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java?rev=773219&r1=773218&r2=773219&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
 Sat May  9 13:02:06 2009
@@ -69,7 +69,7 @@
 Set set = project1.getArtifacts();
 assertNotNull("No artifacts", set);
 assertTrue("No Artifacts", set.size() > 0);
-assertTrue("Set size should be 4, is " + set.size(), set.size() == 4);
+assertTrue("Set size should be 3, is " + set.size(), set.size() == 3);
 
 Iterator iter = set.iterator();
 while (iter.hasNext()) {

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java?rev=773219&r1=773218&r2=773219&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java
 Sat May  9 13:02:06 2009
@@ -66,7 +66,7 @@
 assertNotNull("No artifacts", set);
 assertTrue("No Artifacts", set.size() > 0);
 Iterator iter = set.iterator();
-assertTrue("Set size should be 5, is " + set.size(), set.size() == 5);
+assertTrue("Set size should be 4, is " + set.size(), set.size() == 4);
 
 while (iter.hasNext())
 {

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java?rev=773219&r1=773218&r2=773219&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java
 Sat May  9 13:02:06 2009
@@ -67,7 +67,7 @@
 assertNotNull("No artifacts", set);
 assertTrue("No Artifacts", set.size() > 0);
 Iterator 

svn commit: r773221 - /maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 13:19:11 2009
New Revision: 773221

URL: http://svn.apache.org/viewvc?rev=773221&view=rev
Log:
o Excluded POM artifact from dependency artifacts

Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java?rev=773221&r1=773220&r2=773221&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java
 Sat May  9 13:19:11 2009
@@ -110,7 +110,7 @@
 Map map = project2.getArtifactMap();
 assertNotNull( "No artifacts", map );
 assertTrue( "No Artifacts", map.size() > 0 );
-assertTrue( "Set size should be 5, is " + map.size(), map.size() == 5 
);
+assertTrue( "Set size should be 4, is " + map.size(), map.size() == 4 
);
 
 assertTrue( "maven-test:t09-a is not in the project", map.containsKey( 
"maven-test:t09-a" ) );
 assertTrue( "maven-test:t09-b is not in the project", map.containsKey( 
"maven-test:t09-b" ) );




svn commit: r773226 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 14:48:50 2009
New Revision: 773226

URL: http://svn.apache.org/viewvc?rev=773226&view=rev
Log:
o Added some logging

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java?rev=773226&r1=773225&r2=773226&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
 Sat May  9 14:48:50 2009
@@ -42,6 +42,7 @@
 import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
+import org.codehaus.plexus.logging.Logger;
 
 /**
  * @author Jason van Zyl
@@ -60,6 +61,9 @@
 @Requirement
 private MavenProjectBuilder projectBuilder;
 
+@Requirement
+private Logger logger;
+
 public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository 
localRepository, List remoteRepositories )
 throws ArtifactMetadataRetrievalException
 {
@@ -104,6 +108,7 @@
 // When this happens we have a Maven 1.x POM, or some invalid POM. 
There is still a pile of
 // shit in the Maven 2.x repository that should have never found 
its way into the repository
 // but it did.
+logger.debug( "Failed to resolve artifact dependencies: " + 
e.getMessage() );
 }
 
 return new ResolutionGroup( pomArtifact, artifacts, remoteRepositories 
);




svn commit: r773258 - in /maven/components/branches/MNG-2766: maven-compat/src/main/java/org/apache/maven/artifact/resolver/ maven-core/src/main/java/org/apache/maven/project/artifact/ maven-core/src/

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 18:33:08 2009
New Revision: 773258

URL: http://svn.apache.org/viewvc?rev=773258&view=rev
Log:
o Fixed scope handling during transitive dependency resolution

Added:

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/ProjectClasspathTest.java

Modified: 
maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java?rev=773258&r1=773257&r2=773258&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
 Sat May  9 18:33:08 2009
@@ -382,7 +382,7 @@
 }
 catch ( ComponentLookupException e )
 {
-// Won't happen
+throw new IllegalStateException( "Failed to lookup metadata 
source implementation", e );
 }
 }
 

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java?rev=773258&r1=773257&r2=773258&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
 Sat May  9 18:33:08 2009
@@ -17,6 +17,7 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -30,10 +31,9 @@
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
 import 
org.apache.maven.artifact.repository.metadata.RepositoryMetadataResolutionException;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
+import org.apache.maven.model.Dependency;
 import org.apache.maven.project.DefaultProjectBuilderConfiguration;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectBuilder;
@@ -87,20 +87,22 @@
 project = projectBuilder.buildFromRepository( pomArtifact, 
configuration );
 
 if ( !artifact.getArtifactHandler().isIncludesDependencies() )
-{
-ArtifactFilter filter;
-if ( artifact.getScope() == null )
-{
-filter = null;
-}
-else
+{
+artifacts = new LinkedHashSet();
+
+for ( Dependency d : project.getDependencies() )
 {
-filter = new ScopeArtifactFilter( artifact.getScope() );
+String effectiveScope = getEffectiveScope( d.getScope(), 
artifact.getScope() );
+
+if ( effectiveScope != null )
+{
+Artifact dependencyArtifact =
+repositorySystem.createArtifact( d.getGroupId(), 
d.getArtifactId(), d.getVersion(),
+ effectiveScope, 
d.getType() );
+
+artifacts.add( dependencyArtifact );
+}
 }
-
-artifacts = project.createArtifacts( filter );
-
-project.setArtifacts( artifacts );
 }
 }
 catch ( ProjectBuildingException e )
@@ -114,6 +116,47 @@
 return new ResolutionGroup(

svn commit: r773283 - /maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

2009-05-09 Thread bentmann
Author: bentmann
Date: Sat May  9 22:58:36 2009
New Revision: 773283

URL: http://svn.apache.org/viewvc?rev=773283&view=rev
Log:
o Changed boolean field to String to enable both filtering and three-valued 
logic for proper merging

Modified:
maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo

Modified: maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo?rev=773283&r1=773282&r2=773283&view=diff
==
--- maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/MNG-2766/maven-model/src/main/mdo/maven.mdo Sat 
May  9 22:58:36 2009
@@ -1356,11 +1356,16 @@
 
   optional
   4.0.0
-  Indicates the dependency is optional for use of this 
library. While the
+  
+
+  
+  String
 
   
   
@@ -1382,6 +1387,16 @@
   4.0.0
   
 

svn commit: r773320 - in /maven/plugin-tools/trunk: maven-plugin-plugin/src/it/ignore-plugin-class-realm/ maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/ maven-plugin-plugin/src/it/ignore-

2009-05-10 Thread bentmann
Author: bentmann
Date: Sun May 10 10:06:36 2009
New Revision: 773320

URL: http://svn.apache.org/viewvc?rev=773320&view=rev
Log:
[MPLUGIN-150] Update to QDox 1.9.1

o Updated dependency and added IT to motivate update

Added:

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
   (with props)

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/ClassA.java
   (with props)

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml
   (with props)

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/main/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/main/java/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/main/java/test/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/src/main/java/test/ClassB.java
   (with props)

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties
   (with props)

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml
   (with props)

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml
   (with props)

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/main/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/main/java/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/main/java/test/

maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/src/main/java/test/SomeMojo.java
   (with props)
Modified:
maven/plugin-tools/trunk/maven-plugin-tools-java/pom.xml

Added: 
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml?rev=773320&view=auto
==
--- 
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
 (added)
+++ 
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
 Sun May 10 10:06:36 2009
@@ -0,0 +1,40 @@
+
+
+
+
+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/xsd/maven-4.0.0.xsd";>
+  4.0.0
+
+  
+org.apache.maven.its.plugin
+ipcr
+1.0
+
+
+  ipcr-dep-a
+  jar
+
+  Dependency A
+  
+Test that the component used to scan sources for annotations does not 
analyze classes from the plugin's own class
+realm while traversing the class hierarchy (see QDOX-148). This module 
provides a simple dependency to build up
+the class realm of interest.
+  
+

Propchange: 
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
--
svn:eol-style = native

Propchange: 
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
--
svn:keywords = Author Date Id Revision

Added: 
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/ClassA.java
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/ClassA.java?rev=773320&view=auto
==
--- 
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/src/main/java/test/ClassA.java
 (adde

svn commit: r773323 - in /maven/components/branches/MNG-2766: maven-model-builder/src/main/java/org/apache/maven/model/ maven-model-builder/src/main/java/org/apache/maven/model/management/ maven-model

2009-05-10 Thread bentmann
Author: bentmann
Date: Sun May 10 10:46:05 2009
New Revision: 773323

URL: http://svn.apache.org/viewvc?rev=773323&view=rev
Log:
o Moved injection of plugin/dependency management into isolated component and 
decoupled from processors. The new component resembles the 
ModelDefaultsInjector from 2.x but explicitly focuses on management 
information. Other defaults like the lifecycle induced plugins should be 
handled by another component.

Added:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultManagementInjector.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/ManagementInjector.java
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java

maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java?rev=773323&r1=773322&r2=773323&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 Sun May 10 10:46:05 2009
@@ -28,6 +28,8 @@
 
 import org.apache.maven.model.inheritance.DefaultInheritanceAssembler;
 import org.apache.maven.model.inheritance.InheritanceAssembler;
+import org.apache.maven.model.management.DefaultManagementInjector;
+import org.apache.maven.model.management.ManagementInjector;
 import org.apache.maven.model.processors.BuildProcessor;
 import org.apache.maven.model.processors.CiManagementProcessor;
 import org.apache.maven.model.processors.ContributorsProcessor;
@@ -288,6 +290,8 @@
p1.setArtifactId(id);
build.addPlugin(p1);
 }
+
+private static ManagementInjector managementInjector = new 
DefaultManagementInjector();
 
 public static Model processManagementNodes(Model target) 
throws IOException
@@ -296,6 +300,12 @@
 // plugin.setArtifactId("maven-compiler-plugin");
   //   target.getBuild().addPlugin(plugin);
 // Dependency Management
+managementInjector.injectManagement( target );
+if ( true )
+{
+return target;
+}
+
 DependencyManagementProcessor depProc = new 
DependencyManagementProcessor();
 if ( target.getDependencyManagement() != null )
 {

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/
--
bugtraq:label = Enter issue ID:

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/
--
bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/
--
bugtraq:number = false

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/
--
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultManagementInjector.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultManagementInjector.java?rev=773323&view=auto
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultManagementInjector.java
 (added)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultManagementInjector.java
 Sun May 10 10:46:05 2009
@@ -0,0 +1,192 @@
+package org.apache.maven.model.management;
+
+/*
+ * 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 

svn commit: r773402 - in /maven/components/branches/MNG-2766/maven-core/src: main/java/org/apache/maven/model/ main/java/org/apache/maven/model/lifecycle/ main/java/org/apache/maven/project/ test/reso

2009-05-10 Thread bentmann
Author: bentmann
Date: Sun May 10 20:36:21 2009
New Revision: 773402

URL: http://svn.apache.org/viewvc?rev=773402&view=rev
Log:
o Moved injection of default plugin executions defined by lifecycle bindings 
into dedicated component and decoupled from processors

Added:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/
   (with props)

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/
   (with props)

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/DefaultLifecycleBindingsInjector.java
   (with props)

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/LifecycleBindingsInjector.java
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/
--
bugtraq:label = Enter issue ID:

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/
--
bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/
--
bugtraq:number = false

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/
--
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/
--
bugtraq:label = Enter issue ID:

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/
--
bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/
--
bugtraq:number = false

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/
--
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/DefaultLifecycleBindingsInjector.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/DefaultLifecycleBindingsInjector.java?rev=773402&view=auto
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/DefaultLifecycleBindingsInjector.java
 (added)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/model/lifecycle/DefaultLifecycleBindingsInjector.java
 Sun May 10 20:36:21 2009
@@ -0,0 +1,118 @@
+package org.apache.maven.model.lifecycle;
+
+/*
+ * 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.
+ */
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.lifecycle.LifecycleExecutor;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.PluginContainer;
+import org.apache.maven.model.merge.MavenModelMerger;
+import org.codehaus.plexus.component.an

svn commit: r773411 - in /maven/components/branches/MNG-2766/maven-core/src: main/java/org/apache/maven/lifecycle/ main/java/org/apache/maven/project/ test/java/org/apache/maven/project/

2009-05-10 Thread bentmann
Author: bentmann
Date: Sun May 10 21:31:02 2009
New Revision: 773411

URL: http://svn.apache.org/viewvc?rev=773411&view=rev
Log:
o Tweaked API to express in-situ injection of default mojo configuration values

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=773411&r1=773410&r2=773411&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Sun May 10 21:31:02 2009
@@ -647,7 +647,7 @@
 return plugin;
 }
 
-public Set populateDefaultConfigurationForPlugins( Set 
plugins, MavenProject project, ArtifactRepository localRepository ) 
+public void populateDefaultConfigurationForPlugins( Collection 
plugins, MavenProject project, ArtifactRepository localRepository ) 
 throws LifecycleExecutionException
 {
 for( Plugin p : plugins )
@@ -661,8 +661,6 @@
 }
 }
 }
-
-return plugins;
 }
 
 public Xpp3Dom getDefaultPluginConfiguration( String groupId, String 
artifactId, String version, String goal, MavenProject project, 
ArtifactRepository localRepository ) 

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java?rev=773411&r1=773410&r2=773411&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
 Sun May 10 21:31:02 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import java.util.Collection;
 import java.util.List;
 import java.util.Set;
 
@@ -63,7 +64,7 @@
 // Given a set of {...@link org.apache.maven.Plugin} objects where the GAV 
is set we can lookup the plugin
 // descriptor and populate the default configuration.
 //
-Set populateDefaultConfigurationForPlugins( Set plugins, 
MavenProject project, ArtifactRepository localRepository )
+void populateDefaultConfigurationForPlugins( Collection plugins, 
MavenProject project, ArtifactRepository localRepository )
 throws LifecycleExecutionException;
 
 void execute( MavenSession session )

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=773411&r1=773410&r2=773411&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Sun May 10 21:31:02 2009
@@ -176,9 +176,9 @@
 // 3. POM values from per-execution configuration
 // These configuration sources are given in increasing order of 
dominance.
 
-Set processedPlugins = 
lifecycle.populateDefaultConfigurationForPlugins( pluginsFromProject, project, 
configuration.getLocalRepository() );
+lifecycle.populateDefaultConfigurationForPlugins( 
pluginsFromProject, project, configuration.getLocalRepository() );
 
-for ( Plugin buildPlugin : processedPlugins )
+for ( Plugin buildPlugin : pluginsFromProject )
 {
 Xpp3Dom dom = (Xpp3Dom) buildPlugin.getConfiguration();
 Plugin x = containsPlugin( buildPlugin, 
project.getModel().getBuild().getPlugins() );
@@ -205,7 +205,7 @@
 }
 }
 
-project.getMode

svn commit: r773422 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

2009-05-10 Thread bentmann
Author: bentmann
Date: Sun May 10 22:08:50 2009
New Revision: 773422

URL: http://svn.apache.org/viewvc?rev=773422&view=rev
Log:
o Decoupled from processor

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=773422&r1=773421&r2=773422&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Sun May 10 22:08:50 2009
@@ -20,10 +20,8 @@
 import java.io.Reader;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Properties;
-import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
@@ -46,7 +44,6 @@
 import org.apache.maven.model.interpolator.Interpolator;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.model.lifecycle.LifecycleBindingsInjector;
-import org.apache.maven.model.processors.PluginProcessor;
 import org.apache.maven.profiles.DefaultProfileManager;
 import org.apache.maven.profiles.ProfileActivationException;
 import org.apache.maven.profiles.ProfileManager;
@@ -161,14 +158,7 @@
 
 project = this.fromDomainModelToMavenProject( model, 
domainModel.getParentFile(), configuration, pomFile );
 
-Set pluginsFromProject = new LinkedHashSet();
-for ( Plugin p : project.getModel().getBuild().getPlugins() )
-{
-Plugin copy = new Plugin();
-PluginProcessor.copy2( p, copy, true );
-copy.setDependencies( p.getDependencies() );
-pluginsFromProject.add( copy );
-}
+Collection pluginsFromProject = 
project.getModel().getBuild().getPlugins();
 
 // Merge the various sources for mojo configuration:
 // 1. default values from mojo descriptor
@@ -176,35 +166,24 @@
 // 3. POM values from per-execution configuration
 // These configuration sources are given in increasing order of 
dominance.
 
-lifecycle.populateDefaultConfigurationForPlugins( 
pluginsFromProject, project, configuration.getLocalRepository() );
-
+// push plugin configuration down to executions
 for ( Plugin buildPlugin : pluginsFromProject )
 {
 Xpp3Dom dom = (Xpp3Dom) buildPlugin.getConfiguration();
-Plugin x = containsPlugin( buildPlugin, 
project.getModel().getBuild().getPlugins() );
 
-for ( PluginExecution e : buildPlugin.getExecutions() )
+if ( dom != null )
 {
-if ( dom != null )
+for ( PluginExecution e : buildPlugin.getExecutions() )
 {
-Xpp3Dom dom1 = Xpp3Dom.mergeXpp3Dom( new Xpp3Dom( dom 
), (Xpp3Dom) e.getConfiguration() );
+Xpp3Dom dom1 = Xpp3Dom.mergeXpp3Dom( (Xpp3Dom) 
e.getConfiguration(), new Xpp3Dom( dom ) );
 e.setConfiguration( dom1 );
 }
-for ( String g : e.getGoals() )
-{
-if ( x != null )
-{
-PluginExecution pe = contains( g, 
x.getExecutions() );
-if ( pe != null )
-{
-Xpp3Dom dom2 = Xpp3Dom.mergeXpp3Dom( (Xpp3Dom) 
pe.getConfiguration(), (Xpp3Dom) e.getConfiguration() );
-e.setConfiguration( dom2 );
-}
-}
-}
 }
 }
 
+// merge in default values from mojo descriptor
+lifecycle.populateDefaultConfigurationForPlugins( 
pluginsFromProject, project, configuration.getLocalRepository() );
+
 project.getModel().getBuild().setPlugins( new ArrayList( 
pluginsFromProject ) );
 }
 catch ( IOException e )
@@ -326,31 +305,6 @@
 return new MavenProjectBuildingResult( project, result );
 }
 
-private static PluginExecution contains( String goal, 
List plugins )
-{
-for ( PluginExecution pe : plugins )
-{
-if ( pe.getGoals().contains( goal ) )
-{
-return pe;
-}
-}
-   

svn commit: r773428 - in /maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model: Processor.java ProcessorContext.java processors/

2009-05-10 Thread bentmann
Author: bentmann
Date: Sun May 10 22:29:31 2009
New Revision: 773428

URL: http://svn.apache.org/viewvc?rev=773428&view=rev
Log:
o Deleted processors which have been replaced by mergers. To recap, the mergers 
operate on two instead of three models which reduces complexity. While the 
mergers are currently not overly beauty either, the plan is to have them 
generated by Modello via merge rules that would be annotated to the model 
classes/associations.

Removed:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/Processor.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/processors/
Modified:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java

Modified: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java?rev=773428&r1=773427&r2=773428&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/ProcessorContext.java
 Sun May 10 22:29:31 2009
@@ -21,7 +21,6 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -30,31 +29,8 @@
 import org.apache.maven.model.inheritance.InheritanceAssembler;
 import org.apache.maven.model.management.DefaultManagementInjector;
 import org.apache.maven.model.management.ManagementInjector;
-import org.apache.maven.model.processors.BuildProcessor;
-import org.apache.maven.model.processors.CiManagementProcessor;
-import org.apache.maven.model.processors.ContributorsProcessor;
-import org.apache.maven.model.processors.DependencyManagementProcessor;
-import org.apache.maven.model.processors.DevelopersProcessor;
-import org.apache.maven.model.processors.DistributionManagementProcessor;
-import org.apache.maven.model.processors.IssueManagementProcessor;
-import org.apache.maven.model.processors.LicensesProcessor;
-import org.apache.maven.model.processors.MailingListProcessor;
-import org.apache.maven.model.processors.ModelProcessor;
-import org.apache.maven.model.processors.ModuleProcessor;
-import org.apache.maven.model.processors.OrganizationProcessor;
-import org.apache.maven.model.processors.ParentProcessor;
-import org.apache.maven.model.processors.PluginsManagementProcessor;
-import org.apache.maven.model.processors.PrerequisitesProcessor;
-import org.apache.maven.model.processors.ProfilePropertiesProcessor;
-import org.apache.maven.model.processors.ProfilesModuleProcessor;
-import org.apache.maven.model.processors.ProfilesProcessor;
-import org.apache.maven.model.processors.PropertiesProcessor;
-import org.apache.maven.model.processors.ReportingProcessor;
-import org.apache.maven.model.processors.RepositoriesProcessor;
-import org.apache.maven.model.processors.ScmProcessor;
 import org.apache.maven.model.profile.DefaultProfileInjector;
 import org.apache.maven.model.profile.ProfileInjector;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 /*
  *  TODO: Get rid of this class and go back to an inheritance assembler, 
profile injector and default injector, all
@@ -88,15 +64,7 @@
 throw new IOException("Could not find child model");
 }
 
-List processors =
-Arrays. asList( new BuildProcessor( new 
ArrayList() ), new ModuleProcessor(),
-   new PropertiesProcessor(), new 
ParentProcessor(), new OrganizationProcessor(),
-   new MailingListProcessor(), new 
IssueManagementProcessor(),
-   new CiManagementProcessor(), new 
ReportingProcessor(),
-   new RepositoriesProcessor(), new 
DistributionManagementProcessor(),
-   new LicensesProcessor(), new 
ScmProcessor(), new PrerequisitesProcessor(),
-   new ContributorsProcessor(), new 
DevelopersProcessor(), new ProfilesProcessor() );
-Model target = processModelsForInheritance( 
convertDomainModelsToMavenModels( domainModels ), processors, false );
+Model target = processModelsForInheritance( 
convertDomainModelsToMavenModels( domainModels ) );
 if(listeners != null)
 {
for(ModelEventListener listener : listeners)
@@ -115,103 +83,22 @@
 
 public static DomainModel mergeProfilesIntoModel(Collection 
profiles, DomainModel domainModel) throws IOException
 {
-

svn commit: r773688 - /maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java

2009-05-11 Thread bentmann
Author: bentmann
Date: Mon May 11 20:53:25 2009
New Revision: 773688

URL: http://svn.apache.org/viewvc?rev=773688&view=rev
Log:
o Extended model merger

Modified:

maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java

Modified: 
maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java?rev=773688&r1=773687&r2=773688&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
 Mon May 11 20:53:25 2009
@@ -1966,7 +1966,10 @@
 mergeNotifier_Type( target, source, sourceDominant, context );
 mergeNotifier_Address( target, source, sourceDominant, context );
 mergeNotifier_Configuration( target, source, sourceDominant, context );
-// TODO
+mergeNotifier_SendOnError( target, source, sourceDominant, context );
+mergeNotifier_SendOnFailure( target, source, sourceDominant, context );
+mergeNotifier_SendOnSuccess( target, source, sourceDominant, context );
+mergeNotifier_SendOnWarning( target, source, sourceDominant, context );
 }
 
 protected void mergeNotifier_Type( Notifier target, Notifier source, 
boolean sourceDominant,
@@ -2012,6 +2015,42 @@
 target.setConfiguration( merged );
 }
 
+protected void mergeNotifier_SendOnError( Notifier target, Notifier 
source, boolean sourceDominant,
+  Map context )
+{
+if ( sourceDominant )
+{
+target.setSendOnError( source.isSendOnError() );
+}
+}
+
+protected void mergeNotifier_SendOnFailure( Notifier target, Notifier 
source, boolean sourceDominant,
+Map context )
+{
+if ( sourceDominant )
+{
+target.setSendOnFailure( source.isSendOnFailure() );
+}
+}
+
+protected void mergeNotifier_SendOnSuccess( Notifier target, Notifier 
source, boolean sourceDominant,
+Map context )
+{
+if ( sourceDominant )
+{
+target.setSendOnSuccess( source.isSendOnSuccess() );
+}
+}
+
+protected void mergeNotifier_SendOnWarning( Notifier target, Notifier 
source, boolean sourceDominant,
+Map context )
+{
+if ( sourceDominant )
+{
+target.setSendOnWarning( source.isSendOnWarning() );
+}
+}
+
 protected void mergePrerequisites( Prerequisites target, Prerequisites 
source, boolean sourceDominant,
Map context )
 {




svn commit: r773692 - in /maven/components/branches/MNG-2766: maven-core/src/main/java/org/apache/maven/project/ maven-model-builder/src/main/java/org/apache/maven/model/plugin/

2009-05-11 Thread bentmann
Author: bentmann
Date: Mon May 11 20:56:32 2009
New Revision: 773692

URL: http://svn.apache.org/viewvc?rev=773692&view=rev
Log:
o Moved expansion of plugin configuration into component

Added:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/plugin/
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/plugin/PluginConfigurationExpander.java
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=773692&r1=773691&r2=773692&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Mon May 11 20:56:32 2009
@@ -44,6 +44,7 @@
 import org.apache.maven.model.interpolator.Interpolator;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.model.lifecycle.LifecycleBindingsInjector;
+import org.apache.maven.model.plugin.PluginConfigurationExpander;
 import org.apache.maven.profiles.DefaultProfileManager;
 import org.apache.maven.profiles.ProfileActivationException;
 import org.apache.maven.profiles.ProfileManager;
@@ -88,6 +89,9 @@
 private LifecycleBindingsInjector lifecycleBindingsInjector;
 
 @Requirement
+private PluginConfigurationExpander pluginConfigurationExpander;
+
+@Requirement
 private ResolutionErrorHandler resolutionErrorHandler;
 
 @Requirement
@@ -168,34 +172,11 @@
 project = this.fromDomainModelToMavenProject( model, 
domainModel.getParentFile(), configuration, pomFile );
 
 if ( configuration.isProcessPlugins() )
-{
-Collection pluginsFromProject = 
project.getModel().getBuild().getPlugins();
-
-// Merge the various sources for mojo configuration:
-// 1. default values from mojo descriptor
-// 2. POM values from per-plugin configuration
-// 3. POM values from per-execution configuration
-// These configuration sources are given in increasing order 
of dominance.
-
-// push plugin configuration down to executions
-for ( Plugin buildPlugin : pluginsFromProject )
-{
-Xpp3Dom dom = (Xpp3Dom) buildPlugin.getConfiguration();
-
-if ( dom != null )
-{
-for ( PluginExecution e : buildPlugin.getExecutions() )
-{
-Xpp3Dom dom1 = Xpp3Dom.mergeXpp3Dom( (Xpp3Dom) 
e.getConfiguration(), new Xpp3Dom( dom ) );
-e.setConfiguration( dom1 );
-}
-}
-}
-
-// merge in default values from mojo descriptor
-lifecycle.populateDefaultConfigurationForPlugins( 
pluginsFromProject, project, configuration.getLocalRepository() );
+{
+pluginConfigurationExpander.expandPluginConfiguration( 
project.getModel() );
 
-project.getModel().getBuild().setPlugins( new 
ArrayList( pluginsFromProject ) );
+lifecycle.populateDefaultConfigurationForPlugins( 
project.getModel().getBuild().getPlugins(), project,
+  
configuration.getLocalRepository() );
 }
 }
 catch ( IOException e )

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/plugin/
--
bugtraq:label = Enter issue ID:

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/plugin/
--
bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/plugin/
--
bugtraq:number = false

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/ma

svn commit: r773856 - /maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml

2009-05-12 Thread bentmann
Author: bentmann
Date: Tue May 12 11:08:54 2009
New Revision: 773856

URL: http://svn.apache.org/viewvc?rev=773856&view=rev
Log:
o Updated test setup

Modified:

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml?rev=773856&r1=773855&r2=773856&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml
 Tue May 12 11:08:54 2009
@@ -46,6 +46,11 @@
   default
   resolutionErrorHandler
 
+
+  org.apache.maven.project.MavenProjectCache
+  default
+  projectCache
+
   
 
 




svn commit: r773869 - in /maven/components/branches/MNG-2766: maven-core/src/main/java/org/apache/maven/project/ maven-core/src/test/resources/org/apache/maven/project/ maven-model-builder/src/main/ja

2009-05-12 Thread bentmann
Author: bentmann
Date: Tue May 12 12:40:57 2009
New Revision: 773869

URL: http://svn.apache.org/viewvc?rev=773869&view=rev
Log:
o Added model normalizer for things like merging duplicate plugin declarations

Added:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultNormalizer.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/Normalizer.java
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=773869&r1=773868&r2=773869&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Tue May 12 12:40:57 2009
@@ -42,6 +42,7 @@
 import org.apache.maven.model.interpolator.Interpolator;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.model.lifecycle.LifecycleBindingsInjector;
+import org.apache.maven.model.normalization.Normalizer;
 import org.apache.maven.model.plugin.PluginConfigurationExpander;
 import org.apache.maven.profiles.DefaultProfileManager;
 import org.apache.maven.profiles.ProfileActivationException;
@@ -77,7 +78,10 @@
 private RepositorySystem repositorySystem;
 
 @Requirement
-List listeners;
+private List listeners;
+
+@Requirement
+private Normalizer normalizer;
 
 @Requirement
 private Interpolator interpolator;
@@ -390,6 +394,11 @@
 domainModels.addAll( mavenParents );
 }
 
+for ( DomainModel domain : domainModels )
+{
+normalizer.mergeDuplicates( domain.getModel() );
+}
+
 domainModels.add( new DomainModel( getSuperModel(), false ) );
 List profileModels = new ArrayList();
 //Process Profiles

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml?rev=773869&r1=773868&r2=773869&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/resources/org/apache/maven/project/ProjectClasspathTest.xml
 Tue May 12 12:40:57 2009
@@ -37,6 +37,11 @@
   interpolator
 
 
+  org.apache.maven.model.normalization.Normalizer
+  default
+  normalizer
+
+
   
org.apache.maven.model.lifecycle.LifecycleBindingsInjector
   default
   lifecycleBindingsInjector

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/
--
bugtraq:label = Enter issue ID:

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/
--
bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/
--
bugtraq:number = false

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/
--
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultNormalizer.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultNormalizer.java?rev=773869&view=auto
=

svn commit: r773870 - in /maven/components/branches/MNG-2766/maven-core/src/test: java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java resources/projects/duplicate-plugins-merged-pom.xml

2009-05-12 Thread bentmann
Author: bentmann
Date: Tue May 12 12:48:41 2009
New Revision: 773870

URL: http://svn.apache.org/viewvc?rev=773870&view=rev
Log:
o Extended UT to capture MNG-3719 as well

Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java

maven/components/branches/MNG-2766/maven-core/src/test/resources/projects/duplicate-plugins-merged-pom.xml

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java?rev=773870&r1=773869&r2=773870&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
 Tue May 12 12:48:41 2009
@@ -101,7 +101,9 @@
 File f1 = getTestFile( 
"src/test/resources/projects/duplicate-plugins-merged-pom.xml" );
 
 MavenProject project = getProject( f1 );
-assertEquals( 2, ( (Plugin) project.getBuildPlugins().get( 0 ) 
).getDependencies().size() );
+assertEquals( 2, project.getBuildPlugins().get( 0 
).getDependencies().size() );
+assertEquals( 2, project.getBuildPlugins().get( 0 
).getExecutions().size() );
+assertEquals( "first", project.getBuildPlugins().get( 0 
).getExecutions().get( 0 ).getId() );
 }
 
 

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/resources/projects/duplicate-plugins-merged-pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/resources/projects/duplicate-plugins-merged-pom.xml?rev=773870&r1=773869&r2=773870&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/resources/projects/duplicate-plugins-merged-pom.xml
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/resources/projects/duplicate-plugins-merged-pom.xml
 Tue May 12 12:48:41 2009
@@ -15,6 +15,14 @@
   1
 
   
+  
+
+  first
+  
+compile
+  
+
+  
 
 
   maven-compiler-plugin
@@ -25,6 +33,14 @@
   1
 
   
+  
+
+  second
+  
+compile
+  
+
+  
 
   
 




svn commit: r774061 - /maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java

2009-05-12 Thread bentmann
Author: bentmann
Date: Tue May 12 20:18:57 2009
New Revision: 774061

URL: http://svn.apache.org/viewvc?rev=774061&view=rev
Log:
o Updated test setup to account for changed default value

Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java?rev=774061&r1=774060&r2=774061&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
 Tue May 12 20:18:57 2009
@@ -114,6 +114,7 @@
 ProjectBuilderConfiguration configuration = new 
DefaultProjectBuilderConfiguration();
 configuration.setLocalRepository( getLocalRepository() );
 configuration.setRemoteRepositories( Arrays.asList( new 
ArtifactRepository[]{} ) ); 
+configuration.setProcessPlugins( false );
 
 try
 {




svn commit: r774057 - in /maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io: ./ DefaultModelReader.java DefaultModelWriter.java ModelReader.java ModelWrite

2009-05-12 Thread bentmann
Author: bentmann
Date: Tue May 12 20:03:31 2009
New Revision: 774057

URL: http://svn.apache.org/viewvc?rev=774057&view=rev
Log:
o Introduced components to abstract from the Modello generated XPP 
reader/writer such that we can more easily switch the underlying XML parser

Added:

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java
   (with props)

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java
   (with props)

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/
--
bugtraq:label = Enter issue ID:

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/
--
bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/
--
bugtraq:number = false

Propchange: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/
--
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java?rev=774057&view=auto
==
--- 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java
 (added)
+++ 
maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java
 Tue May 12 20:03:31 2009
@@ -0,0 +1,108 @@
+package org.apache.maven.model.io;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Map;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+/**
+ * Handles deserialization of a model from some kind of textual format like 
XML.
+ * 
+ * @author Benjamin Bentmann
+ */
+...@component( role = ModelReader.class )
+public class DefaultModelReader
+implements ModelReader
+{
+
+public Model read( File input, Map options )
+throws IOException
+{
+if ( input == null )
+{
+throw new IllegalArgumentException( "input file missing" );
+}
+
+return read( ReaderFactory.newXmlReader( input ), options );
+}
+
+public Model read( Reader input, Map options )
+throws IOException
+{
+if ( input == null )
+{
+throw new IllegalArgumentException( "input reader missing" );
+}
+
+try
+{
+MavenXpp3Reader r = new MavenXpp3Reader();
+return r.read( input, isStrict( options ) );
+}
+catch ( XmlPullParserException e )
+{
+throw (IOException) new IOException( "Failed to parse POM" 
).initCause( e );
+}
+finally
+{
+

svn commit: r774509 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java

2009-05-13 Thread bentmann
Author: bentmann
Date: Wed May 13 20:18:24 2009
New Revision: 774509

URL: http://svn.apache.org/viewvc?rev=774509&view=rev
Log:
o Restored deleted methods for backward-compat with existing plugins like 
javadoc
o Deprecated similar methods for other scopes

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java?rev=774509&r1=774508&r2=774509&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
 Wed May 13 20:18:24 2009
@@ -511,14 +511,58 @@
 }
 }
 
-/*
-System.out.println( "CLASSPATH: ");
-for( String s : list )
+return list;
+}
+
+@Deprecated
+public List getCompileArtifacts()
+{
+List list = new ArrayList( getArtifacts().size() );
+
+for ( Artifact a : getArtifacts() )
 {
-System.out.println( ">>>>> " + s );
-} 
-*/   
-
+// TODO: classpath check doesn't belong here - that's the other 
method
+if ( a.getArtifactHandler().isAddedToClasspath() )
+{
+// TODO: let the scope handler deal with this
+if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || 
Artifact.SCOPE_PROVIDED.equals( a.getScope() ) || Artifact.SCOPE_SYSTEM.equals( 
a.getScope() ) )
+{
+list.add( a );
+}
+}
+}
+return list;
+}
+
+@Deprecated
+public List getCompileDependencies()
+{
+Set artifacts = getArtifacts();
+
+if ( ( artifacts == null ) || artifacts.isEmpty() )
+{
+return Collections.emptyList();
+}
+
+List list = new ArrayList( artifacts.size() );
+
+for ( Artifact a : getArtifacts()  )
+{
+// TODO: let the scope handler deal with this
+if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || 
Artifact.SCOPE_PROVIDED.equals( a.getScope() ) || Artifact.SCOPE_SYSTEM.equals( 
a.getScope() ) )
+{
+Dependency dependency = new Dependency();
+
+dependency.setArtifactId( a.getArtifactId() );
+dependency.setGroupId( a.getGroupId() );
+dependency.setVersion( a.getVersion() );
+dependency.setScope( a.getScope() );
+dependency.setType( a.getType() );
+dependency.setClassifier( a.getClassifier() );
+
+list.add( dependency );
+}
+}
 return list;
 }
 
@@ -626,6 +670,7 @@
 return list;
 }
 
+@Deprecated
 public List getRuntimeArtifacts()
 {
 List list = new ArrayList( getArtifacts().size() );
@@ -645,6 +690,7 @@
 return list;
 }
 
+@Deprecated
 public List getRuntimeDependencies()
 {
 Set artifacts = getArtifacts();
@@ -697,6 +743,7 @@
 return list;
 }
 
+@Deprecated
 public List getSystemArtifacts()
 {
 List list = new ArrayList( getArtifacts().size() );
@@ -716,6 +763,7 @@
 return list;
 }
 
+@Deprecated
 public List getSystemDependencies()
 {
 Set artifacts = getArtifacts();




svn commit: r774522 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

2009-05-13 Thread bentmann
Author: bentmann
Date: Wed May 13 20:44:43 2009
New Revision: 774522

URL: http://svn.apache.org/viewvc?rev=774522&view=rev
Log:
o Fixed resolution of project dependencies

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=774522&r1=774521&r2=774522&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Wed May 13 20:44:43 2009
@@ -278,7 +278,10 @@
 throws ProjectBuildingException
 {
 MavenProject project = build( pomFile, configuration );
-Artifact artifact = repositorySystem.createArtifact( 
project.getGroupId(), project.getArtifactId(), project.getVersion(), 
project.getPackaging() );
+
+Artifact artifact =
+repositorySystem.createProjectArtifact( project.getGroupId(), 
project.getArtifactId(), project.getVersion() );
+artifact.setFile( pomFile );
 
 ArtifactResolutionRequest request = new ArtifactResolutionRequest()
 .setArtifact( artifact )




svn commit: r774885 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java

2009-05-14 Thread bentmann
Author: bentmann
Date: Thu May 14 19:13:45 2009
New Revision: 774885

URL: http://svn.apache.org/viewvc?rev=774885&view=rev
Log:
o Made plugin manager bail out if requested mojo can't be loaded to save 
clients from NPEs

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java?rev=774885&r1=774884&r2=774885&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
 Thu May 14 19:13:45 2009
@@ -493,13 +493,19 @@
 }
 }
 
-public MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, 
ArtifactRepository localRepository, List remoteRepositories 
)
+public MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, 
ArtifactRepository localRepository,
+ List 
remoteRepositories )
 throws PluginLoaderException
 {
 PluginDescriptor pluginDescriptor = loadPlugin( plugin, 
localRepository, remoteRepositories );
 
 MojoDescriptor mojoDescriptor = pluginDescriptor.getMojo( goal );
 
+if ( mojoDescriptor == null )
+{
+throw new PluginLoaderException( plugin, "Failed to load plugin 
mojo. Reason: Unknown mojo: " + goal );
+}
+
 return mojoDescriptor;
 }
 




svn commit: r774886 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

2009-05-14 Thread bentmann
Author: bentmann
Date: Thu May 14 19:14:25 2009
New Revision: 774886

URL: http://svn.apache.org/viewvc?rev=774886&view=rev
Log:
o Fixed parsing of lifecycle mappings

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=774886&r1=774885&r2=774886&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Thu May 14 19:14:25 2009
@@ -609,51 +609,58 @@
 
 // These are of the form:
 //
-// org.apache.maven.plugins:maven-compiler-plugin:compile
+// compile -> 
org.apache.maven.plugins:maven-compiler-plugin:compile[,gid:aid:goal,...]
 //
-parseLifecyclePhaseDefinitions( plugins, 
lifecyclePhasesForPackaging.values() );
+for ( Map.Entry goalsForLifecyclePhase : 
lifecyclePhasesForPackaging.entrySet() )
+{
+String phase = goalsForLifecyclePhase.getKey();
+String goals = goalsForLifecyclePhase.getValue();
+parseLifecyclePhaseDefinitions( plugins, phase, goals );
+}
 }
 else if ( lifecycle.getDefaultPhases() != null )
 {
-parseLifecyclePhaseDefinitions( plugins, 
lifecycle.getDefaultPhases() );
+for ( String goals : lifecycle.getDefaultPhases() )
+{
+parseLifecyclePhaseDefinitions( plugins, null, goals );
+}
 }
 }
 
 return plugins.keySet();
 }
 
-private void parseLifecyclePhaseDefinitions( Map plugins,
- Collection 
lifecyclePhaseDefinitions )
+private void parseLifecyclePhaseDefinitions( Map plugins, 
String phase, String goals )
 {
-for ( String lifecyclePhaseDefinition : lifecyclePhaseDefinitions )
+for ( StringTokenizer tok = new StringTokenizer( goals, "," ); 
tok.hasMoreTokens(); )
 {
-Plugin plugin = 
populatePluginWithInformationSpecifiedInLifecyclePhaseDefinition( 
lifecyclePhaseDefinition );
+String goal = tok.nextToken().trim();
+String[] p = StringUtils.split( goal, ":" );
+
+PluginExecution execution = new PluginExecution();
+// FIXME: Find a better execution id
+execution.setId( "default-" + p[2] );
+execution.setPhase( phase );
+execution.getGoals().add( p[2] );
+
+Plugin plugin = new Plugin();
+plugin.setGroupId( p[0] );
+plugin.setArtifactId( p[1] );
+
 Plugin existing = plugins.get( plugin );
 if ( existing != null )
 {
-existing.getExecutions().addAll( plugin.getExecutions() );
+plugin = existing;
 }
 else
 {
 plugins.put( plugin, plugin );
 }
+
+plugin.getExecutions().add( execution );
 }
 }
 
-private Plugin 
populatePluginWithInformationSpecifiedInLifecyclePhaseDefinition( String 
lifecyclePhaseDefinition )
-{
-String[] p = StringUtils.split( lifecyclePhaseDefinition, ":" );
-Plugin plugin = new Plugin();
-plugin.setGroupId( p[0] );
-plugin.setArtifactId( p[1] );
-PluginExecution execution = new PluginExecution();
-// FIXME: Find a better execution id
-execution.setId( "default-" + p[2] );
-execution.setGoals( new ArrayList( Arrays.asList( new String[] 
{ p[2] } ) ) );
-plugin.setExecutions( new ArrayList( Arrays.asList( 
new PluginExecution[] { execution } ) ) );
-return plugin;
-}
-
 public void populateDefaultConfigurationForPlugins( Collection 
plugins, MavenProject project, ArtifactRepository localRepository ) 
 throws LifecycleExecutionException
 {
@@ -682,26 +689,30 @@
 }
 
 
-public Xpp3Dom convert( MojoDescriptor mojoDescriptor  )
-{
+Xpp3Dom convert( MojoDescriptor mojoDescriptor  )
+{
 Xpp3Dom dom = new Xpp3Dom( "configuration" );
 
 PlexusConfiguration c = mojoDescriptor.getMojoConfiguration();
-
+
 PlexusConfiguratio

svn commit: r774925 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

2009-05-14 Thread bentmann
Author: bentmann
Date: Thu May 14 21:02:10 2009
New Revision: 774925

URL: http://svn.apache.org/viewvc?rev=774925&view=rev
Log:
o Restored basedir alignment

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java?rev=774925&r1=774924&r2=774925&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
 Thu May 14 21:02:10 2009
@@ -344,6 +344,26 @@
 
 public File alignToBaseDirectory( File file )
 {
+// TODO: Copied from the DefaultInterpolator. We likely want to 
resurrect the PathTranslator or at least a
+// similar component for re-usage
+if ( file != null )
+{
+if ( file.isAbsolute() )
+{
+// path was already absolute, just normalize file separator 
and we're done
+}
+else if ( file.getPath().startsWith( File.separator ) )
+{
+// drive-relative Windows path, don't align with project 
directory but with drive root
+file = file.getAbsoluteFile();
+}
+else
+{
+// an ordinary relative path, align with project directory
+file = new File( new File( basedir, file.getPath() 
).toURI().normalize() ).getAbsoluteFile();
+}
+}
 return file;
 }
+
 }




svn commit: r775290 - in /maven/components/branches/MNG-2766: maven-core/src/main/java/org/apache/maven/project/ maven-embedder/src/test/java/org/apache/maven/embedder/

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 19:17:32 2009
New Revision: 775290

URL: http://svn.apache.org/viewvc?rev=775290&view=rev
Log:
o Added clear() method to project cache
o Added license headers

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectCache.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProjectCache.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java

maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectCache.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectCache.java?rev=775290&r1=775289&r2=775290&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectCache.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectCache.java
 Fri May 15 19:17:32 2009
@@ -1,5 +1,24 @@
 package org.apache.maven.project;
 
+/*
+ * 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.
+ */
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -20,7 +39,12 @@
 {
 projectCache.put( key, project );
 }
-
+
+public void clear()
+{
+projectCache.clear();
+}
+
 public int size()
 {
 return projectCache.size();

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProjectCache.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProjectCache.java?rev=775290&r1=775289&r2=775290&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProjectCache.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProjectCache.java
 Fri May 15 19:17:32 2009
@@ -1,10 +1,36 @@
 package org.apache.maven.project;
 
+/*
+ * 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.
+ */
+
 public interface MavenProjectCache
 {
-MavenProject get( String absolutePath );
 
-void put( String absolutePath, MavenProject project );
-
+MavenProject get( String key );
+
+void put( String key, MavenProject project );
+
+/**
+ * Clears the cache.
+ */
+void clear();
+
 int size();
+
 }

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java?rev=775290&r1=775289&r2=775290&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java
 (origi

svn commit: r775297 - /maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 19:32:26 2009
New Revision: 775297

URL: http://svn.apache.org/viewvc?rev=775297&view=rev
Log:
o Fixed test assertion (there's really just one dependency without transitive 
ones in the test POM)

Modified:

maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

Modified: 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java?rev=775297&r1=775296&r2=775297&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 Fri May 15 19:32:26 2009
@@ -383,7 +383,7 @@
 
 Set artifacts = result.getProject().getArtifacts();
 
-assertEquals( 2, artifacts.size() );
+assertEquals( 1, artifacts.size() );
 
 artifacts.iterator().next();
 }




svn commit: r775303 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 19:51:27 2009
New Revision: 775303

URL: http://svn.apache.org/viewvc?rev=775303&view=rev
Log:
o Saved clients from NPEs

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java?rev=775303&r1=775302&r2=775303&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
 Fri May 15 19:51:27 2009
@@ -179,6 +179,11 @@
 
 public Properties getProperties()
 {
+if ( properties == null )
+{
+properties = new Properties();
+}
+
 return properties;
 }
 




svn commit: r775304 - /maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 19:58:57 2009
New Revision: 775304

URL: http://svn.apache.org/viewvc?rev=775304&view=rev
Log:
o Allowed gargabe collector to free heap

Modified:

maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

Modified: 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java?rev=775304&r1=775303&r2=775304&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 Fri May 15 19:58:57 2009
@@ -85,6 +85,7 @@
 throws Exception
 {
 mavenEmbedder.stop();
+mavenEmbedder = null;
 }
 
 protected void assertNoExceptions( MavenExecutionResult result )




svn commit: r775307 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 20:13:08 2009
New Revision: 775307

URL: http://svn.apache.org/viewvc?rev=775307&view=rev
Log:
o Made project cache sensitive to file modifications

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=775307&r1=775306&r2=775307&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Fri May 15 20:13:08 2009
@@ -107,7 +107,9 @@
 public MavenProject build( File pomFile, ProjectBuilderConfiguration 
configuration )
 throws ProjectBuildingException
 {
-MavenProject project = projectCache.get( pomFile.getAbsolutePath() );
+String cacheKey = getCacheKey( pomFile, configuration );
+
+MavenProject project = projectCache.get( cacheKey );
 
 if ( project != null )
 {
@@ -211,11 +213,19 @@
 project.setFile( pomFile );
 project.setActiveProfiles( projectProfiles );
 
-projectCache.put( pomFile.getAbsolutePath(), project );
+projectCache.put( cacheKey, project );
 
 return project;
 }
 
+private String getCacheKey( File pomFile, ProjectBuilderConfiguration 
configuration )
+{
+StringBuilder buffer = new StringBuilder( 256 );
+buffer.append( pomFile.getAbsolutePath() );
+buffer.append( '/' ).append( pomFile.lastModified() );
+return buffer.toString();
+}
+
 public MavenProject buildFromRepository( Artifact artifact, 
ProjectBuilderConfiguration configuration )
 throws ProjectBuildingException
 {




svn commit: r775311 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 20:20:32 2009
New Revision: 775311

URL: http://svn.apache.org/viewvc?rev=775311&view=rev
Log:
o Added toString() to ease debugging

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java?rev=775311&r1=775310&r2=775311&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java
 Fri May 15 20:20:32 2009
@@ -102,4 +102,17 @@
 {
 this.lifecyclePhase = lifecyclePhase;
 }
+
+@Override
+public String toString()
+{
+StringBuilder buffer = new StringBuilder( 128 );
+if ( mojoDescriptor != null )
+{
+buffer.append( mojoDescriptor.getId() );
+}
+buffer.append( " {execution: " ).append( executionId ).append( "}" );
+return buffer.toString();
+}
+
 }




svn commit: r775350 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 21:26:55 2009
New Revision: 775350

URL: http://svn.apache.org/viewvc?rev=775350&view=rev
Log:
o Fixed resolution of project dependencies (regardless whether we want to 
resolve the root, the metadata source needs to resolve the root's POM so we 
better point it at the one we're interested in)

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=775350&r1=775349&r2=775350&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Fri May 15 21:26:55 2009
@@ -970,7 +970,9 @@
 {
 MavenProject project = session.getCurrentProject();
 
-Artifact artifact = repositorySystem.createArtifact( 
project.getGroupId(), project.getArtifactId(), project.getVersion(), null, 
project.getPackaging() );  
+Artifact artifact =
+repositorySystem.createProjectArtifact( project.getGroupId(), 
project.getArtifactId(), project.getVersion() );
+artifact.setFile( project.getFile() );
 
 ArtifactFilter filter = new ScopeArtifactFilter( scope );
 




svn commit: r775363 - in /maven/components/branches/MNG-2766: maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderBehaviorTest.java maven-repository/src/main/java/org/apache/maven/repo

2009-05-15 Thread bentmann
Author: bentmann
Date: Fri May 15 21:52:10 2009
New Revision: 775363

URL: http://svn.apache.org/viewvc?rev=775363&view=rev
Log:
o Fixed file:// URL handling

Modified:

maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderBehaviorTest.java

maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java

Modified: 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderBehaviorTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderBehaviorTest.java?rev=775363&r1=775362&r2=775363&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderBehaviorTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderBehaviorTest.java
 Fri May 15 21:52:10 2009
@@ -42,8 +42,8 @@
 
 MavenEmbedder maven = new MavenEmbedder( configuration );
 
-String expectedPath = ( new File( "/global/maven/local-repository" ) 
).getCanonicalPath();
-String actualPath = maven.getLocalRepository().getBasedir();
+File expectedPath = new File( "/global/maven/local-repository" 
).getCanonicalFile();
+File actualPath = new File( maven.getLocalRepository().getBasedir() );
 assertEquals( expectedPath, actualPath );
 
 maven.stop();

Modified: 
maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java?rev=775363&r1=775362&r2=775363&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java
 Fri May 15 21:52:10 2009
@@ -191,18 +191,11 @@
 public ArtifactRepository createLocalRepository( File localRepository )
 throws InvalidRepositoryException
 {
-try
-{
-return createRepository( 
localRepository.toURI().toURL().toString(),
- RepositorySystem.DEFAULT_LOCAL_REPO_ID, 
true,
- 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, true,
- 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
- 
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
-}
-catch ( MalformedURLException e )
-{
-throw new InvalidRepositoryException( "Error creating local 
repository.", RepositorySystem.DEFAULT_LOCAL_REPO_ID, e );
-}
+return createRepository( "file://" + 
localRepository.toURI().getRawPath(),
+ RepositorySystem.DEFAULT_LOCAL_REPO_ID, true,
+ 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, true,
+ ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
+ 
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
 }
 
 public ArtifactRepository createDefaultRemoteRepository()




svn commit: r775488 - /maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

2009-05-16 Thread bentmann
Author: bentmann
Date: Sat May 16 15:56:03 2009
New Revision: 775488

URL: http://svn.apache.org/viewvc?rev=775488&view=rev
Log:
o Re-enabled fixed tests

Modified:

maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

Modified: 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java?rev=775488&r1=775487&r2=775488&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 Sat May 16 15:56:03 2009
@@ -389,7 +389,6 @@
 artifacts.iterator().next();
 }
 
-/**TODO - FIX
 public void testProjectReading_FromChildLevel_ScmInheritanceCalculations()
 throws Exception
 {
@@ -397,11 +396,11 @@
 
 MavenProject project = mavenEmbedder.readProject( pomFile );
 assertNotNull(project.getScm());
-assertEquals( "http://host/viewer?path=/trunk/parent/child1";, 
project.getScm().getUrl() );
-assertEquals( "scm:svn:http://host/trunk/parent/child1";, 
project.getScm().getConnection() );
-assertEquals( "scm:svn:https://host/trunk/parent/child1";, 
project.getScm().getDeveloperConnection() );
+assertEquals( "http://host/viewer?path=/trunk/parent/modules/child1";, 
project.getScm().getUrl() );
+assertEquals( "scm:svn:http://host/trunk/parent/modules/child1";, 
project.getScm().getConnection() );
+assertEquals( "scm:svn:https://host/trunk/parent/modules/child1";, 
project.getScm().getDeveloperConnection() );
 }
-*/
+
 public void testProjectReading_SkipMissingModuleSilently()
 throws Exception
 {
@@ -411,19 +410,18 @@
 mavenEmbedder.readProject( pomFile );
 }
 
-/*
 public void testProjectReadingWithDistributionStatus()
 throws Exception
 {
 File pom = new File( basedir, 
"src/test/resources/pom-with-distribution-status.xml" );
 MavenExecutionRequest request = new 
DefaultMavenExecutionRequest().setShowErrors( true )
-.setPomFile( pom.getAbsolutePath() );
+.setPom( pom );
 
-MavenProject project = maven.readProject( pom );
+MavenProject project = mavenEmbedder.readProject( pom );
 
 assertEquals( "deployed", 
project.getDistributionManagement().getStatus() );
 
-MavenExecutionResult result = maven.readProjectWithDependencies( 
request );
+MavenExecutionResult result = 
mavenEmbedder.readProjectWithDependencies( request );
 
 assertNoExceptions( result );
 
@@ -431,7 +429,6 @@
 
 assertEquals( "deployed", 
result.getProject().getDistributionManagement().getStatus() );
 }
-*/
 
 // 

 // Model Writing




svn commit: r775506 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-1088/ resources/mng-1088/client/ resources/mng-1088/plugin/ resources/mng

2009-05-16 Thread bentmann
Author: bentmann
Date: Sat May 16 18:37:16 2009
New Revision: 775506

URL: http://svn.apache.org/viewvc?rev=775506&view=rev
Log:
o Fixed IT to test original issue and decoupled from production plugins

Added:

maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1088ReactorPluginResolutionTest.java
  - copied, changed from r772093, 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1088ReactorDepResolutionTest.java

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/client/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/client/pom.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/pom.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/java/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/java/org/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/java/org/apache/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/java/org/apache/maven/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/java/org/apache/maven/plugin/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/java/org/apache/maven/plugin/coreit/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/plugin/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/maven-metadata.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/p/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/p/0.1-SNAPSHOT/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/p/0.1-SNAPSHOT/maven-metadata.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/p/0.1-SNAPSHOT/p-0.1-SNAPSHOT.jar
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/p/0.1-SNAPSHOT/p-0.1-SNAPSHOT.pom

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/repo/org/apache/maven/its/mng1088/p/maven-metadata.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/settings-template.xml
   (with props)
Removed:

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

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/test-component-c/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-1088/test-plugin/
Modified:

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

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=775506&r1=775505&r2=775506&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org

svn commit: r775510 - /maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/

2009-05-16 Thread bentmann
Author: bentmann
Date: Sat May 16 19:18:23 2009
New Revision: 775510

URL: http://svn.apache.org/viewvc?rev=775510&view=rev
Log:
o Decoupled ITs from production plugins

Modified:

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

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

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1491ReactorArtifactIdCollisionTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1491ReactorArtifactIdCollisionTest.java?rev=775510&r1=775509&r2=775510&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1491ReactorArtifactIdCollisionTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1491ReactorArtifactIdCollisionTest.java
 Sat May 16 19:18:23 2009
@@ -28,19 +28,19 @@
 public class MavenITmng1491ReactorArtifactIdCollisionTest
 extends AbstractMavenIntegrationTestCase
 {
+
 public MavenITmng1491ReactorArtifactIdCollisionTest()
 {
 super( ALL_MAVEN_VERSIONS );
 }
 
-public void testitMNG1491 ()
+public void testitMNG1491()
 throws Exception
 {
 File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-1491" );
 
-Verifier verifier;
-
-verifier = new Verifier( testDir.getAbsolutePath() );
+Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+verifier.setAutoclean( false );
 
 try
 {
@@ -55,4 +55,5 @@
 // expected.
 }
 }
+
 }

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1995InterpolateBooleanModelElementsTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1995InterpolateBooleanModelElementsTest.java?rev=775510&r1=775509&r2=775510&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1995InterpolateBooleanModelElementsTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1995InterpolateBooleanModelElementsTest.java
 Sat May 16 19:18:23 2009
@@ -49,6 +49,7 @@
 File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-1995" );
 
 Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+verifier.setAutoclean( false );
 
 verifier.executeGoal( "validate" );
 verifier.verifyErrorFreeLog();

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2739RequiredRepositoryElementsTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2739RequiredRepositoryElementsTest.java?rev=775510&r1=775509&r2=775510&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2739RequiredRepositoryElementsTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2739RequiredRepositoryElementsTest.java
 Sat May 16 19:18:23 2009
@@ -52,6 +52,7 @@
 Verifier verifier;
 
 verifier = new Verifier( testDir.getAbsolutePath() );
+verifier.setAutoclean( false );
 
 try
 {
@@ -92,6 +93,7 @@
 Verifier verifier;
 
 verifier = new Verifier( testDir.getAbsolutePath() );
+verifier.setAutoclean( false );
 
 try
 {




svn commit: r775513 - in /maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it: MavenITmng1999DefaultReportsInheritanceTest.java MavenITmng2878DefaultReportXmlImportTes

2009-05-16 Thread bentmann
Author: bentmann
Date: Sat May 16 19:23:50 2009
New Revision: 775513

URL: http://svn.apache.org/viewvc?rev=775513&view=rev
Log:
o Excluded reporting related ITs for 3.x as per MNG-4162

Modified:

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

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

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1999DefaultReportsInheritanceTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1999DefaultReportsInheritanceTest.java?rev=775513&r1=775512&r2=775513&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1999DefaultReportsInheritanceTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1999DefaultReportsInheritanceTest.java
 Sat May 16 19:23:50 2009
@@ -37,7 +37,8 @@
 
 public MavenITmng1999DefaultReportsInheritanceTest()
 {
-super( "(2.0.9,2.1.0-M1),(2.1.0-M1,)" ); // 2.0.10+, excluding 2.1.0-M1
+// reporting not supported by Maven 3.x core as per MNG-4162
+super( "(2.0.9,2.1.0-M1),(2.1.0-M1,3.0-alpha-1)" ); // 2.0.10+, 
excluding 2.1.0-M1
 }
 
 /**

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2878DefaultReportXmlImportTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2878DefaultReportXmlImportTest.java?rev=775513&r1=775512&r2=775513&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2878DefaultReportXmlImportTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2878DefaultReportXmlImportTest.java
 Sat May 16 19:23:50 2009
@@ -36,7 +36,8 @@
 {
 public MavenITmng2878DefaultReportXmlImportTest()
 {
-super( ALL_MAVEN_VERSIONS );
+// reporting is not supported in 3.x core (see MNG-4162)
+super( "(,3.0-alpha-1)" );
 }
 
 /**

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3271DefaultReportsSuppressionTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3271DefaultReportsSuppressionTest.java?rev=775513&r1=775512&r2=775513&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3271DefaultReportsSuppressionTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3271DefaultReportsSuppressionTest.java
 Sat May 16 19:23:50 2009
@@ -37,7 +37,8 @@
 
 public MavenITmng3271DefaultReportsSuppressionTest()
 {
-super( "(2.0.9,2.1.0-M1),(2.1.0-M1,)" );
+// reporting is not supported in 3.x core (see MNG-4162)
+super( "(2.0.9,2.1.0-M1),(2.1.0-M1,3.0-alpha-1)" );
 }
 
 /**




svn commit: r775514 - /maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/

2009-05-16 Thread bentmann
Author: bentmann
Date: Sat May 16 19:28:48 2009
New Revision: 775514

URL: http://svn.apache.org/viewvc?rev=775514&view=rev
Log:
o Freed heap memory

Modified:

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

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

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

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

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java?rev=775514&r1=775513&r2=775514&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java
 Sat May 16 19:28:48 2009
@@ -89,8 +89,16 @@
 {
 super.tearDown();
 
-server.stop();
-proxyServer.stop();
+if ( server != null )
+{
+server.stop();
+server = null;
+}
+if ( proxyServer != null )
+{
+proxyServer.stop();
+proxyServer = null;
+}
 }
 
 /**

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java?rev=775514&r1=775513&r2=775514&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java
 Sat May 16 19:28:48 2009
@@ -130,6 +130,7 @@
 if ( server != null )
 {
 server.stop();
+server = null;
 }
 }
 

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java?rev=775514&r1=775513&r2=775514&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
 Sat May 16 19:28:48 2009
@@ -85,7 +85,11 @@
 {
 super.tearDown();
 
-server.stop();
+if ( server != null)
+{
+server.stop();
+server = null;
+}
 }
 
 /**

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3953AuthenticatedDeploymentTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3953AuthenticatedDeploymentTest.java?rev=775514&r1=775513&r2=775514&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3953AuthenticatedDeploymentTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3953AuthenticatedDeploymentTest.java
 Sat May 16 19:28:48 2009
@@ -121,6 +121,7 @@
 if ( server != null )
 {
 server.stop();
+server = null;
 }
 
 super.tearDown();

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4068AuthenticatedMirrorTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4068AuthenticatedMirr

svn commit: r775626 - in /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven: execution/DefaultMavenExecutionRequest.java project/MavenProject.java

2009-05-17 Thread bentmann
Author: bentmann
Date: Sun May 17 11:13:32 2009
New Revision: 775626

URL: http://svn.apache.org/viewvc?rev=775626&view=rev
Log:
o Fixed injection of repos from settings.xml

Modified:

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java

maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java?rev=775626&r1=775625&r2=775626&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
 Sun May 17 11:13:32 2009
@@ -680,7 +680,19 @@
 
 public MavenExecutionRequest addProfile( Profile profile )
 {
-// TODO Auto-generated method stub
-return null;
+if ( profile == null )
+{
+throw new IllegalArgumentException( "profile missing" );
+}
+
+if ( profiles == null )
+{
+profiles = new ArrayList();
+}
+
+profiles.add( profile );
+
+return this;
 }
+
 }

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java?rev=775626&r1=775625&r2=775626&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
 Sun May 17 11:13:32 2009
@@ -231,24 +231,35 @@
 this.repositorySystem = repositorySystem;
 originalModel = model;
 
-setRemoteArtifactRepositories( 
(projectBuilderConfiguration.getRemoteRepositories() != null) ? new 
ArrayList(projectBuilderConfiguration.getRemoteRepositories())
 : new ArrayList());
- 
-for(Repository r: model.getPluginRepositories())
-   {
-   try {
-   
remoteArtifactRepositories.add(repositorySystem.buildArtifactRepository( r ));
-   } catch (InvalidRepositoryException e) {
-
-   }
-   }   
-for(Repository r: model.getPluginRepositories())
-   {
-   try {
-   
remoteArtifactRepositories.add(repositorySystem.buildArtifactRepository( r ));
-   } catch (InvalidRepositoryException e) {
+remoteArtifactRepositories = new ArrayList();
 
-   }
-   }
+for ( Repository r : model.getRepositories() )
+{
+try
+{
+remoteArtifactRepositories.add( 
repositorySystem.buildArtifactRepository( r ) );
+}
+catch ( InvalidRepositoryException e )
+{
+
+}
+}
+for ( Repository r : model.getPluginRepositories() )
+{
+try
+{
+remoteArtifactRepositories.add( 
repositorySystem.buildArtifactRepository( r ) );
+}
+catch ( InvalidRepositoryException e )
+{
+
+}
+}
+
+if ( projectBuilderConfiguration.getRemoteRepositories() != null )
+{
+remoteArtifactRepositories.addAll( 
projectBuilderConfiguration.getRemoteRepositories() );
+}
 }
 
 // TODO: Find a way to use  here...it's tricky, because the 
moduleProject




svn commit: r775663 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/it0139/ resources/mng-3052/ resources/mng-3052/bar/ resources/mng-3052/foo/ r

2009-05-17 Thread bentmann
Author: bentmann
Date: Sun May 17 14:30:16 2009
New Revision: 775663

URL: http://svn.apache.org/viewvc?rev=775663&view=rev
Log:
o Decoupled ITs from production plugins

Added:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/pom-template.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/mng3052/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/mng3052/direct/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/mng3052/direct/0.1-SNAPSHOT/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/mng3052/direct/0.1-SNAPSHOT/direct-0.1-20090517.133956-1.jar
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/mng3052/direct/0.1-SNAPSHOT/maven-metadata.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/mng3052/direct/0.1-SNAPSHOT/template.pom

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-d/org/apache/maven/its/mng3052/direct/maven-metadata.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/mng3052/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/mng3052/trans/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/mng3052/trans/0.1-SNAPSHOT/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/mng3052/trans/0.1-SNAPSHOT/maven-metadata.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/mng3052/trans/0.1-SNAPSHOT/trans-0.1-20090517.132833-1.jar
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/mng3052/trans/0.1-SNAPSHOT/trans-0.1-20090517.132833-1.pom

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/repo-t/org/apache/maven/its/mng3052/trans/maven-metadata.xml
   (with props)
Removed:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/bar/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/foo/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3052/wombat/
Modified:

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

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

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

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0139Test.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0139Test.java?rev=775663&r1=775662&r2=775663&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0139Test.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0139Test.java
 Sun May 17 14:30:16 2009
@@ -48,6 +48,8 @@
 File child = new File( testDir, "child" );
 
 Verifier verifier = new Verif

svn commit: r775666 - in /maven/components/branches/MNG-2766/maven-embedder/src/test: java/org/apache/maven/embedder/project/MavenEmbedderProjectNotInRepositoryTest.java projects/no-artifact-in-reposi

2009-05-17 Thread bentmann
Author: bentmann
Date: Sun May 17 14:55:44 2009
New Revision: 775666

URL: http://svn.apache.org/viewvc?rev=775666&view=rev
Log:
o Deleted test which is invalid due to r772675

Removed:

maven/components/branches/MNG-2766/maven-embedder/src/test/java/org/apache/maven/embedder/project/MavenEmbedderProjectNotInRepositoryTest.java

maven/components/branches/MNG-2766/maven-embedder/src/test/projects/no-artifact-in-repository-test/



svn commit: r775699 - in /maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit: AbstractRepoMojo.java DeployMojo.j

2009-05-17 Thread bentmann
Author: bentmann
Date: Sun May 17 16:31:47 2009
New Revision: 775699

URL: http://svn.apache.org/viewvc?rev=775699&view=rev
Log:
o Extended IT plugin to support installation/deployment of POM projects

Added:

maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java
   (with props)
Modified:

maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java

maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java

Added: 
maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java?rev=775699&view=auto
==
--- 
maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java
 Sun May 17 16:31:47 2009
@@ -0,0 +1,89 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.plugin.AbstractMojo;
+
+import java.io.File;
+import java.util.Collection;
+
+/**
+ * Provides common code for the install and deploy mojos.
+ * 
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public abstract class AbstractRepoMojo
+extends AbstractMojo
+{
+
+/**
+ * The project's main artifact.
+ * 
+ * @parameter default-value="${project.artifact}"
+ * @readonly
+ * @required
+ */
+protected Artifact mainArtifact;
+
+/**
+ * The project's attached artifact.
+ * 
+ * @parameter default-value="${project.attachedArtifacts}"
+ * @readonly
+ * @required
+ */
+protected Collection attachedArtifacts;
+
+/**
+ * The packaging of the project.
+ * 
+ * @parameter default-value="${project.packaging}"
+ * @required
+ * @readonly
+ */
+protected String packaging;
+
+/**
+ * The POM file of the project.
+ * 
+ * @parameter default-value="${project.file}"
+ * @required
+ * @readonly
+ */
+protected File pomFile;
+
+/**
+ * The local repository.
+ * 
+ * @parameter default-value="${localRepository}"
+ * @readonly
+ * @required
+ */
+protected ArtifactRepository localRepository;
+
+protected boolean isPomArtifact()
+{
+return "pom".equals( packaging );
+}
+
+}

Propchange: 
maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java
--
svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java
--
svn:keywords = Author Date Id Revision

Modified: 
maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java?rev=775699&r1=775698&r2=

svn commit: r775704 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-3057/ resources/mng-3057/level2/ resources/mng-3057/level2/level3/ resour

2009-05-17 Thread bentmann
Author: bentmann
Date: Sun May 17 16:40:29 2009
New Revision: 775704

URL: http://svn.apache.org/viewvc?rev=775704&view=rev
Log:
o Decoupled IT from production plugins

Added:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/artifact.jar
   (with props)
Removed:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/src/
Modified:

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

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

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

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

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java?rev=775704&r1=775703&r2=775704&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3057VersionExprTransformationsTest.java
 Sun May 17 16:40:29 2009
@@ -60,6 +60,10 @@
 File remoteRepo = new File( testDir, "target/deployment" );
 
 Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+verifier.setAutoclean( false );
+verifier.deleteDirectory( "target" );
+verifier.deleteDirectory( "level2/target" );
+verifier.deleteDirectory( "level2/level3/target" );
 verifier.deleteArtifacts( "org.apache.maven.its.mng3057" );
 
 Properties properties = verifier.newDefaultFilterProperties();
@@ -78,7 +82,7 @@
 //envars.put( "MAVEN_OPTS", "-Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,server=y,address=5005 -Djava.compiler=NONE" );
 //verifier.executeGoal( "deploy", envars );
 
-verifier.executeGoal( "deploy" );
+verifier.executeGoal( "generate-sources" );
 verifier.verifyErrorFreeLog();
 verifier.resetStreams();
 
@@ -107,4 +111,5 @@
 assertNull( parent );
 }
 }
+
 }

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/artifact.jar
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/artifact.jar?rev=775704&view=auto
==
Binary file - no diff available.

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/artifact.jar
--
svn:mime-type = application/octet-stream

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/pom.xml?rev=775704&r1=775703&r2=775704&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/pom.xml
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3057/level2/level3/pom.xml
 Sun May 17 16:40:29 2009
@@ -1,21 +1,36 @@
 
-http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd"; 
xmlns="http://maven.apache.org/POM/4.0.0";
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd"; 
xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   4.0.0
+
   
-level2
 org.apache.maven.its.mng3057
+level2
 ${testVersion}
   
+
   level3
   ${testVersion}
 
-  
-
-  junit
-  junit
-  3.8.1
-  test
-
-  
+  
+
+  
+org.apache.maven.its.plugins
+maven-it-plugin-artifact
+2.1-SNAPSHOT
+
+  
+package
+initialize
+
+  set
+  attach-pom
+
+
+  artifact.jar
+
+  
+
+  
+
+  
 

Modified: 

svn commit: r775727 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-3106/ resources/mng-3220/ resources/mng-3220/depMgmt-pom-module-notImport

2009-05-17 Thread bentmann
Author: bentmann
Date: Sun May 17 18:06:21 2009
New Revision: 775727

URL: http://svn.apache.org/viewvc?rev=775727&view=rev
Log:
o Decoupled IT from production plugins

Added:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/imported-pom-depMgmt/parent.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/imported-pom-depMgmt/pom.xml
  - copied, changed from r775662, 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/imported-pom-depMgmt/project/pom.xml

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/maven/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/maven/its/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/maven/its/mng3220/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/maven/its/mng3220/dm-pom/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/maven/its/mng3220/dm-pom/1/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/maven/its/mng3220/dm-pom/1/dm-pom-1.pom

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/repo/org/apache/maven/its/mng3220/dm-pom/maven-metadata.xml
   (with props)

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/settings-template.xml
   (with props)
Removed:

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/depMgmt-pom-module-notImported/dm-pom/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/depMgmt-pom-module-notImported/project/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/imported-pom-depMgmt/dm-pom/

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/imported-pom-depMgmt/project/
Modified:

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

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

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

maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3220/depMgmt-pom-module-notImported/pom.xml

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3106ProfileMultipleActivatorsTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3106ProfileMultipleActivatorsTest.java?rev=775727&r1=775726&r2=775727&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3106ProfileMultipleActivatorsTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3106ProfileMultipleActivatorsTest.java
 Sun May 17 18:06:21 2009
@@ -53,12 +53,14 @@
 Verifier verifier;
 
 verifier = new Verifier( testDir.getAbsolutePath() );
+verifier.setAutoclean( false );
+verifier.deleteDirectory( "target" );
 
 List cliOptions = new ArrayList();
 cliOptions.add( "-Dprofile1.on=true" );
 
 verifier.setCliOptions( cliOptions );
-verifier.executeGoal( "package" );
+verifier.executeGoal( "validate" );
 
 verifier.verifyErrorFreeLog();
 verifier.assertFilePresent( "target/profile1/touch.txt" );

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3220ImportScopeTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3220ImportScopeTest.java?rev=775727&r1=775726&r2=775727&view=diff
==
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3220ImportScopeTest.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3220ImportScopeTest.java
 Sun May 17 18:06:21 2009
@@ -38,21 +38,18 @@
 public void testitMNG3220a()
 throws Exception
   

svn commit: r776073 - in /maven/components/branches/MNG-2766: maven-core/src/test/java/org/apache/maven/profiles/matchers/ maven-core/src/test/java/org/apache/maven/project/ maven-core/src/test/resour

2009-05-18 Thread bentmann
Author: bentmann
Date: Mon May 18 20:10:06 2009
New Revision: 776073

URL: http://svn.apache.org/viewvc?rev=776073&view=rev
Log:
o Fixed interpolation of system properties

Added:

maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/sytem-property-interpolation/
   (with props)

maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/sytem-property-interpolation/pom.xml
   (with props)
Modified:

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/profiles/matchers/JdkMatcherTest.java

maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/profiles/matchers/JdkMatcher.java

maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/profiles/matchers/PropertyMatcher.java

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/profiles/matchers/JdkMatcherTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/profiles/matchers/JdkMatcherTest.java?rev=776073&r1=776072&r2=776073&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/profiles/matchers/JdkMatcherTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/profiles/matchers/JdkMatcherTest.java
 Mon May 18 20:10:06 2009
@@ -19,7 +19,7 @@

JdkMatcher m = new JdkMatcher();
Properties props = new Properties();
-   props.setProperty("${java.version}", "1.5.0_16");
+   props.setProperty("java.version", "1.5.0_16");

assertTrue(m.isMatch(p, props ));
}

Modified: 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=776073&r1=776072&r2=776073&view=diff
==
--- 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Mon May 18 20:10:06 2009
@@ -1332,7 +1332,7 @@
throws Exception
{
Properties props = new Properties();
-   props.put("${java.version}", "1.5.0_15");
+   props.put("java.version", "1.5.0_15");

PomTestWrapper pom = buildPom( "jdk-activation",  props ); 
assertEquals(3, pom.getMavenProject().getActiveProfiles().size());  
@@ -1428,6 +1428,15 @@
PomTestWrapper pom = buildPom( 
"dependency-management-with-interpolation/sub" );
}   
 
+public void testInterpolationWithSystemProperty()
+throws Exception
+{
+Properties sysProps = new Properties();
+sysProps.setProperty( "system.property", "PASSED" );
+PomTestWrapper pom = buildPom( "sytem-property-interpolation", 
sysProps );
+assertEquals( "PASSED", pom.getValue( "name" ) );
+}
+
 private void assertPathSuffixEquals( String expected, Object actual )
 {
 String a = actual.toString();

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/sytem-property-interpolation/
--
bugtraq:label = Enter issue ID:

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/sytem-property-interpolation/
--
bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/sytem-property-interpolation/
--
bugtraq:number = false

Propchange: 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/sytem-property-interpolation/
--
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/branches/MNG-2766/maven-core/src/test/resources-project-builder/syt

  1   2   3   4   5   6   7   8   9   10   >