You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2009/04/23 01:04:18 UTC

svn commit: r767707 [5/6] - in /maven/components/branches/MNG-2766: ./ apache-maven/ maven-compat/ maven-compat/src/main/java/org/apache/maven/artifact/ maven-compat/src/main/java/org/apache/maven/artifact/manager/ maven-compat/src/main/java/org/apache...

Modified: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/micromailer/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/micromailer/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/micromailer/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/micromailer/pom.xml Wed Apr 22 23:04:06 2009
@@ -1,124 +1,124 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.sonatype.spice</groupId>
-		<artifactId>spice-parent</artifactId>
-		<version>11</version>
-        <relativePath>spice-parent-9.pom</relativePath>
-	</parent>
-
-	<groupId>org.sonatype.micromailer</groupId>
-	<artifactId>micromailer</artifactId>
-	<version>1.0.3</version>
-	<packaging>jar</packaging>
-	<name>Micro Mailer</name>
-	<!-- SCM -->
-	<scm>
-		<connection>scm:svn:http://svn.sonatype.org/spice/trunk/micromailer</connection>
-		<url>http://svn.sonatype.org/spice/trunk/micromailer</url>
-		<developerConnection>scm:svn:https://svn.sonatype.org/spice/trunk/micromailer</developerConnection>
-	</scm>
-
-	<dependencies>
-
-		<dependency>
-			<groupId>org.codehaus.plexus</groupId>
-			<artifactId>plexus-container-default</artifactId>
-			<version>1.0-alpha-47</version>
-			<type>jar</type>
-			<scope>compile</scope>
-			<exclusions>
-				<exclusion>
-					<groupId>commons-logging</groupId>
-					<artifactId>commons-logging</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>commons-logging</groupId>
-					<artifactId>commons-logging-api</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>log4j</groupId>
-					<artifactId>log4j</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-
-		<dependency>
-			<groupId>org.codehaus.plexus</groupId>
-			<artifactId>plexus-utils</artifactId>
-			<version>1.5.5</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-
-		<!-- Mail composition -->
-		<dependency>
-			<groupId>org.codehaus.plexus</groupId>
-			<artifactId>plexus-velocity</artifactId>
-			<version>1.1.7</version>
-			<type>jar</type>
-			<scope>compile</scope>
-			<exclusions>
-				<exclusion>
-					<groupId>org.codehaus.plexus</groupId>
-					<artifactId>plexus-component-api</artifactId>
-				</exclusion>
-                <exclusion>
-                    <groupId>velocity</groupId>
-                    <artifactId>velocity</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-collections</groupId>
-                    <artifactId>commons-collections</artifactId>
-                </exclusion>
-			</exclusions>
-		</dependency>
-        
-        <dependency>
-            <groupId>org.apache.velocity</groupId>
-            <artifactId>velocity</artifactId>
-            <version>1.5</version>
-            <type>jar</type>
-            <scope>compile</scope>
-        </dependency>
-
-		<!-- Mail sending -->
-		<dependency>
-			<groupId>javax.mail</groupId>
-			<artifactId>mail</artifactId>
-			<version>1.4</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-
-		<!-- Testing -->
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>3.8.2</version>
-			<type>jar</type>
-			<scope>test</scope>
-		</dependency>
-
-	</dependencies>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.plexus</groupId>
-				<artifactId>plexus-maven-plugin</artifactId>
-				<version>1.3.8</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>child-descriptor</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.sonatype.spice</groupId>
+		<artifactId>spice-parent</artifactId>
+		<version>11</version>
+        <relativePath>spice-parent-9.pom</relativePath>
+	</parent>
+
+	<groupId>org.sonatype.micromailer</groupId>
+	<artifactId>micromailer</artifactId>
+	<version>1.0.3</version>
+	<packaging>jar</packaging>
+	<name>Micro Mailer</name>
+	<!-- SCM -->
+	<scm>
+		<connection>scm:svn:http://svn.sonatype.org/spice/trunk/micromailer</connection>
+		<url>http://svn.sonatype.org/spice/trunk/micromailer</url>
+		<developerConnection>scm:svn:https://svn.sonatype.org/spice/trunk/micromailer</developerConnection>
+	</scm>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>org.codehaus.plexus</groupId>
+			<artifactId>plexus-container-default</artifactId>
+			<version>1.0-alpha-47</version>
+			<type>jar</type>
+			<scope>compile</scope>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging-api</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>log4j</groupId>
+					<artifactId>log4j</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<dependency>
+			<groupId>org.codehaus.plexus</groupId>
+			<artifactId>plexus-utils</artifactId>
+			<version>1.5.5</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+
+		<!-- Mail composition -->
+		<dependency>
+			<groupId>org.codehaus.plexus</groupId>
+			<artifactId>plexus-velocity</artifactId>
+			<version>1.1.7</version>
+			<type>jar</type>
+			<scope>compile</scope>
+			<exclusions>
+				<exclusion>
+					<groupId>org.codehaus.plexus</groupId>
+					<artifactId>plexus-component-api</artifactId>
+				</exclusion>
+                <exclusion>
+                    <groupId>velocity</groupId>
+                    <artifactId>velocity</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-collections</groupId>
+                    <artifactId>commons-collections</artifactId>
+                </exclusion>
+			</exclusions>
+		</dependency>
+        
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+            <version>1.5</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+
+		<!-- Mail sending -->
+		<dependency>
+			<groupId>javax.mail</groupId>
+			<artifactId>mail</artifactId>
+			<version>1.4</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+
+		<!-- Testing -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.2</version>
+			<type>jar</type>
+			<scope>test</scope>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.codehaus.plexus</groupId>
+				<artifactId>plexus-maven-plugin</artifactId>
+				<version>1.3.8</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>child-descriptor</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/micromailer/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/multiple-filters/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/multiple-filters/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/multiple-filters/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/multiple-filters/pom.xml Wed Apr 22 23:04:06 2009
@@ -3,6 +3,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>a</groupId>
   <artifactId>b</artifactId>
+  <version>1.0</version>
 
     <build>
         <filters>

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

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/no-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-append/with-profile/subproject/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Modified: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-properties/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-properties/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-properties/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-config-properties/pom.xml Wed Apr 22 23:04:06 2009
@@ -3,6 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>a</groupId>
     <artifactId>b</artifactId>
+    <version>1.0</version>
     <build>
         <plugins>
             <plugin>

Modified: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-exec-merging/wo-plugin-mngt/sub/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-exec-merging/wo-plugin-mngt/sub/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-exec-merging/wo-plugin-mngt/sub/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-exec-merging/wo-plugin-mngt/sub/pom.xml Wed Apr 22 23:04:06 2009
@@ -45,7 +45,7 @@
         <executions>
           <execution>
             <!-- NOTE: Explicitly reference "default" id here -->
-            <id>default-execution-id</id>
+            <id>default</id>
             <phase>child-default</phase>
           </execution>
           <execution>

Modified: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-management-duplicate/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-management-duplicate/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-management-duplicate/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-management-duplicate/pom.xml Wed Apr 22 23:04:06 2009
@@ -1,70 +1,37 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
+	<!--
+		Licensed to the Apache Software Foundation (ASF) under one or more
+		contributor license agreements. See the NOTICE file distributed with
+		this work for additional information regarding copyright ownership.
+		The ASF licenses this file to you under the Apache License, Version
+		2.0 (the "License"); you may not use this file except in compliance
+		with the License. You may obtain a copy of the License at
+
+		http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+		applicable law or agreed to in writing, software distributed under the
+		License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+		CONDITIONS OF ANY KIND, either express or implied. See the License for
+		the specific language governing permissions and limitations under the
+		License.
+	-->
 
 <project>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.mng4053</groupId>
-  <artifactId>test2</artifactId>
-  <version>1.0-SNAPSHOT</version>
-
-  <name>Maven Integration Test :: MNG-4053</name> 
-  <description>
-    Verify that attributes in plugin configuration elements are not erroneously duplicated to other elements when
-    plugin management is used.
-  </description>
 
-  <build>
-    <!-- NOTE: This test used plugin management for the IT plugin -->
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.maven.its.plugins</groupId>
-          <artifactId>maven-it-plugin-configuration</artifactId>
-          <version>2.1-SNAPSHOT</version>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.its.plugins</groupId>
-        <artifactId>maven-it-plugin-configuration</artifactId>
-        <version>2.1-SNAPSHOT</version>
-        <executions>
-          <execution>
-            <phase>validate</phase>
-            <goals>
-              <goal>config</goal>
-            </goals>
-            <configuration>
-              <propertiesFile>target/config.properties</propertiesFile>
-              <domParam>
-                <copy todir="src" overwrite="true">
-                  <fileset dir="target"/>
-                </copy>
-              </domParam>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
+	<groupId>gid</groupId>
+	<artifactId>aid</artifactId>
+	<version>1.0</version>
+	<build>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.its.plugins
+					</groupId>
+					<artifactId>maven-it-plugin-configuration
+					</artifactId>
+					<version>2.1-SNAPSHOT</version>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
 </project>
\ No newline at end of file

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/plugin-management-duplicate/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-injection-order/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-injection-order/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-injection-order/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-injection-order/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Modified: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-properties-interpolation/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-properties-interpolation/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-properties-interpolation/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-properties-interpolation/pom.xml Wed Apr 22 23:04:06 2009
@@ -19,8 +19,7 @@
 <project>
 	<modelVersion>4.0.0</modelVersion>
 
-	<groupId>org.apache.maven.its.mng3900
-	</groupId>
+	<groupId>org.apache.maven.its.mng3900      </groupId>
 	<artifactId>test</artifactId>
 	<version>0.1</version>
 	<packaging>jar</packaging>

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/profile-properties-interpolation/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/sub/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/sub/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/sub/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/properties-inheritance/sub/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/sub/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/sub/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/sub/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-inheritance/another-parent/sub/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-no-decoding/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-no-decoding/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-no-decoding/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-2766/maven-project/src/test/resources-project-builder/url-no-decoding/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Modified: maven/components/branches/MNG-2766/maven-repository-mercury/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository-mercury/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository-mercury/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-repository-mercury/pom.xml Wed Apr 22 23:04:06 2009
@@ -20,18 +20,21 @@
 -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
   <parent>
-    <artifactId>maven</artifactId>
     <groupId>org.apache.maven</groupId>
+    <artifactId>maven</artifactId>
     <version>3.0-SNAPSHOT</version>
   </parent>
-  <modelVersion>4.0.0</modelVersion>
+
   <artifactId>maven-repository-mercury</artifactId>
+
   <name>Mercury Repository implementation</name>
   <description>Mercury implementation for the Maven Repository System</description>
 
   <properties>
-    <mercury.version>1.0-alpha-6-SNAPSHOT</mercury.version>
+    <mercury.version>1.0-alpha-7-SNAPSHOT</mercury.version>
   </properties>
 
   <dependencies>
@@ -41,7 +44,7 @@
       <artifactId>maven-repository</artifactId>
       <version>${project.version}</version>
     </dependency>
-<!-- 
+<!--
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-repository-legacy</artifactId>
@@ -132,7 +135,7 @@
       <version>${mercury.version}</version>
       <scope>compile</scope>
     </dependency>
-    
+
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-repository</artifactId>
@@ -140,24 +143,24 @@
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
-    
+
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-compat</artifactId>
     </dependency>
 
     <dependency>
-      <groupId>org.sonatype.plexus</groupId>                                                                                
-      <artifactId>plexus-jetty6</artifactId>                                                                                
+      <groupId>org.sonatype.plexus</groupId>
+      <artifactId>plexus-jetty6</artifactId>
       <scope>test</scope>
     </dependency>
-    
+
     <dependency>
       <groupId>org.sonatype.spice</groupId>
       <artifactId>plexus-webdav</artifactId>
       <scope>test</scope>
     </dependency>
-  
+
   </dependencies>
 
   <build>
@@ -165,14 +168,14 @@
       <plugin>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-component-metadata</artifactId>
-          <executions>                                                                                                          
-            <execution>                                                                                                         
-              <goals>                                                                                                           
-                <goal>generate-metadata</goal>                                                                                  
-                <goal>generate-test-metadata</goal>                                                                             
-              </goals>                                                                                                          
-            </execution>                                                                                                        
-          </executions>                                                                                                         
+          <executions>
+            <execution>
+              <goals>
+                <goal>generate-metadata</goal>
+                <goal>generate-test-metadata</goal>
+              </goals>
+            </execution>
+          </executions>
       </plugin>
     </plugins>
   </build>

Modified: maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryAdaptor.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryAdaptor.java?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryAdaptor.java (original)
+++ maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryAdaptor.java Wed Apr 22 23:04:06 2009
@@ -21,20 +21,36 @@
 
 import java.io.File;
 import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.IncludesArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.mercury.artifact.ArtifactScopeEnum;
+import org.apache.maven.mercury.artifact.MetadataTreeNode;
 import org.apache.maven.mercury.builder.api.DependencyProcessor;
 import org.apache.maven.mercury.repository.api.Repository;
 import org.apache.maven.mercury.repository.local.m2.LocalRepositoryM2;
 import org.apache.maven.mercury.repository.remote.m2.RemoteRepositoryM2;
 import org.apache.maven.mercury.transport.api.Server;
 import org.apache.maven.mercury.util.Util;
+import org.apache.maven.repository.MavenArtifactMetadata;
+import org.apache.maven.repository.MetadataGraph;
+import org.apache.maven.repository.MetadataGraphNode;
 
 /**
  * @author Oleg Gusakov
@@ -42,60 +58,116 @@
  */
 public class MercuryAdaptor
 {
+    
+    private static Map<String, Repository> _repos = Collections.synchronizedMap(  new HashMap<String, Repository>() );
+    
     public static List<Repository> toMercuryRepos( ArtifactRepository localRepository,
-                                                   List<ArtifactRepository> remoteRepositories,
-                                                   DependencyProcessor dependencyProcessor )
+                                                   List<?> remoteRepositories,
+                                                   DependencyProcessor dependencyProcessor
+                                                 )
     {
         if ( localRepository == null && Util.isEmpty( remoteRepositories ) )
             return null;
-
+        
         int nRepos =
             ( localRepository == null ? 0 : 1 ) + ( Util.isEmpty( remoteRepositories ) ? 0 : remoteRepositories.size() );
 
-        List<Repository> res = new ArrayList<Repository>( nRepos );
+        Map<String, Repository> repos = new LinkedHashMap<String, Repository>(nRepos);
+        
 
         if ( localRepository != null )
         {
-            LocalRepositoryM2 lr =
-                new LocalRepositoryM2( localRepository.getId(), new File( localRepository.getUrl() ),
-                                       dependencyProcessor );
-            res.add( lr );
+            String url = localRepository.getUrl();
+            
+            LocalRepositoryM2 lr = (LocalRepositoryM2) _repos.get( url );
+            
+            if( lr == null )
+                try
+                {
+                    URI rootURI = new URI( url );
+                    
+                    File localRepoDir =  new File( rootURI );
+                    
+                    lr = new LocalRepositoryM2( localRepository.getId(), localRepoDir, dependencyProcessor );
+                    
+                    _repos.put( url, lr );
+                }
+                catch ( URISyntaxException e )
+                {
+                    throw new IllegalArgumentException( e );
+                }
+                repos.put( url, lr );
         }
 
         if ( !Util.isEmpty( remoteRepositories ) )
         {
-            for ( ArtifactRepository ar : remoteRepositories )
+            for ( Object o : remoteRepositories )
             {
-                Server server;
-                try
+                String url;
+                String id;
+                
+                if( ArtifactRepository.class.isAssignableFrom( o.getClass() ))
                 {
-                    server = new Server( ar.getId(), new URL( ar.getUrl() ) );
+                    ArtifactRepository ar = (ArtifactRepository) o;
+                    url = ar.getUrl();
+                    id = ar.getId();
                 }
-                catch ( MalformedURLException e )
+                else if( org.apache.maven.model.Repository.class.isAssignableFrom( o.getClass() ))
                 {
-                    throw new IllegalArgumentException( e );
+                    org.apache.maven.model.Repository ar = (org.apache.maven.model.Repository) o;
+                    url = ar.getUrl();
+                    id = ar.getId();
+                }
+                else
+                    throw new IllegalArgumentException( "found illegal class in the remote repository list - " + o.getClass().getName() );
+                
+                RemoteRepositoryM2 rr = (RemoteRepositoryM2) _repos.get( url );
+                
+                if( rr == null )
+                {
+                    Server server;
+                    try
+                    {
+                        server = new Server( id, new URL( url ) );
+                    }
+                    catch ( MalformedURLException e )
+                    {
+                        throw new IllegalArgumentException( e );
+                    }
+                    rr = new RemoteRepositoryM2( server, dependencyProcessor );
+                    _repos.put( url, rr );
                 }
-                RemoteRepositoryM2 rr = new RemoteRepositoryM2( server, dependencyProcessor );
 
-                res.add( rr );
+                repos.put( url, rr );
             }
         }
 
+        List<Repository> res = new ArrayList<Repository>( repos.size() );
+
+        for( Entry<String, Repository> e : repos.entrySet() )
+            res.add( e.getValue() );
+        
+//System.out.println("Converted "+nRepos+" -> "+res.size());
+//
         return res;
     }
 
-    public static ArtifactMetadata toMercuryBasicMetadata( Artifact a )
+    private static void setInExClusion( ArtifactMetadata md, List<String> patterns, boolean inc )
     {
-        ArtifactMetadata md = new ArtifactMetadata();
-        md.setGroupId( a.getGroupId() );
-        md.setArtifactId( a.getArtifactId() );
-        md.setVersion( a.getVersion() );
-        md.setType( a.getType() );
-        md.setScope( a.getScope() );
-
-        return md;
+        if( Util.isEmpty( patterns ) )
+            return;
+        
+        List<ArtifactMetadata> lusions = new ArrayList<ArtifactMetadata>( patterns.size() );
+        
+        for( String pattern : patterns )
+            lusions.add( new ArtifactMetadata(pattern) );
+        
+        if( inc )
+            md.setInclusions( lusions );
+        else
+            md.setExclusions( lusions );
     }
-
+    
     public static ArtifactMetadata toMercuryMetadata( Artifact a )
     {
         ArtifactMetadata md = new ArtifactMetadata();
@@ -104,28 +176,63 @@
         md.setVersion( a.getVersion() );
         md.setType( a.getType() );
         md.setScope( a.getScope() );
-
+        
+        if( "test-jar".equals( a.getType() ) )
+        {
+            md.setType( "jar" );
+            md.setClassifier( "tests" );
+        }
+        
+        ArtifactFilter af = a.getDependencyFilter();
+        
+        if( af != null )
+        {
+            if( ExcludesArtifactFilter.class.isAssignableFrom( af.getClass() ) )
+            {
+                setInExClusion( md, ((ExcludesArtifactFilter)af).getPatterns(), false );
+            }
+            else if( IncludesArtifactFilter.class.isAssignableFrom( af.getClass() ) )
+                {
+                    setInExClusion( md, ((IncludesArtifactFilter)af).getPatterns(), true );
+                }
+        }
         return md;
     }
 
     public static Artifact toMavenArtifact( ArtifactFactory af, org.apache.maven.mercury.artifact.Artifact a )
     {
-        Artifact ma = a.getClassifier() == null 
-                        ? af.createArtifact( a.getGroupId(), a.getArtifactId(), a.getVersion(), a.getScope(), a.getType() )
-                        : af.createArtifactWithClassifier( a.getGroupId(), a.getArtifactId(), a.getVersion(), a.getType(), a.getClassifier() )
+        boolean isTestJar = "test-jar".equals( a.getType() );
+        
+        String type = isTestJar ? "jar" : a.getType();
+        
+        String classifier = isTestJar ? "tests" : a.getType();
+        
+        Artifact ma = classifier == null 
+                        ? af.createArtifact( a.getGroupId(), a.getArtifactId(), a.getVersion(), a.getScope(), type )
+                        : af.createArtifactWithClassifier( a.getGroupId(), a.getArtifactId(), a.getVersion(), type, classifier )
                         ;
         ma.setScope( a.getScope() );
         
         ma.setFile( a.getFile() );
+        
+        ma.setResolved( a.getFile() != null );
+        
+        ma.setResolvedVersion( a.getVersion() );
 
         return ma;
     }
     
     public static Artifact toMavenArtifact( ArtifactFactory af, org.apache.maven.mercury.artifact.ArtifactMetadata a )
     {
-        Artifact ma = a.getClassifier() == null 
-                                ? af.createArtifact( a.getGroupId(), a.getArtifactId(), a.getVersion(), a.getScope(), a.getType() )
-                                : af.createArtifactWithClassifier( a.getGroupId(), a.getArtifactId(), a.getVersion(), a.getType(), a.getClassifier() )
+        boolean isTestJar = "test-jar".equals( a.getType() );
+        
+        String type = isTestJar ? "jar" : a.getType();
+        
+        String classifier = isTestJar ? "tests" : a.getType();
+        
+        Artifact ma = classifier == null 
+                                ? af.createArtifact( a.getGroupId(), a.getArtifactId(), a.getVersion(), a.getScope(), type )
+                                : af.createArtifactWithClassifier( a.getGroupId(), a.getArtifactId(), a.getVersion(), type, classifier )
                                 ;
         ma.setScope( a.getScope() );
 
@@ -136,5 +243,152 @@
     {
         return toMavenArtifact( af, new ArtifactMetadata(name) );
     }
+    
+    public static ArtifactMetadata toMercuryArtifactMetadata( MavenArtifactMetadata md )
+    {
+        ArtifactMetadata mmd = new ArtifactMetadata();
+        mmd.setGroupId( md.getGroupId() );
+        mmd.setArtifactId( md.getArtifactId() );
+        mmd.setVersion( md.getVersion() );
+        mmd.setClassifier( md.getClassifier() );
+        mmd.setType( md.getType() );
+        
+        if( "test-jar".equals( md.getType() ) )
+        {
+            mmd.setType( "jar" );
+            mmd.setClassifier( "tests" );
+        }
+
+        return mmd;
+    }
+    
+    public static MavenArtifactMetadata toMavenArtifactMetadata( ArtifactMetadata md )
+    {
+        MavenArtifactMetadata mmd = new MavenArtifactMetadata();
+        mmd.setGroupId( md.getGroupId() );
+        mmd.setArtifactId( md.getArtifactId() );
+        mmd.setVersion( md.getVersion() );
+        mmd.setClassifier( md.getClassifier() );
+        mmd.setType( md.getType() );
+        
+        if( "test-jar".equals( md.getType() ) )
+        {
+            mmd.setType( "jar" );
+            mmd.setClassifier( "tests" );
+        }
+
+        return mmd;
+    }
+    
+    public static MavenArtifactMetadata toMavenArtifactMetadata( Artifact md )
+    {
+        MavenArtifactMetadata mmd = new MavenArtifactMetadata();
+        mmd.setGroupId( md.getGroupId() );
+        mmd.setArtifactId( md.getArtifactId() );
+        mmd.setVersion( md.getVersion() );
+        mmd.setClassifier( md.getClassifier() );
+        mmd.setType( md.getType() );
+        
+        if( "test-jar".equals( md.getType() ) )
+        {
+            mmd.setType( "jar" );
+            mmd.setClassifier( "tests" );
+        }
+
+        return mmd;
+    }
+    
+    public static MetadataGraph resolvedTreeToGraph( MetadataTreeNode root )
+    {
+        if( root == null )
+            return null;
+        
+        MetadataGraphNode entry = new MetadataGraphNode( toMavenArtifactMetadata( root.getMd() ) );
+        
+        MetadataGraph graph = new MetadataGraph(entry);
+        
+        graph.addNode( entry );
+        
+        addKids( root, entry, graph );
+        
+        return graph;
+    }
+    
+    private static final void addKids( MetadataTreeNode tParent, MetadataGraphNode gParent, MetadataGraph graph )
+    {
+        if( !tParent.hasChildren() )
+            return;
+        
+        for( MetadataTreeNode kid : tParent.getChildren() )
+        {
+            MavenArtifactMetadata mmd = toMavenArtifactMetadata( kid.getMd() );
+            
+            MetadataGraphNode node = graph.findNode( mmd );
+            
+            node.addIncident( gParent );
+            
+            gParent.addIncident( node );
+            
+            addKids( kid, node, graph );
+        }
+    }
+
+    /**
+     * @param reqArtifact 
+     * @param isPlugin 
+     * @param filter
+     * @return
+     */
+    public static ArtifactScopeEnum extractScope( Artifact reqArtifact, boolean isPlugin, ArtifactFilter filter )
+    {
+        String scopeStr = reqArtifact.getScope(); //org.apache.maven.mercury.artifact.Artifact.SCOPE_COMPILE;
+        
+        if( filter != null )
+        {
+            if( ScopeArtifactFilter.class.isAssignableFrom( filter.getClass() ) )
+                scopeStr = ((ScopeArtifactFilter)filter).getScope(); 
+        }
+        
+//        if( "org.apache.maven.plugins:maven-remote-resources-plugin".equals( 
+//                                                      reqArtifact.getGroupId()+":"+reqArtifact.getArtifactId() 
+//                                                                           )
+//        ) scopeStr = null;
+        
+//        else if( isPlugin )
+//            scopeStr = org.apache.maven.mercury.artifact.Artifact.SCOPE_RUNTIME;
+        
+        if( scopeStr != null )
+        {
+            if( org.apache.maven.mercury.artifact.Artifact.SCOPE_COMPILE.equals( scopeStr ) )
+                return ArtifactScopeEnum.compile;
+            else if( org.apache.maven.mercury.artifact.Artifact.SCOPE_TEST.equals( scopeStr ) )
+                return ArtifactScopeEnum.test;
+            else if( org.apache.maven.mercury.artifact.Artifact.SCOPE_PROVIDED.equals( scopeStr ) )
+                return ArtifactScopeEnum.provided;
+            else if( org.apache.maven.mercury.artifact.Artifact.SCOPE_RUNTIME.equals( scopeStr ) )
+                return ArtifactScopeEnum.runtime;
+            else if( Artifact.SCOPE_RUNTIME_PLUS_SYSTEM.equals( scopeStr ) )
+                return ArtifactScopeEnum.runtime;
+            else if( org.apache.maven.mercury.artifact.Artifact.SCOPE_SYSTEM.equals( scopeStr ) )
+                return ArtifactScopeEnum.system;
+        }
+
+        return null;
+    }
+    
+    public static Map<String,ArtifactMetadata> toMercuryVersionMap(Map<String,Artifact> map  )
+    {
+        if( Util.isEmpty( map ) )
+            return null;
+        
+        Map<String,ArtifactMetadata> res = new HashMap<String, ArtifactMetadata>( map.size() );
+        
+        for( Entry<String, Artifact> e : map.entrySet() )
+        {
+            res.put( e.getKey(), toMercuryMetadata( e.getValue() ) );
+        }
+        
+        return res;
+    }
 
 }

Modified: maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java (original)
+++ maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java Wed Apr 22 23:04:06 2009
@@ -19,20 +19,31 @@
 
 package org.apache.maven.repository.mercury;
 
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
 import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.mercury.artifact.ArtifactQueryList;
+import org.apache.maven.mercury.artifact.ArtifactScopeEnum;
+import org.apache.maven.mercury.artifact.MetadataTreeNode;
 import org.apache.maven.mercury.builder.api.DependencyProcessor;
 import org.apache.maven.mercury.plexus.PlexusMercury;
 import org.apache.maven.mercury.repository.api.Repository;
 import org.apache.maven.mercury.repository.api.RepositoryException;
 import org.apache.maven.mercury.util.Util;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.repository.LegacyRepositorySystem;
+import org.apache.maven.repository.MetadataGraph;
+import org.apache.maven.repository.MetadataResolutionRequest;
+import org.apache.maven.repository.MetadataResolutionResult;
+import org.apache.maven.repository.RepositorySystem;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.lang.DefaultLanguage;
@@ -64,28 +75,146 @@
         if ( request == null )
             throw new IllegalArgumentException( LANG.getMessage( "null.request" ) );
 
+System.out.println("mercury: request for "+request.getArtifact()
++"("+request.getArtifactDependencies()+") repos="+request.getRemoteRepostories().size()
++" repos, map=" + request.getManagedVersionMap() 
+);
+
         if ( request.getArtifact() == null )
             throw new IllegalArgumentException( LANG.getMessage( "null.request.artifact" ) );
+        
+        Map<String, ArtifactMetadata> versionMap = MercuryAdaptor.toMercuryVersionMap( (Map<String,Artifact>)request.getManagedVersionMap() );
 
         ArtifactResolutionResult result = new ArtifactResolutionResult();
 
         List<Repository> repos =
-            MercuryAdaptor.toMercuryRepos( request.getLocalRepository()
+            MercuryAdaptor.toMercuryRepos(   request.getLocalRepository()
                                            , request.getRemoteRepostories()
                                            , _dependencyProcessor
                                          );
 
         try
         {
-            List<ArtifactMetadata> mercuryMetadataList =
-                _mercury.resolve( repos, null, MercuryAdaptor.toMercuryMetadata( request.getArtifact() ) );
+long start = System.currentTimeMillis();
+
+            org.apache.maven.artifact.Artifact rootArtifact = request.getArtifact();
+            
+            org.apache.maven.artifact.Artifact mavenPluginArtifact = rootArtifact;
+            
+            Set<Artifact> artifacts = request.getArtifactDependencies();
+            
+            boolean isPlugin = "maven-plugin".equals( rootArtifact.getType() ); 
+            
+            ArtifactScopeEnum scope = MercuryAdaptor.extractScope( rootArtifact, isPlugin, request.getFilter() );
+            
+            if( isPlugin  )
+                rootArtifact = createArtifact( rootArtifact.getGroupId()
+                                                    , rootArtifact.getArtifactId()
+                                                    , rootArtifact.getVersion()
+                                                    , rootArtifact.getScope()
+                                                    , "jar"
+                                                  );
+
+            ArtifactMetadata rootMd = MercuryAdaptor.toMercuryMetadata( rootArtifact );
+
+            org.apache.maven.artifact.Artifact root = null;
+
+            // copied from artifact resolver 
+            if ( request.isResolveRoot() && rootArtifact.getFile() == null && Util.isEmpty( artifacts ) )
+            {
+                try
+                {
+                    List<ArtifactMetadata> mercuryMetadataList = new ArrayList<ArtifactMetadata>(1);
+                    
+                    mercuryMetadataList.add( rootMd );
+                    
+                    List<org.apache.maven.mercury.artifact.Artifact> mercuryArtifactList =
+                        _mercury.read( repos, mercuryMetadataList );
+                    
+                    if( Util.isEmpty( mercuryArtifactList ) )
+                    {
+                        result.addErrorArtifactException( new ArtifactResolutionException( "scope="+scope, rootArtifact) );
+                        return result;
+                    }
+
+                    root = isPlugin ? mavenPluginArtifact : rootArtifact;
+                    
+                    org.apache.maven.mercury.artifact.Artifact a = mercuryArtifactList.get( 0 );
+                    
+                    root.setFile( a.getFile() );
+                    root.setResolved( true );
+                    root.setResolvedVersion( a.getVersion() );
+                    
+                    result.addArtifact( rootArtifact );
+                    result.addRequestedArtifact( rootArtifact );
+                }
+                catch ( Exception e )
+                {
+                    result.addMissingArtifact( request.getArtifact() );
+                    return result;
+                }
+            }
+
+            if ( Util.isEmpty( artifacts ) )
+            {
+                return result;
+            } 
+            
+            List<ArtifactMetadata> mercuryMetadataList = null;
+
+            if ( Util.isEmpty( artifacts ) )
+                mercuryMetadataList = _mercury.resolve( repos, scope,  rootMd );
+            else
+            {
+                List<ArtifactMetadata> query = new ArrayList<ArtifactMetadata>( artifacts.size() + 1 );
+                
+                query.add( rootMd );
+                
+                for( Artifact a : artifacts )
+                    query.add( MercuryAdaptor.toMercuryMetadata( a ) );
+
+                mercuryMetadataList = _mercury.resolve( repos, scope, new ArtifactQueryList(query), null, null, versionMap );
+            }
 
             List<org.apache.maven.mercury.artifact.Artifact> mercuryArtifactList =
                 _mercury.read( repos, mercuryMetadataList );
 
+long diff = System.currentTimeMillis() - start;
+            
             if ( !Util.isEmpty( mercuryArtifactList ) )
+            {
                 for ( org.apache.maven.mercury.artifact.Artifact a : mercuryArtifactList )
-                    result.addArtifact( MercuryAdaptor.toMavenArtifact( _artifactFactory, a ) );
+                {
+                    if( a.getGroupId().equals( rootMd.getGroupId() ) && a.getArtifactId().equals( rootMd.getArtifactId() ) )
+                    { // root artifact processing
+                        root = isPlugin ? mavenPluginArtifact : rootArtifact;
+                        
+                        root.setFile( a.getFile() );
+                        root.setResolved( true );
+                        root.setResolvedVersion( a.getVersion() );
+
+                        result.addArtifact( root );
+                        result.addRequestedArtifact( root );
+                    }
+                    else
+                    {
+                        Artifact ma = MercuryAdaptor.toMavenArtifact( _artifactFactory, a );
+                        
+                        result.addArtifact( ma );
+                        result.addRequestedArtifact( ma );
+                    }
+                }
+
+System.out.println("mercury: resolved("+diff+") "+root+"("+scope+") as file "+root.getFile() );
+//for( Artifact a: result.getArtifacts() )
+//System.out.println("mercury dependency: "+a+" as file "+a.getFile() );
+            }
+            else
+            {
+                result.addMissingArtifact( rootArtifact );
+System.out.println("mercury: missing artifact("+diff+") "+rootArtifact+"("+scope+")" );
+            }
+            
         }
         catch ( RepositoryException e )
         {
@@ -95,6 +224,8 @@
 
         return result;
     }
+    
+    
 
 //    public List<ArtifactVersion> retrieveAvailableVersions( Artifact artifact, ArtifactRepository localRepository,
 //                                                            List<ArtifactRepository> remoteRepositories )
@@ -123,5 +254,42 @@
 //            throw new ArtifactMetadataRetrievalException(e);
 //        }
 //    }
+    
+
+    public MetadataResolutionResult resolveMetadata( MetadataResolutionRequest request )
+    {
+        if ( request == null )
+            throw new IllegalArgumentException( LANG.getMessage( "null.request" ) );
+
+        if ( request.getArtifactMetadata() == null )
+            throw new IllegalArgumentException( LANG.getMessage( "null.request.artifact" ) );
+
+        List<Repository> repos =
+            MercuryAdaptor.toMercuryRepos( request.getLocalRepository()
+                                           , request.getRemoteRepostories()
+                                           , _dependencyProcessor
+                                         );
+
+        MetadataResolutionResult res = new MetadataResolutionResult();
+        
+        ArtifactMetadata md = MercuryAdaptor.toMercuryArtifactMetadata( request.getArtifactMetadata() );
+        
+        try
+        {
+            MetadataTreeNode root = _mercury.resolveAsTree( repos, ArtifactScopeEnum.valueOf( request.getScope() ), new ArtifactQueryList(md), null, null );
+            if( root != null )
+            {
+                MetadataGraph resTree = MercuryAdaptor.resolvedTreeToGraph( root );
+                
+                res.setResolvedTree( resTree );
+            }
+        }
+        catch ( RepositoryException e )
+        {
+            res.addError( e );
+        }
+        
+        return res;
+    }
 
 }

Propchange: maven/components/branches/MNG-2766/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 22 23:04:06 2009
@@ -4,4 +4,4 @@
 /maven/components/branches/maven-2.1.x/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java:739385,741841,747468,748815
 /maven/components/branches/sisbell-plugin-manager/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java:738973-739966
 /maven/components/sisbell-plugin-manager/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java:738757-738972
-/maven/components/trunk/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java:688587-696625,696644-699681
+/maven/components/trunk/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java:688587-696625,696644-699681,751453-767358

Modified: maven/components/branches/MNG-2766/maven-repository-mercury/src/test/java/org/apache/maven/repository/mercury/MercuryRepositorySystemTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository-mercury/src/test/java/org/apache/maven/repository/mercury/MercuryRepositorySystemTest.java?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository-mercury/src/test/java/org/apache/maven/repository/mercury/MercuryRepositorySystemTest.java (original)
+++ maven/components/branches/MNG-2766/maven-repository-mercury/src/test/java/org/apache/maven/repository/mercury/MercuryRepositorySystemTest.java Wed Apr 22 23:04:06 2009
@@ -19,6 +19,23 @@
 
 package org.apache.maven.repository.mercury;
 
+<<<<<<< .working
+=======
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Set;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
+import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.repository.AbstractMavenRepositorySystemTest;
+>>>>>>> .merge-right.r767358
+import org.apache.maven.repository.MavenArtifactMetadata;
+import org.apache.maven.repository.MetadataGraph;
+import org.apache.maven.repository.MetadataGraphNode;
+import org.apache.maven.repository.MetadataResolutionRequest;
+import org.apache.maven.repository.MetadataResolutionResult;
 import org.apache.maven.repository.RepositorySystem;
 
 /**
@@ -38,6 +55,46 @@
         
         _mrs = getContainer().lookup( RepositorySystem.class, "mercury" );
     }
+    
+    
+    public void testResolveTree()
+    throws IOException
+    {
+        MavenArtifactMetadata mad = MercuryAdaptor.toMavenArtifactMetadata( new ArtifactMetadata( "asm:asm-xml:3.0" ) );
+        
+        MetadataResolutionRequest request = new MetadataResolutionRequest()
+            .setLocalRepository( _localRepo )
+            .setRemoteRepostories( _remoteRepos )
+            .setArtifactMetadata( mad )
+            .setAsResolvedTree( true )
+            .setScope( "compile" )
+        ;
+        
+        MetadataResolutionResult res = _mrs.resolveMetadata( request );
+        
+        assertNotNull( res );
+        
+        MetadataGraph resGraph = res.getResolvedTree();
+        
+        assertNotNull( resGraph );
+        
+        Collection<MetadataGraphNode> nodes = resGraph.getNodes();
+        
+        assertNotNull( nodes );
+        
+        assertEquals( 4, nodes.size() );
+        
+        assertTrue( nodes.contains( new MetadataGraphNode( MercuryAdaptor.toMavenArtifactMetadata( new ArtifactMetadata( "asm:asm-xml:3.0" ) ) ) ) );
+        
+        assertTrue( nodes.contains( new MetadataGraphNode( MercuryAdaptor.toMavenArtifactMetadata( new ArtifactMetadata( "asm:asm-util:3.0" ) ) ) ) );
+        
+        assertTrue( nodes.contains( new MetadataGraphNode( MercuryAdaptor.toMavenArtifactMetadata( new ArtifactMetadata( "asm:asm-tree:3.0" ) ) ) ) );
+        
+        assertTrue( nodes.contains( new MetadataGraphNode( MercuryAdaptor.toMavenArtifactMetadata( new ArtifactMetadata( "asm:asm:3.0" ) ) ) ) );
+        
+        assertFalse( nodes.contains( new MetadataGraphNode( MercuryAdaptor.toMavenArtifactMetadata( new ArtifactMetadata( "asm:asm-parent:3.0" ) ) ) ) );
+        
+    }
 }
 
 

Modified: maven/components/branches/MNG-2766/maven-repository/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-repository/pom.xml Wed Apr 22 23:04:06 2009
@@ -20,15 +20,19 @@
 -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
   <parent>
-    <artifactId>maven</artifactId>
     <groupId>org.apache.maven</groupId>
+    <artifactId>maven</artifactId>
     <version>3.0-SNAPSHOT</version>
   </parent>
-  <modelVersion>4.0.0</modelVersion>
+
   <artifactId>maven-repository</artifactId>
+
   <name>Maven Repository</name>
   <description>Repository System interface for Maven.</description>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -37,7 +41,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-    </dependency>    
+    </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-compat</artifactId>
@@ -50,7 +54,7 @@
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-file</artifactId>
       <scope>test</scope>
-    </dependency>    
+    </dependency>
     <dependency>
       <groupId>org.sonatype.plexus</groupId>
       <artifactId>plexus-jetty6</artifactId>

Propchange: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/project/ProjectUtils.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 22 23:04:06 2009
@@ -5,3 +5,4 @@
 /maven/components/branches/sisbell-plugin-manager/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java:738973-739966
 /maven/components/sisbell-plugin-manager/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java:738757-738972
 /maven/components/trunk/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java:688587-696625,696644-699681
+/maven/components/trunk/maven-repository/src/main/java/org/apache/maven/project/ProjectUtils.java:751453-767358

Propchange: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/DefaultMirrorBuilder.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 22 23:04:06 2009
@@ -0,0 +1 @@
+/maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/DefaultMirrorBuilder.java:751453-767358

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=767707&r1=767706&r2=767707&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 Wed Apr 22 23:04:06 2009
@@ -30,7 +30,6 @@
 import org.apache.maven.artifact.InvalidRepositoryException;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.manager.WagonManager;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
@@ -38,7 +37,6 @@
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
 import org.apache.maven.artifact.resolver.ArtifactResolver;
-import org.apache.maven.artifact.resolver.ResolutionErrorHandler;
 import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
@@ -54,13 +52,12 @@
 import org.apache.maven.wagon.repository.RepositoryPermissions;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
 
 /**
  * @author Jason van Zyl
  */
-@Component(role = RepositorySystem.class)
+@Component( role = RepositorySystem.class, hint = "default" )
 public class LegacyRepositorySystem
     implements RepositorySystem
 {
@@ -80,17 +77,8 @@
     private ArtifactRepositoryLayout defaultArtifactRepositoryLayout;
 
     @Requirement
-    private ArtifactMetadataSource artifactMetadataSource;
-
-    @Requirement
     private MirrorBuilder mirrorBuilder;
 
-    @Requirement
-    private ResolutionErrorHandler resolutionErrorHandler;
-
-    @Requirement
-    private Logger logger;
-
     private Map<String, ProxyInfo> proxies = new HashMap<String, ProxyInfo>();
 
     private Map<String, AuthenticationInfo> authenticationInfoMap = new HashMap<String, AuthenticationInfo>();
@@ -395,7 +383,14 @@
 
     public ArtifactResolutionResult resolve( ArtifactResolutionRequest request )
     {
-        return artifactResolver.resolve( request );
+
+        if ( request.getRemoteRepostories() != null && request.getRemoteRepostories().size() > 10 )
+        {
+            System.out.println( "legacy: request with " + request.getRemoteRepostories().size() + " remote repositories" );
+        }
+        ArtifactResolutionResult res = artifactResolver.resolve( request );
+
+        return res;
     }
 
     public void setOnline( boolean online )
@@ -419,6 +414,8 @@
         proxyInfo.setPassword( password );
 
         proxies.put( protocol, proxyInfo );
+
+        wagonManager.addProxy( protocol, host, port, username, password, nonProxyHosts );
     }
 
     public void addAuthenticationInfo( String repositoryId, String username, String password, String privateKey, String passphrase )
@@ -469,4 +466,9 @@
     {
         return mirrorBuilder.getMirrors( repositories );
     }
+
+    public MetadataResolutionResult resolveMetadata( MetadataResolutionRequest request )
+    {
+        return null;
+    }
 }

Propchange: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 22 23:04:06 2009
@@ -5,3 +5,4 @@
 /maven/components/branches/sisbell-plugin-manager/maven-project/src/main/java/org/apache/maven/DefaultMavenTools.java:738973-739966
 /maven/components/sisbell-plugin-manager/maven-project/src/main/java/org/apache/maven/DefaultMavenTools.java:738757-738972
 /maven/components/trunk/maven-project/src/main/java/org/apache/maven/DefaultMavenTools.java:688587-696625,696644-699681
+/maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java:751453-767358

Modified: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java (original)
+++ maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java Wed Apr 22 23:04:06 2009
@@ -27,7 +27,6 @@
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
 import org.apache.maven.artifact.resolver.ResolutionListener;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 
@@ -40,7 +39,9 @@
  */
 public class MetadataResolutionRequest
 {
-    private Artifact artifact;
+    private MavenArtifactMetadata mad;
+
+    private String scope;
 
     // Needs to go away
     private Set<Artifact> artifactDependencies;
@@ -49,41 +50,40 @@
 
     private List<ArtifactRepository> remoteRepositories;
 
-    // Not sure what to do with this?
-    // Scope
-    // Lock down lists
-    private ArtifactFilter filter;
-
-    // Needs to go away
-    private List<ResolutionListener> listeners = new ArrayList<ResolutionListener>();
-
     // This is like a filter but overrides all transitive versions 
     private Map managedVersionMap;
 
-    // This should not be in here, it's a component
-    private ArtifactMetadataSource metadataSource;
-
-    private boolean resolveRoot = true;
+    /** result type - flat list; the default */
+    private boolean asList = true;
+    
+    /** result type - dirty tree */
+    private boolean asDirtyTree = false;
+    
+    /** result type - resolved tree */
+    private boolean asResolvedTree = false;
+    
+    /** result type - graph */
+    private boolean asGraph = false;
     
     public MetadataResolutionRequest()
     {  
     }
     
-    public MetadataResolutionRequest( Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories )    
+    public MetadataResolutionRequest( MavenArtifactMetadata md, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories )    
     {        
-        this.artifact = artifact;
+        this.mad = md;
         this.localRepository = localRepository;
         this.remoteRepositories = remoteRepositories;
     }
     
-    public Artifact getArtifact()
+    public MavenArtifactMetadata getArtifactMetadata()
     {
-        return artifact;
+        return mad;
     }
 
-    public MetadataResolutionRequest setArtifact( Artifact artifact )
+    public MetadataResolutionRequest setArtifactMetadata( MavenArtifactMetadata md )
     {
-        this.artifact = artifact;
+        this.mad = md;
 
         return this;
     }
@@ -124,87 +124,83 @@
         return this;
     }
 
-    public ArtifactFilter getFilter()
+    public Map getManagedVersionMap()
     {
-        return filter;
+        return managedVersionMap;
     }
 
-    public MetadataResolutionRequest setFilter( ArtifactFilter filter )
+    public MetadataResolutionRequest setManagedVersionMap( Map managedVersionMap )
     {
-        this.filter = filter;
+        this.managedVersionMap = managedVersionMap;
 
         return this;
     }
 
-    public List<ResolutionListener> getListeners()
+    public String toString()
     {
-        return listeners;
-    }
-
-    public MetadataResolutionRequest setListeners( List<ResolutionListener> listeners )
-    {        
-        this.listeners = listeners;
+        StringBuffer sb = new StringBuffer()
+                .append( "REQUEST: " ).append(  "\n" )
+                .append( "artifact: " ).append( mad ).append(  "\n" )
+                .append( artifactDependencies ).append(  "\n" )
+                .append( "localRepository: " ).append(  localRepository ).append(  "\n" )
+                .append( "remoteRepositories: " ).append(  remoteRepositories ).append(  "\n" )
+                ;
         
-        return this;
+        return sb.toString();
     }
-    
-    public MetadataResolutionRequest addListener( ResolutionListener listener )
+
+    public boolean isAsList()
     {
-        listeners.add( listener );
+        return asList;
+    }
 
+    public MetadataResolutionRequest setAsList( boolean asList )
+    {
+        this.asList = asList;
         return this;
     }
 
-    // ------------------------------------------------------------------------
-    //
-    // ------------------------------------------------------------------------
-
-    public ArtifactMetadataSource getMetadataSource()
+    public boolean isAsDirtyTree()
     {
-        return metadataSource;
+        return asDirtyTree;
     }
 
-    public MetadataResolutionRequest setMetadataSource( ArtifactMetadataSource metadataSource )
+    public MetadataResolutionRequest setAsDirtyTree( boolean asDirtyTree )
     {
-        this.metadataSource = metadataSource;
-
+        this.asDirtyTree = asDirtyTree;
         return this;
     }
 
-    public Map getManagedVersionMap()
+    public boolean isAsResolvedTree()
     {
-        return managedVersionMap;
+        return asResolvedTree;
     }
 
-    public MetadataResolutionRequest setManagedVersionMap( Map managedVersionMap )
+    public MetadataResolutionRequest setAsResolvedTree( boolean asResolvedTree )
     {
-        this.managedVersionMap = managedVersionMap;
-
+        this.asResolvedTree = asResolvedTree;
         return this;
     }
 
-    public MetadataResolutionRequest setResolveRoot( boolean resolveRoot )
+    public boolean isAsGraph()
     {
-        this.resolveRoot = resolveRoot;
-        
+        return asGraph;
+    }
+
+    public MetadataResolutionRequest setAsGraph( boolean asGraph )
+    {
+        this.asGraph = asGraph;
         return this;
     }
-    
-    public boolean isResolveRoot()
+
+    public MetadataResolutionRequest setScope( String scope )
     {
-        return resolveRoot;
+        this.scope = scope;
+        return this;
     }
-    
-    public String toString()
+
+    public String getScope()
     {
-        StringBuffer sb = new StringBuffer()
-                .append( "REQUEST: " ).append(  "\n" )
-                .append( "artifact: " ).append( artifact ).append(  "\n" )
-                .append( artifactDependencies ).append(  "\n" )
-                .append( "localRepository: " ).append(  localRepository ).append(  "\n" )
-                .append( "remoteRepositories: " ).append(  remoteRepositories ).append(  "\n" )
-                .append( "metadataSource: " ).append(  metadataSource ).append(  "\n" );
-        
-        return sb.toString();
+        return scope;
     }
 }

Modified: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java (original)
+++ maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java Wed Apr 22 23:04:06 2009
@@ -65,6 +65,12 @@
     private Set<Artifact> requestedArtifacts;
 
     private Set<Artifact> artifacts;
+    
+    private MetadataGraph dirtyTree;
+    
+    private MetadataGraph resolvedTree;
+    
+    private MetadataGraph resolvedGraph;
 
     public Artifact getOriginatingArtifact()
     {
@@ -227,13 +233,10 @@
         return errorArtifactExceptions != null;
     }
 
-    public MetadataResolutionResult addErrorArtifactException( ArtifactResolutionException e )
+    public MetadataResolutionResult addError( Exception e )
     {
-        errorArtifactExceptions = initList( errorArtifactExceptions );
-
-        errorArtifactExceptions.add( e );
-
-        exceptions = initList( exceptions );
+        if( exceptions == null )
+            initList( exceptions );
 
         exceptions.add( e );
 
@@ -340,4 +343,15 @@
 
         return sb.toString();
     }
+
+    public MetadataGraph getResolvedTree()
+    {
+        return resolvedTree;
+    }
+
+    public void setResolvedTree( MetadataGraph resolvedTree )
+    {
+        this.resolvedTree = resolvedTree;
+    }
+    
 }

Propchange: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/MirrorBuilder.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 22 23:04:06 2009
@@ -0,0 +1 @@
+/maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MirrorBuilder.java:751453-767358

Modified: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java (original)
+++ maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java Wed Apr 22 23:04:06 2009
@@ -91,7 +91,16 @@
     
     ArtifactResolutionResult resolve( ArtifactResolutionRequest request );
 
-    //MetadataResolutionResult resolveMetadata( MetadataResolutionRequest request );
+    /**
+     * this is the new metadata-based entry point into repository system. By default - it will transitively resolve metadata
+     * for the supplied root GAV and return a flat set of dependency metadatas. Tweaking the request allows user to ask for 
+     * various formats of the response - resolved tree, resolved graph or dirty tree. Only the resolved tree is implemented now
+     * in MercuryRepositorySystem, LegacyRepositorySystem ignores this call for now.  
+     * 
+     * @param request - supplies all necessary details for the resolution configuration
+     * @return
+     */
+    MetadataResolutionResult resolveMetadata( MetadataResolutionRequest request );
        
     //REMOVE
     // Network enablement: this needs to go as we will know at a higher level from the embedder if the system is offline or not, we should not have to

Propchange: maven/components/branches/MNG-2766/maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 22 23:04:06 2009
@@ -5,3 +5,4 @@
 /maven/components/branches/sisbell-plugin-manager/maven-project/src/main/java/org/apache/maven/MavenTools.java:738973-739966
 /maven/components/sisbell-plugin-manager/maven-project/src/main/java/org/apache/maven/MavenTools.java:738757-738972
 /maven/components/trunk/maven-project/src/main/java/org/apache/maven/MavenTools.java:688587-696625,696644-699681
+/maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java:751453-767358

Modified: maven/components/branches/MNG-2766/maven-toolchain/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-toolchain/pom.xml?rev=767707&r1=767706&r2=767707&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-toolchain/pom.xml (original)
+++ maven/components/branches/MNG-2766/maven-toolchain/pom.xml Wed Apr 22 23:04:06 2009
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
   <!--
     Licensed to the Apache Software Foundation (ASF) under one or more
     contributor license agreements. See the NOTICE file distributed with
@@ -13,15 +14,20 @@
     License for the specific language governing permissions and
     limitations under the License.
   -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
     <version>3.0-SNAPSHOT</version>
   </parent>
-  <modelVersion>4.0.0</modelVersion>
+
   <artifactId>maven-toolchain</artifactId>
+
   <name>Maven Toolchains</name>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -32,9 +38,22 @@
       <artifactId>maven-compat</artifactId>
     </dependency>
   </dependencies>
+
   <build>
     <plugins>
       <plugin>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-component-metadata</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate-metadata</goal>
+              <goal>generate-test-metadata</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
         <executions>