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

[01/15] maven-resolver git commit: Bumped version to 1.0.1-SNAPSHOT in preparation for maintenance release [Forced Update!]

Repository: maven-resolver
Updated Branches:
  refs/heads/master 8cec8a788 -> b74f7a1e8 (forced update)


Bumped version to 1.0.1-SNAPSHOT in preparation for maintenance release


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/ed14a1aa
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/ed14a1aa
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/ed14a1aa

Branch: refs/heads/master
Commit: ed14a1aa0402ace48cbc0eafcb94e1f7c11e0788
Parents: e639814
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 14:41:19 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 14:41:19 2014 +0100

----------------------------------------------------------------------
 aether-api/pom.xml                 | 2 +-
 aether-connector-basic/pom.xml     | 2 +-
 aether-impl/pom.xml                | 2 +-
 aether-spi/pom.xml                 | 2 +-
 aether-test-util/pom.xml           | 2 +-
 aether-transport-classpath/pom.xml | 2 +-
 aether-transport-file/pom.xml      | 2 +-
 aether-transport-http/pom.xml      | 2 +-
 aether-transport-wagon/pom.xml     | 2 +-
 aether-util/pom.xml                | 2 +-
 pom.xml                            | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-api/pom.xml
----------------------------------------------------------------------
diff --git a/aether-api/pom.xml b/aether-api/pom.xml
index 35dd65b..b82e8bb 100644
--- a/aether-api/pom.xml
+++ b/aether-api/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-connector-basic/pom.xml
----------------------------------------------------------------------
diff --git a/aether-connector-basic/pom.xml b/aether-connector-basic/pom.xml
index ee208a8..35e7b92 100644
--- a/aether-connector-basic/pom.xml
+++ b/aether-connector-basic/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-connector-basic</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-impl/pom.xml
----------------------------------------------------------------------
diff --git a/aether-impl/pom.xml b/aether-impl/pom.xml
index 9627aff..bfb5388 100644
--- a/aether-impl/pom.xml
+++ b/aether-impl/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-impl</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-spi/pom.xml
----------------------------------------------------------------------
diff --git a/aether-spi/pom.xml b/aether-spi/pom.xml
index e9bd9fa..f244d8c 100644
--- a/aether-spi/pom.xml
+++ b/aether-spi/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-spi</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-test-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-test-util/pom.xml b/aether-test-util/pom.xml
index 84ec2a4..ef1bd40 100644
--- a/aether-test-util/pom.xml
+++ b/aether-test-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-test-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-transport-classpath/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-classpath/pom.xml b/aether-transport-classpath/pom.xml
index b980591..2a163f8 100644
--- a/aether-transport-classpath/pom.xml
+++ b/aether-transport-classpath/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-classpath</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-transport-file/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-file/pom.xml b/aether-transport-file/pom.xml
index 35bf5b1..64a5cff 100644
--- a/aether-transport-file/pom.xml
+++ b/aether-transport-file/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-file</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-transport-http/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-http/pom.xml b/aether-transport-http/pom.xml
index feb9adb..2ede8e1 100644
--- a/aether-transport-http/pom.xml
+++ b/aether-transport-http/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-http</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-transport-wagon/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/pom.xml b/aether-transport-wagon/pom.xml
index c021c93..ef3db48 100644
--- a/aether-transport-wagon/pom.xml
+++ b/aether-transport-wagon/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-wagon</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/aether-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-util/pom.xml b/aether-util/pom.xml
index 624f7d4..2de6f8e 100644
--- a/aether-util/pom.xml
+++ b/aether-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.0.v20140518</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/ed14a1aa/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 753916b..bae0c7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
 
   <groupId>org.eclipse.aether</groupId>
   <artifactId>aether</artifactId>
-  <version>1.0.0.v20140518</version>
+  <version>1.0.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Aether</name>


[13/15] maven-resolver git commit: 453221 represent missing dependencies in dependency tree

Posted by st...@apache.org.
453221 represent missing dependencies in dependency tree

Signed-off-by: Igor Fedorenko <ig...@ifedorenko.com>


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/f31b36ec
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/f31b36ec
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/f31b36ec

Branch: refs/heads/master
Commit: f31b36ec29136c242556e13a6bb800343655d774
Parents: 0f47b9c
Author: Igor Fedorenko <ig...@ifedorenko.com>
Authored: Tue Nov 25 13:17:30 2014 -0500
Committer: Igor Fedorenko <ig...@ifedorenko.com>
Committed: Wed Dec 10 08:45:36 2014 -0500

----------------------------------------------------------------------
 .../impl/DefaultDependencyCollector.java        | 20 +++++++++++++++-----
 .../expectedPartialSubtreeOnError.txt           |  7 ++++---
 2 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/f31b36ec/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
----------------------------------------------------------------------
diff --git a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
index 404897c..1bbc61d 100644
--- a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
+++ b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
@@ -447,8 +447,8 @@ public class DefaultDependencyCollector
                         getRemoteRepositories( rangeResult.getRepository( version ), repositories );
 
                     DefaultDependencyNode child =
-                        createDependencyNode( relocations, preManaged, rangeResult, version, d, descriptorResult, repos,
-                                              args.request.getRequestContext() );
+                        createDependencyNode( relocations, preManaged, rangeResult, version, d,
+                                              descriptorResult.getAliases(), repos, args.request.getRequestContext() );
 
                     node.getChildren().add( child );
 
@@ -460,6 +460,16 @@ public class DefaultDependencyCollector
                     }
                 }
             }
+            else
+            {
+                DependencyNode node = args.nodes.top();
+                List<RemoteRepository> repos =
+                    getRemoteRepositories( rangeResult.getRepository( version ), repositories );
+                DefaultDependencyNode child =
+                    createDependencyNode( relocations, preManaged, rangeResult, version, d, null, repos,
+                                          args.request.getRequestContext() );
+                node.getChildren().add( child );
+            }
         }
     }
 
@@ -544,7 +554,7 @@ public class DefaultDependencyCollector
     private static DefaultDependencyNode createDependencyNode( List<Artifact> relocations,
                                                                PremanagedDependency preManaged,
                                                                VersionRangeResult rangeResult, Version version,
-                                                               Dependency d, ArtifactDescriptorResult descriptorResult,
+                                                               Dependency d, Collection<Artifact> aliases,
                                                                List<RemoteRepository> repos, String requestContext )
     {
         DefaultDependencyNode child = new DefaultDependencyNode( d );
@@ -552,7 +562,7 @@ public class DefaultDependencyCollector
         child.setRelocations( relocations );
         child.setVersionConstraint( rangeResult.getVersionConstraint() );
         child.setVersion( version );
-        child.setAliases( descriptorResult.getAliases() );
+        child.setAliases( aliases );
         child.setRepositories( repos );
         child.setRequestContext( requestContext );
         return child;
@@ -565,7 +575,7 @@ public class DefaultDependencyCollector
                                                                DependencyNode cycleNode )
     {
         DefaultDependencyNode child =
-            createDependencyNode( relocations, preManaged, rangeResult, version, d, descriptorResult,
+            createDependencyNode( relocations, preManaged, rangeResult, version, d, descriptorResult.getAliases(),
                                   cycleNode.getRepositories(), cycleNode.getRequestContext() );
         child.setChildren( cycleNode.getChildren() );
         return child;

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/f31b36ec/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
----------------------------------------------------------------------
diff --git a/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt b/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
index badca5e..6ef2faf 100644
--- a/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
+++ b/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
@@ -1,5 +1,6 @@
 subtree:comparison:ext:error
 +- duplicate:transitive:ext:dependency compile
-   +- gid:aid:ext:ver compile
-   |  \- gid:aid2:ext:ver compile
-   \- gid:aid2:ext:ver compile
+|  +- gid:aid:ext:ver compile
+|  |  \- gid:aid2:ext:ver compile
+|  \- gid:aid2:ext:ver compile
+\- git:aid:ext:ver compile


[04/15] maven-resolver git commit: Bug 435715 - DefaultProxySelector does not process non-proxy hosts in a case-insensitive manner

Posted by st...@apache.org.
Bug 435715 - DefaultProxySelector does not process non-proxy hosts in a case-insensitive manner

Fixed implementation to use case-insensitive matching for non-proxy hosts


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/e1146705
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/e1146705
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/e1146705

Branch: refs/heads/master
Commit: e1146705481c20c4f74bd8965f558ef1b108b310
Parents: 336477e
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 14:52:53 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 14:52:53 2014 +0100

----------------------------------------------------------------------
 .../util/repository/DefaultProxySelector.java   |  4 +-
 .../repository/DefaultProxySelectorTest.java    | 43 +++++++++++++++-----
 2 files changed, 34 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/e1146705/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
----------------------------------------------------------------------
diff --git a/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java b/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
index fc30c55..3c5b03b 100644
--- a/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
+++ b/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
@@ -36,7 +36,7 @@ public final class DefaultProxySelector
      * a given repository will be used.
      * 
      * @param proxy The proxy definition to add, must not be {@code null}.
-     * @param nonProxyHosts The list of hosts to exclude from proxying, may be {@code null}.
+     * @param nonProxyHosts The list of (case-insensitive) host names to exclude from proxying, may be {@code null}.
      * @return This proxy selector for chaining, never {@code null}.
      */
     public DefaultProxySelector add( Proxy proxy, String nonProxyHosts )
@@ -105,7 +105,7 @@ public final class DefaultProxySelector
                 {
                     String pattern = tokenizer.nextToken();
                     pattern = pattern.replace( ".", "\\." ).replace( "*", ".*" );
-                    patterns.add( Pattern.compile( pattern ) );
+                    patterns.add( Pattern.compile( pattern, Pattern.CASE_INSENSITIVE ) );
                 }
             }
             this.patterns = patterns.toArray( new Pattern[patterns.size()] );

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/e1146705/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
----------------------------------------------------------------------
diff --git a/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java b/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
index 1da7ac6..5f06982 100644
--- a/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
+++ b/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
@@ -26,21 +26,42 @@ public class DefaultProxySelectorTest
     }
 
     @Test
-    public void testIsNonProxyHost()
+    public void testIsNonProxyHost_Blank()
     {
-        assertFalse( isNonProxyHost( "www.sonatype.org", null ) );
-        assertFalse( isNonProxyHost( "www.sonatype.org", "" ) );
+        assertFalse( isNonProxyHost( "www.eclipse.org", null ) );
+        assertFalse( isNonProxyHost( "www.eclipse.org", "" ) );
+    }
 
-        assertTrue( isNonProxyHost( "www.sonatype.org", "*" ) );
-        assertTrue( isNonProxyHost( "www.sonatype.org", "*.org" ) );
-        assertTrue( isNonProxyHost( "www.sonatype.org", "www.*" ) );
-        assertTrue( isNonProxyHost( "www.sonatype.org", "www.*.org" ) );
+    @Test
+    public void testIsNonProxyHost_Wildcard()
+    {
+        assertTrue( isNonProxyHost( "www.eclipse.org", "*" ) );
+        assertTrue( isNonProxyHost( "www.eclipse.org", "*.org" ) );
+        assertFalse( isNonProxyHost( "www.eclipse.org", "*.com" ) );
+        assertTrue( isNonProxyHost( "www.eclipse.org", "www.*" ) );
+        assertTrue( isNonProxyHost( "www.eclipse.org", "www.*.org" ) );
+    }
 
-        assertFalse( isNonProxyHost( "www.sonatype.org", "www.sonatype.com" ) );
-        assertFalse( isNonProxyHost( "www.sonatype.org", "*.com" ) );
-        assertFalse( isNonProxyHost( "www.sonatype.org", "sonatype.org" ) );
+    @Test
+    public void testIsNonProxyHost_Multiple()
+    {
+        assertTrue( isNonProxyHost( "eclipse.org", "eclipse.org|host2" ) );
+        assertTrue( isNonProxyHost( "eclipse.org", "host1|eclipse.org" ) );
+        assertTrue( isNonProxyHost( "eclipse.org", "host1|eclipse.org|host2" ) );
+    }
 
-        assertTrue( isNonProxyHost( "www.sonatype.org", "*.com|*.org" ) );
+    @Test
+    public void testIsNonProxyHost_Misc()
+    {
+        assertFalse( isNonProxyHost( "www.eclipse.org", "www.eclipse.com" ) );
+        assertFalse( isNonProxyHost( "www.eclipse.org", "eclipse.org" ) );
+    }
+
+    @Test
+    public void testIsNonProxyHost_CaseInsensitivity()
+    {
+        assertTrue( isNonProxyHost( "www.eclipse.org", "www.ECLIPSE.org" ) );
+        assertTrue( isNonProxyHost( "www.ECLIPSE.org", "www.eclipse.org" ) );
     }
 
 }


[11/15] maven-resolver git commit: [maven-release-plugin] prepare release aether-1.0.1.v20141111

Posted by st...@apache.org.
[maven-release-plugin] prepare release aether-1.0.1.v20141111


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/da9caa88
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/da9caa88
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/da9caa88

Branch: refs/heads/master
Commit: da9caa889f8240956dd455d5b93e28bdfff713bb
Parents: 65b3b0d
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:30:13 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:30:13 2014 +0100

----------------------------------------------------------------------
 aether-api/pom.xml                 | 2 +-
 aether-connector-basic/pom.xml     | 2 +-
 aether-impl/pom.xml                | 2 +-
 aether-spi/pom.xml                 | 2 +-
 aether-test-util/pom.xml           | 2 +-
 aether-transport-classpath/pom.xml | 2 +-
 aether-transport-file/pom.xml      | 2 +-
 aether-transport-http/pom.xml      | 2 +-
 aether-transport-wagon/pom.xml     | 2 +-
 aether-util/pom.xml                | 2 +-
 pom.xml                            | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-api/pom.xml
----------------------------------------------------------------------
diff --git a/aether-api/pom.xml b/aether-api/pom.xml
index b82e8bb..fe07653 100644
--- a/aether-api/pom.xml
+++ b/aether-api/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-connector-basic/pom.xml
----------------------------------------------------------------------
diff --git a/aether-connector-basic/pom.xml b/aether-connector-basic/pom.xml
index 35e7b92..747f9dc 100644
--- a/aether-connector-basic/pom.xml
+++ b/aether-connector-basic/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-connector-basic</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-impl/pom.xml
----------------------------------------------------------------------
diff --git a/aether-impl/pom.xml b/aether-impl/pom.xml
index bfb5388..cad3afd 100644
--- a/aether-impl/pom.xml
+++ b/aether-impl/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-impl</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-spi/pom.xml
----------------------------------------------------------------------
diff --git a/aether-spi/pom.xml b/aether-spi/pom.xml
index f244d8c..b817287 100644
--- a/aether-spi/pom.xml
+++ b/aether-spi/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-spi</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-test-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-test-util/pom.xml b/aether-test-util/pom.xml
index ef1bd40..d61a08c 100644
--- a/aether-test-util/pom.xml
+++ b/aether-test-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-test-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-transport-classpath/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-classpath/pom.xml b/aether-transport-classpath/pom.xml
index 2a163f8..41d0506 100644
--- a/aether-transport-classpath/pom.xml
+++ b/aether-transport-classpath/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-transport-classpath</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-transport-file/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-file/pom.xml b/aether-transport-file/pom.xml
index 64a5cff..40a2190 100644
--- a/aether-transport-file/pom.xml
+++ b/aether-transport-file/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-transport-file</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-transport-http/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-http/pom.xml b/aether-transport-http/pom.xml
index 5da76d2..e86dcc7 100644
--- a/aether-transport-http/pom.xml
+++ b/aether-transport-http/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-transport-http</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-transport-wagon/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/pom.xml b/aether-transport-wagon/pom.xml
index ef3db48..cfec521 100644
--- a/aether-transport-wagon/pom.xml
+++ b/aether-transport-wagon/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-transport-wagon</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/aether-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-util/pom.xml b/aether-util/pom.xml
index 2de6f8e..14a371e 100644
--- a/aether-util/pom.xml
+++ b/aether-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.1.v20141111</version>
   </parent>
 
   <artifactId>aether-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/da9caa88/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index bae0c7b..b8d235b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
 
   <groupId>org.eclipse.aether</groupId>
   <artifactId>aether</artifactId>
-  <version>1.0.1-SNAPSHOT</version>
+  <version>1.0.1.v20141111</version>
   <packaging>pom</packaging>
 
   <name>Aether</name>


[07/15] maven-resolver git commit: Bug 449590 - DefaultRepositoryCache.put() with null data fails to update cache

Posted by st...@apache.org.
Bug 449590 - DefaultRepositoryCache.put() with null data fails to update cache

Fixed DefaultRepositoryCache.put() to remove mapping if value is null


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/7a07539f
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/7a07539f
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/7a07539f

Branch: refs/heads/master
Commit: 7a07539f08e121277a0c30d9323e16aa515699ca
Parents: e6be118
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:07:40 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:07:40 2014 +0100

----------------------------------------------------------------------
 .../eclipse/aether/DefaultRepositoryCache.java  |   6 +-
 .../aether/DefaultRepositoryCacheTest.java      | 103 +++++++++++++++++++
 2 files changed, 108 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/7a07539f/aether-api/src/main/java/org/eclipse/aether/DefaultRepositoryCache.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/DefaultRepositoryCache.java b/aether-api/src/main/java/org/eclipse/aether/DefaultRepositoryCache.java
index 94664ea..12d2789 100644
--- a/aether-api/src/main/java/org/eclipse/aether/DefaultRepositoryCache.java
+++ b/aether-api/src/main/java/org/eclipse/aether/DefaultRepositoryCache.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2012 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,10 @@ public final class DefaultRepositoryCache
         {
             cache.put( key, data );
         }
+        else
+        {
+            cache.remove( key );
+        }
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/7a07539f/aether-api/src/test/java/org/eclipse/aether/DefaultRepositoryCacheTest.java
----------------------------------------------------------------------
diff --git a/aether-api/src/test/java/org/eclipse/aether/DefaultRepositoryCacheTest.java b/aether-api/src/test/java/org/eclipse/aether/DefaultRepositoryCacheTest.java
new file mode 100644
index 0000000..59dbd76
--- /dev/null
+++ b/aether-api/src/test/java/org/eclipse/aether/DefaultRepositoryCacheTest.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.aether;
+
+import static org.junit.Assert.*;
+
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.junit.Test;
+
+public class DefaultRepositoryCacheTest
+{
+
+    private DefaultRepositoryCache cache = new DefaultRepositoryCache();
+
+    private RepositorySystemSession session = new DefaultRepositorySystemSession();
+
+    private Object get( Object key )
+    {
+        return cache.get( session, key );
+    }
+
+    private void put( Object key, Object value )
+    {
+        cache.put( session, key, value );
+    }
+
+    @Test( expected = RuntimeException.class )
+    public void testGet_NullKey()
+    {
+        get( null );
+    }
+
+    @Test( expected = RuntimeException.class )
+    public void testPut_NullKey()
+    {
+        put( null, "data" );
+    }
+
+    @Test
+    public void testGetPut()
+    {
+        Object key = "key";
+        assertNull( get( key ) );
+        put( key, "value" );
+        assertEquals( "value", get( key ) );
+        put( key, "changed" );
+        assertEquals( "changed", get( key ) );
+        put( key, null );
+        assertNull( get( key ) );
+    }
+
+    @Test( timeout = 10000 )
+    public void testConcurrency()
+        throws Exception
+    {
+        final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
+        Thread threads[] = new Thread[20];
+        for ( int i = 0; i < threads.length; i++ )
+        {
+            threads[i] = new Thread()
+            {
+                @Override
+                public void run()
+                {
+                    for ( int i = 0; i < 100; i++ )
+                    {
+                        String key = UUID.randomUUID().toString();
+                        try
+                        {
+                            put( key, Boolean.TRUE );
+                            assertEquals( Boolean.TRUE, get( key ) );
+                        }
+                        catch ( Throwable t )
+                        {
+                            error.compareAndSet( null, t );
+                            t.printStackTrace();
+                        }
+                    }
+                }
+            };
+        }
+        for ( Thread thread : threads )
+        {
+            thread.start();
+        }
+        for ( Thread thread : threads )
+        {
+            thread.join();
+        }
+        assertNull( String.valueOf( error.get() ), error.get() );
+    }
+
+}


[03/15] maven-resolver git commit: Optimized non-proxy host matching in DefaultProxySelector

Posted by st...@apache.org.
Optimized non-proxy host matching in DefaultProxySelector


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/336477e6
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/336477e6
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/336477e6

Branch: refs/heads/master
Commit: 336477e64d8e6b036c57965663ce53687fd6e3b4
Parents: c05288d
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 14:51:10 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 14:51:10 2014 +0100

----------------------------------------------------------------------
 .../util/repository/DefaultProxySelector.java   | 48 +++++++++++++++-----
 .../repository/DefaultProxySelectorTest.java    | 28 ++++++------
 2 files changed, 50 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/336477e6/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
----------------------------------------------------------------------
diff --git a/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java b/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
index c761aa7..fc30c55 100644
--- a/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
+++ b/aether-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2013 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.StringTokenizer;
+import java.util.regex.Pattern;
 
 import org.eclipse.aether.repository.Proxy;
 import org.eclipse.aether.repository.ProxySelector;
@@ -40,6 +41,10 @@ public final class DefaultProxySelector
      */
     public DefaultProxySelector add( Proxy proxy, String nonProxyHosts )
     {
+        if ( proxy == null )
+        {
+            throw new IllegalArgumentException( "proxy not specified" );
+        }
         proxies.add( new ProxyDef( proxy, nonProxyHosts ) );
 
         return this;
@@ -52,7 +57,7 @@ public final class DefaultProxySelector
         String host = repository.getHost();
         for ( ProxyDef proxy : proxies )
         {
-            if ( !isNonProxyHosts( host, proxy.nonProxyHosts ) )
+            if ( !proxy.nonProxyHosts.isNonProxyHost( host ) )
             {
                 String key = proxy.proxy.getType().toLowerCase( Locale.ENGLISH );
                 if ( !candidates.containsKey( key ) )
@@ -86,22 +91,41 @@ public final class DefaultProxySelector
         return ( proxy != null ) ? proxy.proxy : null;
     }
 
-    static boolean isNonProxyHosts( String host, String nonProxyHosts )
+    static class NonProxyHosts
     {
-        if ( host != null && nonProxyHosts != null && nonProxyHosts.length() > 0 )
+
+        private final Pattern[] patterns;
+
+        public NonProxyHosts( String nonProxyHosts )
+        {
+            List<Pattern> patterns = new ArrayList<Pattern>();
+            if ( nonProxyHosts != null )
+            {
+                for ( StringTokenizer tokenizer = new StringTokenizer( nonProxyHosts, "|" ); tokenizer.hasMoreTokens(); )
+                {
+                    String pattern = tokenizer.nextToken();
+                    pattern = pattern.replace( ".", "\\." ).replace( "*", ".*" );
+                    patterns.add( Pattern.compile( pattern ) );
+                }
+            }
+            this.patterns = patterns.toArray( new Pattern[patterns.size()] );
+        }
+
+        boolean isNonProxyHost( String host )
         {
-            for ( StringTokenizer tokenizer = new StringTokenizer( nonProxyHosts, "|" ); tokenizer.hasMoreTokens(); )
+            if ( host != null )
             {
-                String pattern = tokenizer.nextToken();
-                pattern = pattern.replace( ".", "\\." ).replace( "*", ".*" );
-                if ( host.matches( pattern ) )
+                for ( Pattern pattern : patterns )
                 {
-                    return true;
+                    if ( pattern.matcher( host ).matches() )
+                    {
+                        return true;
+                    }
                 }
             }
+            return false;
         }
 
-        return false;
     }
 
     static class ProxyDef
@@ -109,12 +133,12 @@ public final class DefaultProxySelector
 
         final Proxy proxy;
 
-        final String nonProxyHosts;
+        final NonProxyHosts nonProxyHosts;
 
         public ProxyDef( Proxy proxy, String nonProxyHosts )
         {
             this.proxy = proxy;
-            this.nonProxyHosts = nonProxyHosts;
+            this.nonProxyHosts = new NonProxyHosts( nonProxyHosts );
         }
 
     }

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/336477e6/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
----------------------------------------------------------------------
diff --git a/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java b/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
index ef25a86..1da7ac6 100644
--- a/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
+++ b/aether-util/src/test/java/org/eclipse/aether/util/repository/DefaultProxySelectorTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,27 +20,27 @@ import org.junit.Test;
 public class DefaultProxySelectorTest
 {
 
-    private boolean isNonProxyHosts( String host, String nonProxyHosts )
+    private boolean isNonProxyHost( String host, String nonProxyHosts )
     {
-        return DefaultProxySelector.isNonProxyHosts( host, nonProxyHosts );
+        return new DefaultProxySelector.NonProxyHosts( nonProxyHosts ).isNonProxyHost( host );
     }
 
     @Test
-    public void testIsNonProxyHosts()
+    public void testIsNonProxyHost()
     {
-        assertFalse( isNonProxyHosts( "www.sonatype.org", null ) );
-        assertFalse( isNonProxyHosts( "www.sonatype.org", "" ) );
+        assertFalse( isNonProxyHost( "www.sonatype.org", null ) );
+        assertFalse( isNonProxyHost( "www.sonatype.org", "" ) );
 
-        assertTrue( isNonProxyHosts( "www.sonatype.org", "*" ) );
-        assertTrue( isNonProxyHosts( "www.sonatype.org", "*.org" ) );
-        assertTrue( isNonProxyHosts( "www.sonatype.org", "www.*" ) );
-        assertTrue( isNonProxyHosts( "www.sonatype.org", "www.*.org" ) );
+        assertTrue( isNonProxyHost( "www.sonatype.org", "*" ) );
+        assertTrue( isNonProxyHost( "www.sonatype.org", "*.org" ) );
+        assertTrue( isNonProxyHost( "www.sonatype.org", "www.*" ) );
+        assertTrue( isNonProxyHost( "www.sonatype.org", "www.*.org" ) );
 
-        assertFalse( isNonProxyHosts( "www.sonatype.org", "www.sonatype.com" ) );
-        assertFalse( isNonProxyHosts( "www.sonatype.org", "*.com" ) );
-        assertFalse( isNonProxyHosts( "www.sonatype.org", "sonatype.org" ) );
+        assertFalse( isNonProxyHost( "www.sonatype.org", "www.sonatype.com" ) );
+        assertFalse( isNonProxyHost( "www.sonatype.org", "*.com" ) );
+        assertFalse( isNonProxyHost( "www.sonatype.org", "sonatype.org" ) );
 
-        assertTrue( isNonProxyHosts( "www.sonatype.org", "*.com|*.org" ) );
+        assertTrue( isNonProxyHost( "www.sonatype.org", "*.com|*.org" ) );
     }
 
 }


[12/15] maven-resolver git commit: [maven-release-plugin] prepare for next development iteration

Posted by st...@apache.org.
[maven-release-plugin] prepare for next development iteration


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/0f47b9c3
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/0f47b9c3
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/0f47b9c3

Branch: refs/heads/master
Commit: 0f47b9c3c898e10df2c333df85a5a8fb62714958
Parents: da9caa8
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:30:19 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:30:19 2014 +0100

----------------------------------------------------------------------
 aether-api/pom.xml                 | 2 +-
 aether-connector-basic/pom.xml     | 2 +-
 aether-impl/pom.xml                | 2 +-
 aether-spi/pom.xml                 | 2 +-
 aether-test-util/pom.xml           | 2 +-
 aether-transport-classpath/pom.xml | 2 +-
 aether-transport-file/pom.xml      | 2 +-
 aether-transport-http/pom.xml      | 2 +-
 aether-transport-wagon/pom.xml     | 2 +-
 aether-util/pom.xml                | 2 +-
 pom.xml                            | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-api/pom.xml
----------------------------------------------------------------------
diff --git a/aether-api/pom.xml b/aether-api/pom.xml
index fe07653..16d4bfb 100644
--- a/aether-api/pom.xml
+++ b/aether-api/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-connector-basic/pom.xml
----------------------------------------------------------------------
diff --git a/aether-connector-basic/pom.xml b/aether-connector-basic/pom.xml
index 747f9dc..4ba6010 100644
--- a/aether-connector-basic/pom.xml
+++ b/aether-connector-basic/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-connector-basic</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-impl/pom.xml
----------------------------------------------------------------------
diff --git a/aether-impl/pom.xml b/aether-impl/pom.xml
index cad3afd..2342a58 100644
--- a/aether-impl/pom.xml
+++ b/aether-impl/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-impl</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-spi/pom.xml
----------------------------------------------------------------------
diff --git a/aether-spi/pom.xml b/aether-spi/pom.xml
index b817287..a13aeff 100644
--- a/aether-spi/pom.xml
+++ b/aether-spi/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-spi</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-test-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-test-util/pom.xml b/aether-test-util/pom.xml
index d61a08c..f0c8e0c 100644
--- a/aether-test-util/pom.xml
+++ b/aether-test-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-test-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-transport-classpath/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-classpath/pom.xml b/aether-transport-classpath/pom.xml
index 41d0506..2ff4f9c 100644
--- a/aether-transport-classpath/pom.xml
+++ b/aether-transport-classpath/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-classpath</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-transport-file/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-file/pom.xml b/aether-transport-file/pom.xml
index 40a2190..a8ed465 100644
--- a/aether-transport-file/pom.xml
+++ b/aether-transport-file/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-file</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-transport-http/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-http/pom.xml b/aether-transport-http/pom.xml
index e86dcc7..2a48ee1 100644
--- a/aether-transport-http/pom.xml
+++ b/aether-transport-http/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-http</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-transport-wagon/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/pom.xml b/aether-transport-wagon/pom.xml
index cfec521..56218c2 100644
--- a/aether-transport-wagon/pom.xml
+++ b/aether-transport-wagon/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-wagon</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/aether-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-util/pom.xml b/aether-util/pom.xml
index 14a371e..32b8e64 100644
--- a/aether-util/pom.xml
+++ b/aether-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.1.v20141111</version>
+    <version>1.0.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/0f47b9c3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b8d235b..26998f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
 
   <groupId>org.eclipse.aether</groupId>
   <artifactId>aether</artifactId>
-  <version>1.0.1.v20141111</version>
+  <version>1.0.2-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Aether</name>


[15/15] maven-resolver git commit: [maven-release-plugin] prepare for next development iteration

Posted by st...@apache.org.
[maven-release-plugin] prepare for next development iteration


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/b74f7a1e
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/b74f7a1e
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/b74f7a1e

Branch: refs/heads/master
Commit: b74f7a1e8837875b4780199f644119f55d22465d
Parents: 8092eae
Author: Igor Fedorenko <ig...@ifedorenko.com>
Authored: Wed Jan 14 07:56:18 2015 -0500
Committer: Igor Fedorenko <ig...@ifedorenko.com>
Committed: Wed Jan 14 07:56:18 2015 -0500

----------------------------------------------------------------------
 aether-api/pom.xml                 | 2 +-
 aether-connector-basic/pom.xml     | 2 +-
 aether-impl/pom.xml                | 2 +-
 aether-spi/pom.xml                 | 2 +-
 aether-test-util/pom.xml           | 2 +-
 aether-transport-classpath/pom.xml | 2 +-
 aether-transport-file/pom.xml      | 2 +-
 aether-transport-http/pom.xml      | 2 +-
 aether-transport-wagon/pom.xml     | 2 +-
 aether-util/pom.xml                | 2 +-
 pom.xml                            | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-api/pom.xml
----------------------------------------------------------------------
diff --git a/aether-api/pom.xml b/aether-api/pom.xml
index 66da780..7d2aaf0 100644
--- a/aether-api/pom.xml
+++ b/aether-api/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-connector-basic/pom.xml
----------------------------------------------------------------------
diff --git a/aether-connector-basic/pom.xml b/aether-connector-basic/pom.xml
index 302e232..e8e32fc 100644
--- a/aether-connector-basic/pom.xml
+++ b/aether-connector-basic/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-connector-basic</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-impl/pom.xml
----------------------------------------------------------------------
diff --git a/aether-impl/pom.xml b/aether-impl/pom.xml
index 9eaa08e..5bae016 100644
--- a/aether-impl/pom.xml
+++ b/aether-impl/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-impl</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-spi/pom.xml
----------------------------------------------------------------------
diff --git a/aether-spi/pom.xml b/aether-spi/pom.xml
index db006e5..68e3d00 100644
--- a/aether-spi/pom.xml
+++ b/aether-spi/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-spi</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-test-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-test-util/pom.xml b/aether-test-util/pom.xml
index e594bf3..a923172 100644
--- a/aether-test-util/pom.xml
+++ b/aether-test-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-test-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-transport-classpath/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-classpath/pom.xml b/aether-transport-classpath/pom.xml
index 0513583..690557b 100644
--- a/aether-transport-classpath/pom.xml
+++ b/aether-transport-classpath/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-classpath</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-transport-file/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-file/pom.xml b/aether-transport-file/pom.xml
index 3ea5988..f717d5f 100644
--- a/aether-transport-file/pom.xml
+++ b/aether-transport-file/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-file</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-transport-http/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-http/pom.xml b/aether-transport-http/pom.xml
index 8ad59af..8e207d0 100644
--- a/aether-transport-http/pom.xml
+++ b/aether-transport-http/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-http</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-transport-wagon/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/pom.xml b/aether-transport-wagon/pom.xml
index b0bf3a1..5084606 100644
--- a/aether-transport-wagon/pom.xml
+++ b/aether-transport-wagon/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-transport-wagon</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/aether-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-util/pom.xml b/aether-util/pom.xml
index 4e66290..f43956c 100644
--- a/aether-util/pom.xml
+++ b/aether-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2.v20150114</version>
+    <version>1.0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>aether-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/b74f7a1e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b53095d..c18b34f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
 
   <groupId>org.eclipse.aether</groupId>
   <artifactId>aether</artifactId>
-  <version>1.0.2.v20150114</version>
+  <version>1.0.3-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Aether</name>


[05/15] maven-resolver git commit: Bug 445283 - HTTP transporter can mistake server authentication for proxy authentication

Posted by st...@apache.org.
Bug 445283 - HTTP transporter can mistake server authentication for proxy authentication

Stored server and proxy credentials in separate providers and used new DemuxCredentialsProvider to delegate to one of those providers depending on host in auth request


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/535df408
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/535df408
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/535df408

Branch: refs/heads/master
Commit: 535df4084a29e9aa91a7d0bbeac5a5e6e7948454
Parents: e114670
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:00:35 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:00:35 2014 +0100

----------------------------------------------------------------------
 .../http/DemuxCredentialsProvider.java          | 67 ++++++++++++++++++++
 .../aether/transport/http/HttpTransporter.java  | 28 +++++---
 .../transport/http/HttpTransporterTest.java     | 42 +++++++++++-
 3 files changed, 126 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/535df408/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/DemuxCredentialsProvider.java
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/DemuxCredentialsProvider.java b/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/DemuxCredentialsProvider.java
new file mode 100644
index 0000000..4b89639
--- /dev/null
+++ b/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/DemuxCredentialsProvider.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.aether.transport.http;
+
+import org.apache.http.HttpHost;
+import org.apache.http.auth.AuthScope;
+import org.apache.http.auth.Credentials;
+import org.apache.http.client.CredentialsProvider;
+
+/**
+ * Credentials provider that helps to isolate server from proxy credentials. Apache HttpClient uses a single provider
+ * for both server and proxy auth, using the auth scope (host, port, etc.) to select the proper credentials. With regard
+ * to redirects, we use an auth scope for server credentials that's not specific enough to not be mistaken for proxy
+ * auth. This provider helps to maintain the proper isolation.
+ */
+final class DemuxCredentialsProvider
+    implements CredentialsProvider
+{
+
+    private final CredentialsProvider serverCredentialsProvider;
+
+    private final CredentialsProvider proxyCredentialsProvider;
+
+    private final HttpHost proxy;
+
+    public DemuxCredentialsProvider( CredentialsProvider serverCredentialsProvider,
+                                     CredentialsProvider proxyCredentialsProvider, HttpHost proxy )
+    {
+        this.serverCredentialsProvider = serverCredentialsProvider;
+        this.proxyCredentialsProvider = proxyCredentialsProvider;
+        this.proxy = proxy;
+    }
+
+    private CredentialsProvider getDelegate( AuthScope authScope )
+    {
+        if ( proxy.getPort() == authScope.getPort() && proxy.getHostName().equalsIgnoreCase( authScope.getHost() ) )
+        {
+            return proxyCredentialsProvider;
+        }
+        return serverCredentialsProvider;
+    }
+
+    public Credentials getCredentials( AuthScope authScope )
+    {
+        return getDelegate( authScope ).getCredentials( authScope );
+    }
+
+    public void setCredentials( AuthScope authScope, Credentials credentials )
+    {
+        getDelegate( authScope ).setCredentials( authScope, credentials );
+    }
+
+    public void clear()
+    {
+        serverCredentialsProvider.clear();
+        proxyCredentialsProvider.clear();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/535df408/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java b/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java
index 1eda25e..001d760 100644
--- a/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java
+++ b/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 Sonatype, Inc.
+ * Copyright (c) 2013, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.params.AuthParams;
+import org.apache.http.client.CredentialsProvider;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.HttpResponseException;
 import org.apache.http.client.methods.HttpGet;
@@ -134,13 +135,7 @@ final class HttpTransporter
 
         configureClient( client.getParams(), session, repository, proxy );
 
-        DeferredCredentialsProvider credsProvider = new DeferredCredentialsProvider();
-        addCredentials( credsProvider, server.getHostName(), AuthScope.ANY_PORT, repoAuthContext );
-        if ( proxy != null )
-        {
-            addCredentials( credsProvider, proxy.getHostName(), proxy.getPort(), proxyAuthContext );
-        }
-        client.setCredentialsProvider( credsProvider );
+        client.setCredentialsProvider( toCredentialsProvider( server, repoAuthContext, proxy, proxyAuthContext ) );
 
         this.client = new DecompressingHttpClient( client );
     }
@@ -182,9 +177,21 @@ final class HttpTransporter
                                                                         ConfigurationProperties.USER_AGENT ) );
     }
 
-    private static void addCredentials( DeferredCredentialsProvider provider, String host, int port,
-                                        AuthenticationContext ctx )
+    private static CredentialsProvider toCredentialsProvider( HttpHost server, AuthenticationContext serverAuthCtx,
+                                                              HttpHost proxy, AuthenticationContext proxyAuthCtx )
+    {
+        CredentialsProvider provider = toCredentialsProvider( server.getHostName(), AuthScope.ANY_PORT, serverAuthCtx );
+        if ( proxy != null )
+        {
+            CredentialsProvider p = toCredentialsProvider( proxy.getHostName(), proxy.getPort(), proxyAuthCtx );
+            provider = new DemuxCredentialsProvider( provider, p, proxy );
+        }
+        return provider;
+    }
+
+    private static CredentialsProvider toCredentialsProvider( String host, int port, AuthenticationContext ctx )
     {
+        DeferredCredentialsProvider provider = new DeferredCredentialsProvider();
         if ( ctx != null )
         {
             AuthScope basicScope = new AuthScope( host, port );
@@ -193,6 +200,7 @@ final class HttpTransporter
             AuthScope ntlmScope = new AuthScope( host, port, AuthScope.ANY_REALM, "ntlm" );
             provider.setCredentials( ntlmScope, new DeferredCredentialsProvider.NtlmFactory( ctx ) );
         }
+        return provider;
     }
 
     LocalState getState()

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/535df408/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java b/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
index 16fe0c4..1c85c38 100644
--- a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
+++ b/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 Sonatype, Inc.
+ * Copyright (c) 2013, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1042,6 +1042,46 @@ public class HttpTransporterTest
     }
 
     @Test
+    public void testServerAuthScope_NotUsedForProxy()
+        throws Exception
+    {
+        String username = "testuser", password = "testpass";
+        httpServer.setProxyAuthentication( username, password );
+        auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
+        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
+        newTransporter( "http://" + httpServer.getHost() + ":12/" );
+        try
+        {
+            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
+            fail( "Server auth must not be used as proxy auth" );
+        }
+        catch ( HttpResponseException e )
+        {
+            assertEquals( 407, e.getStatusCode() );
+        }
+    }
+
+    @Test
+    public void testProxyAuthScope_NotUsedForServer()
+        throws Exception
+    {
+        String username = "testuser", password = "testpass";
+        httpServer.setAuthentication( username, password );
+        Authentication auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
+        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort(), auth );
+        newTransporter( "http://" + httpServer.getHost() + ":12/" );
+        try
+        {
+            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
+            fail( "Proxy auth must not be used as server auth" );
+        }
+        catch ( HttpResponseException e )
+        {
+            assertEquals( 401, e.getStatusCode() );
+        }
+    }
+
+    @Test
     public void testAuthSchemeReuse()
         throws Exception
     {


[02/15] maven-resolver git commit: Bug 450948 - Widen version range for package imports in aether-transport-http to allow wiring against httpclient 4.3.x

Posted by st...@apache.org.
Bug 450948 - Widen version range for package imports in aether-transport-http to allow wiring against httpclient 4.3.x

Updated upper version bound in instructions for maven-bundle-plugin


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/c05288dc
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/c05288dc
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/c05288dc

Branch: refs/heads/master
Commit: c05288dc3aff63ccdcf95b89a7c1c77731edde65
Parents: ed14a1a
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 14:42:55 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 14:42:55 2014 +0100

----------------------------------------------------------------------
 aether-transport-http/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/c05288dc/aether-transport-http/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-http/pom.xml b/aether-transport-http/pom.xml
index 2ede8e1..5da76d2 100644
--- a/aether-transport-http/pom.xml
+++ b/aether-transport-http/pom.xml
@@ -117,7 +117,7 @@
         <artifactId>maven-bundle-plugin</artifactId>
         <configuration>
           <instructions>
-            <Import-Package>org.apache.http.*;version="[4.2.1,4.3)",*</Import-Package>
+            <Import-Package>org.apache.http.*;version="[4.2.1,4.4)",*</Import-Package>
           </instructions>
         </configuration>
       </plugin>


[06/15] maven-resolver git commit: Bug 448409 - Output being spammed with "Using mirror ..." messages when running Maven with -X option

Posted by st...@apache.org.
Bug 448409 - Output being spammed with "Using mirror ..." messages when running Maven with -X option

Reduced debug logging for mirror selection to log a given repository pair only once per session


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/e6be118d
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/e6be118d
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/e6be118d

Branch: refs/heads/master
Commit: e6be118d62c465f4622bd59a6d7750c971ac9da6
Parents: 535df40
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:04:58 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:04:58 2014 +0100

----------------------------------------------------------------------
 .../impl/DefaultRemoteRepositoryManager.java    | 58 +++++++++++++++++++-
 1 file changed, 56 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/e6be118d/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRemoteRepositoryManager.java
----------------------------------------------------------------------
diff --git a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRemoteRepositoryManager.java b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRemoteRepositoryManager.java
index ccb618a..8a54d62 100644
--- a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRemoteRepositoryManager.java
+++ b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRemoteRepositoryManager.java
@@ -11,12 +11,14 @@
 package org.eclipse.aether.internal.impl;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.ListIterator;
 
 import javax.inject.Inject;
 import javax.inject.Named;
 
+import org.eclipse.aether.RepositoryCache;
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.impl.RemoteRepositoryManager;
 import org.eclipse.aether.impl.UpdatePolicyAnalyzer;
@@ -42,6 +44,39 @@ public class DefaultRemoteRepositoryManager
     implements RemoteRepositoryManager, Service
 {
 
+    private static final class LoggedMirror
+    {
+
+        private final Object[] keys;
+
+        public LoggedMirror( RemoteRepository original, RemoteRepository mirror )
+        {
+            keys = new Object[] { mirror.getId(), mirror.getUrl(), original.getId(), original.getUrl() };
+        }
+
+        @Override
+        public boolean equals( Object obj )
+        {
+            if ( this == obj )
+            {
+                return true;
+            }
+            else if ( !( obj instanceof LoggedMirror ) )
+            {
+                return false;
+            }
+            LoggedMirror that = (LoggedMirror) obj;
+            return Arrays.equals( keys, that.keys );
+        }
+
+        @Override
+        public int hashCode()
+        {
+            return Arrays.hashCode( keys );
+        }
+
+    }
+
     private Logger logger = NullLoggerFactory.LOGGER;
 
     private UpdatePolicyAnalyzer updatePolicyAnalyzer;
@@ -121,8 +156,7 @@ public class DefaultRemoteRepositoryManager
 
                 if ( mirrorRepository != null )
                 {
-                    logger.debug( "Using mirror " + mirrorRepository.getId() + " (" + mirrorRepository.getUrl()
-                        + ") for " + recessiveRepository.getId() + " (" + recessiveRepository.getUrl() + ")." );
+                    logMirror( session, recessiveRepository, mirrorRepository );
                     repository = mirrorRepository;
                 }
             }
@@ -179,6 +213,26 @@ public class DefaultRemoteRepositoryManager
         return result;
     }
 
+    private void logMirror( RepositorySystemSession session, RemoteRepository original, RemoteRepository mirror )
+    {
+        if ( !logger.isDebugEnabled() )
+        {
+            return;
+        }
+        RepositoryCache cache = session.getCache();
+        if ( cache != null )
+        {
+            Object key = new LoggedMirror( original, mirror );
+            if ( cache.get( session, key ) != null )
+            {
+                return;
+            }
+            cache.put( session, key, Boolean.TRUE );
+        }
+        logger.debug( "Using mirror " + mirror.getId() + " (" + mirror.getUrl() + ") for " + original.getId() + " ("
+            + original.getUrl() + ")." );
+    }
+
     private String getKey( RemoteRepository repository )
     {
         return repository.getId();


[14/15] maven-resolver git commit: [maven-release-plugin] prepare release aether-1.0.2.v20150114

Posted by st...@apache.org.
[maven-release-plugin] prepare release aether-1.0.2.v20150114


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/8092eaec
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/8092eaec
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/8092eaec

Branch: refs/heads/master
Commit: 8092eaecbd34bd7bf18f49cb8a99bd218fb6e30e
Parents: f31b36e
Author: Igor Fedorenko <ig...@ifedorenko.com>
Authored: Wed Jan 14 07:56:17 2015 -0500
Committer: Igor Fedorenko <ig...@ifedorenko.com>
Committed: Wed Jan 14 07:56:17 2015 -0500

----------------------------------------------------------------------
 aether-api/pom.xml                 | 2 +-
 aether-connector-basic/pom.xml     | 2 +-
 aether-impl/pom.xml                | 2 +-
 aether-spi/pom.xml                 | 2 +-
 aether-test-util/pom.xml           | 2 +-
 aether-transport-classpath/pom.xml | 2 +-
 aether-transport-file/pom.xml      | 2 +-
 aether-transport-http/pom.xml      | 2 +-
 aether-transport-wagon/pom.xml     | 2 +-
 aether-util/pom.xml                | 2 +-
 pom.xml                            | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-api/pom.xml
----------------------------------------------------------------------
diff --git a/aether-api/pom.xml b/aether-api/pom.xml
index 16d4bfb..66da780 100644
--- a/aether-api/pom.xml
+++ b/aether-api/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-api</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-connector-basic/pom.xml
----------------------------------------------------------------------
diff --git a/aether-connector-basic/pom.xml b/aether-connector-basic/pom.xml
index 4ba6010..302e232 100644
--- a/aether-connector-basic/pom.xml
+++ b/aether-connector-basic/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-connector-basic</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-impl/pom.xml
----------------------------------------------------------------------
diff --git a/aether-impl/pom.xml b/aether-impl/pom.xml
index 2342a58..9eaa08e 100644
--- a/aether-impl/pom.xml
+++ b/aether-impl/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-impl</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-spi/pom.xml
----------------------------------------------------------------------
diff --git a/aether-spi/pom.xml b/aether-spi/pom.xml
index a13aeff..db006e5 100644
--- a/aether-spi/pom.xml
+++ b/aether-spi/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-spi</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-test-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-test-util/pom.xml b/aether-test-util/pom.xml
index f0c8e0c..e594bf3 100644
--- a/aether-test-util/pom.xml
+++ b/aether-test-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-test-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-transport-classpath/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-classpath/pom.xml b/aether-transport-classpath/pom.xml
index 2ff4f9c..0513583 100644
--- a/aether-transport-classpath/pom.xml
+++ b/aether-transport-classpath/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-transport-classpath</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-transport-file/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-file/pom.xml b/aether-transport-file/pom.xml
index a8ed465..3ea5988 100644
--- a/aether-transport-file/pom.xml
+++ b/aether-transport-file/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-transport-file</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-transport-http/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-http/pom.xml b/aether-transport-http/pom.xml
index 2a48ee1..8ad59af 100644
--- a/aether-transport-http/pom.xml
+++ b/aether-transport-http/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-transport-http</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-transport-wagon/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/pom.xml b/aether-transport-wagon/pom.xml
index 56218c2..b0bf3a1 100644
--- a/aether-transport-wagon/pom.xml
+++ b/aether-transport-wagon/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-transport-wagon</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/aether-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-util/pom.xml b/aether-util/pom.xml
index 32b8e64..4e66290 100644
--- a/aether-util/pom.xml
+++ b/aether-util/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.aether</groupId>
     <artifactId>aether</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
+    <version>1.0.2.v20150114</version>
   </parent>
 
   <artifactId>aether-util</artifactId>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8092eaec/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 26998f7..b53095d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
 
   <groupId>org.eclipse.aether</groupId>
   <artifactId>aether</artifactId>
-  <version>1.0.2-SNAPSHOT</version>
+  <version>1.0.2.v20150114</version>
   <packaging>pom</packaging>
 
   <name>Aether</name>


[10/15] maven-resolver git commit: Polished/extended API docs

Posted by st...@apache.org.
Polished/extended API docs


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/65b3b0d5
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/65b3b0d5
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/65b3b0d5

Branch: refs/heads/master
Commit: 65b3b0d520617cfac99381c93620c4b236a8c93a
Parents: 8f0a04d
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:15:08 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:15:08 2014 +0100

----------------------------------------------------------------------
 .../aether/DefaultRepositorySystemSession.java  | 30 +++++++++++++-------
 .../org/eclipse/aether/RepositoryCache.java     | 17 ++++++-----
 .../java/org/eclipse/aether/SessionData.java    | 16 ++++++-----
 .../collection/DependencyGraphTransformer.java  | 11 +++++--
 .../aether/collection/DependencyManager.java    | 11 ++++---
 .../aether/collection/DependencySelector.java   | 11 ++++---
 .../aether/collection/DependencyTraverser.java  | 11 ++++---
 .../aether/collection/VersionFilter.java        | 13 +++++----
 .../aether/version/VersionConstraint.java       |  8 +++---
 .../spi/connector/layout/RepositoryLayout.java  |  7 +++--
 .../graph/transformer/ConflictResolver.java     | 26 +++++++++++------
 11 files changed, 100 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java b/aether-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
index 194a661..363ede6 100644
--- a/aether-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
+++ b/aether-api/src/main/java/org/eclipse/aether/DefaultRepositorySystemSession.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2013 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,10 +36,12 @@ import org.eclipse.aether.resolution.ResolutionErrorPolicy;
 import org.eclipse.aether.transfer.TransferListener;
 
 /**
- * A simple repository system session. <em>Note:</em> This class is not thread-safe. It is assumed that the mutators get
- * only called during an initialization phase and that the session itself is not changed when being used by the
- * repository system. It is recommended to call {@link #setReadOnly()} once the session has been fully initialized to
- * prevent accidental manipulation of it afterwards.
+ * A simple repository system session.
+ * <p>
+ * <strong>Note:</strong> This class is not thread-safe. It is assumed that the mutators get only called during an
+ * initialization phase and that the session itself is not changed once initialized and being used by the repository
+ * system. It is recommended to call {@link #setReadOnly()} once the session has been fully initialized to prevent
+ * accidental manipulation of it afterwards.
  */
 public final class DefaultRepositorySystemSession
     implements RepositorySystemSession
@@ -123,7 +125,9 @@ public final class DefaultRepositorySystemSession
 
     /**
      * Creates a shallow copy of the specified session. Actually, the copy is not completely shallow, all maps holding
-     * properties are copied as well. In other words, mutating the new session has no effect on the original session.
+     * system/user/config properties are copied as well. In other words, invoking any mutator on the new session itself
+     * has no effect on the original session. Other mutable objects like the session data and cache (if any) are not
+     * copied and will be shared with the original session unless reconfigured.
      * 
      * @param session The session to copy, must not be {@code null}.
      */
@@ -395,6 +399,7 @@ public final class DefaultRepositorySystemSession
     /**
      * Sets the system properties to use, e.g. for processing of artifact descriptors. System properties are usually
      * collected from the runtime environment like {@link System#getProperties()} and environment variables.
+     * <p>
      * <em>Note:</em> System properties are of type {@code Map<String, String>} and any key-value pair in the input map
      * that doesn't match this type will be silently ignored.
      * 
@@ -438,8 +443,10 @@ public final class DefaultRepositorySystemSession
     /**
      * Sets the user properties to use, e.g. for processing of artifact descriptors. User properties are similar to
      * system properties but are set on the discretion of the user and hence are considered of higher priority than
-     * system properties. <em>Note:</em> User properties are of type {@code Map<String, String>} and any key-value pair
-     * in the input map that doesn't match this type will be silently ignored.
+     * system properties in case of conflicts.
+     * <p>
+     * <em>Note:</em> User properties are of type {@code Map<String, String>} and any key-value pair in the input map
+     * that doesn't match this type will be silently ignored.
      * 
      * @param userProperties The user properties, may be {@code null} or empty if none.
      * @return This session for chaining, never {@code null}.
@@ -480,9 +487,10 @@ public final class DefaultRepositorySystemSession
 
     /**
      * Sets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling,
-     * connector-specific behavior, etc.) <em>Note:</em> Configuration properties are of type
-     * {@code Map<String, Object>} and any key-value pair in the input map that doesn't match this type will be silently
-     * ignored.
+     * connector-specific behavior, etc.).
+     * <p>
+     * <em>Note:</em> Configuration properties are of type {@code Map<String, Object>} and any key-value pair in the
+     * input map that doesn't match this type will be silently ignored.
      * 
      * @param configProperties The configuration properties, may be {@code null} or empty if none.
      * @return This session for chaining, never {@code null}.

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/RepositoryCache.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/RepositoryCache.java b/aether-api/src/main/java/org/eclipse/aether/RepositoryCache.java
index 95dbdfe..7363844 100644
--- a/aether-api/src/main/java/org/eclipse/aether/RepositoryCache.java
+++ b/aether-api/src/main/java/org/eclipse/aether/RepositoryCache.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2012 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,9 +23,10 @@ public interface RepositoryCache
     /**
      * Puts the specified data into the cache. It is entirely up to the cache implementation how long this data will be
      * kept before being purged, i.e. callers must not make any assumptions about the lifetime of cached data.
-     * <strong>Warning:</strong> The cache will directly save the provided reference. If the cached data is mutable,
-     * i.e. could be modified after being put into the cache, the caller is responsible for creating a copy of the
-     * original data and store the copy in the cache.
+     * <p>
+     * <em>Warning:</em> The cache will directly save the provided reference. If the cached data is mutable, i.e. could
+     * be modified after being put into the cache, the caller is responsible for creating a copy of the original data
+     * and store the copy in the cache.
      * 
      * @param session The repository session during which the cache is accessed, must not be {@code null}.
      * @param key The key to use for lookup of the data, must not be {@code null}.
@@ -34,9 +35,11 @@ public interface RepositoryCache
     void put( RepositorySystemSession session, Object key, Object data );
 
     /**
-     * Gets the specified data from the cache. <strong>Warning:</strong> The cache will directly return the saved
-     * reference. If the cached data is to be modified after its retrieval, the caller is responsible to create a copy
-     * of the returned data and use this instead of the cache record.
+     * Gets the specified data from the cache.
+     * <p>
+     * <em>Warning:</em> The cache will directly return the saved reference. If the cached data is to be modified after
+     * its retrieval, the caller is responsible to create a copy of the returned data and use this instead of the cache
+     * record.
      * 
      * @param session The repository session during which the cache is accessed, must not be {@code null}.
      * @param key The key to use for lookup of the data, must not be {@code null}.

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/SessionData.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/SessionData.java b/aether-api/src/main/java/org/eclipse/aether/SessionData.java
index a594d41..92930e7 100644
--- a/aether-api/src/main/java/org/eclipse/aether/SessionData.java
+++ b/aether-api/src/main/java/org/eclipse/aether/SessionData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2012 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,10 +12,12 @@ package org.eclipse.aether;
 
 /**
  * A container for data that is specific to a repository system session. Both components within the repository system
- * and clients of the system may use this storage to associate arbitrary data with a session. Unlike a cache, this
- * session data is not subject to purging. For this same reason, session data should also not be abused as a cache (i.e.
- * for storing values that can be re-calculated) to avoid memory exhaustion. <strong>Note:</strong> Actual
- * implementations must be thread-safe.
+ * and clients of the system may use this storage to associate arbitrary data with a session.
+ * <p>
+ * Unlike a cache, this session data is not subject to purging. For this same reason, session data should also not be
+ * abused as a cache (i.e. for storing values that can be re-calculated) to avoid memory exhaustion.
+ * <p>
+ * <strong>Note:</strong> Actual implementations must be thread-safe.
  * 
  * @see RepositorySystemSession#getData()
  * @noimplement This interface is not intended to be implemented by clients.
@@ -39,8 +41,8 @@ public interface SessionData
      * @param key The key under which to store the session data, must not be {@code null}.
      * @param oldValue The expected data currently associated with the key, may be {@code null}.
      * @param newValue The data to associate with the key, may be {@code null} to remove the mapping.
-     * @return {@code true} if the key mapping was updated to the specified value, {@code false} if the current key
-     *         mapping didn't match the expected value and was not updated.
+     * @return {@code true} if the key mapping was successfully updated from the old value to the new value,
+     *         {@code false} if the current key mapping didn't match the expected value and was not updated.
      */
     boolean set( Object key, Object oldValue, Object newValue );
 

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/collection/DependencyGraphTransformer.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/collection/DependencyGraphTransformer.java b/aether-api/src/main/java/org/eclipse/aether/collection/DependencyGraphTransformer.java
index 22f9498..b3deebe 100644
--- a/aether-api/src/main/java/org/eclipse/aether/collection/DependencyGraphTransformer.java
+++ b/aether-api/src/main/java/org/eclipse/aether/collection/DependencyGraphTransformer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2012 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,13 @@ import org.eclipse.aether.RepositoryException;
 import org.eclipse.aether.graph.DependencyNode;
 
 /**
- * Transforms a given dependency graph. <em>Note:</em> Dependency graphs may contain cycles, as such a graph transformer
- * needs to gracefully handle cyclic graphs, e.g. guard against infinite recursion. Implementations must be stateless.
+ * Transforms a given dependency graph.
+ * <p>
+ * <strong>Note:</strong> Implementations must be stateless.
+ * <p>
+ * <em>Warning:</em> Dependency graphs may generally contain cycles. As such a graph transformer that cannot assume for
+ * sure that cycles have already been eliminated must gracefully handle cyclic graphs, e.g. guard against infinite
+ * recursion.
  * 
  * @see org.eclipse.aether.RepositorySystemSession#getDependencyGraphTransformer()
  */

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/collection/DependencyManager.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/collection/DependencyManager.java b/aether-api/src/main/java/org/eclipse/aether/collection/DependencyManager.java
index 3ee6b0e..e214f66 100644
--- a/aether-api/src/main/java/org/eclipse/aether/collection/DependencyManager.java
+++ b/aether-api/src/main/java/org/eclipse/aether/collection/DependencyManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2013 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,9 +13,12 @@ package org.eclipse.aether.collection;
 import org.eclipse.aether.graph.Dependency;
 
 /**
- * Applies dependency management to the dependencies of a dependency node. Implementations must be stateless.
- * <em>Note:</em> This hook is called from a hot spot and therefore implementations should pay attention to performance.
- * Among others, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
+ * Applies dependency management to the dependencies of a dependency node.
+ * <p>
+ * <strong>Note:</strong> Implementations must be stateless.
+ * <p>
+ * <em>Warning:</em> This hook is called from a hot spot and therefore implementations should pay attention to
+ * performance. Among others, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
  * 
  * @see org.eclipse.aether.RepositorySystemSession#getDependencyManager()
  * @see org.eclipse.aether.RepositorySystem#collectDependencies(org.eclipse.aether.RepositorySystemSession,

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/collection/DependencySelector.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/collection/DependencySelector.java b/aether-api/src/main/java/org/eclipse/aether/collection/DependencySelector.java
index a555c2f..de503be 100644
--- a/aether-api/src/main/java/org/eclipse/aether/collection/DependencySelector.java
+++ b/aether-api/src/main/java/org/eclipse/aether/collection/DependencySelector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2013 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,9 +13,12 @@ package org.eclipse.aether.collection;
 import org.eclipse.aether.graph.Dependency;
 
 /**
- * Decides what dependencies to include in the dependency graph. Implementations must be stateless. <em>Note:</em> This
- * hook is called from a hot spot and therefore implementations should pay attention to performance. Among others,
- * implementations should provide a semantic {@link Object#equals(Object) equals()} method.
+ * Decides what dependencies to include in the dependency graph.
+ * <p>
+ * <strong>Note:</strong> Implementations must be stateless.
+ * <p>
+ * <em>Warning:</em> This hook is called from a hot spot and therefore implementations should pay attention to
+ * performance. Among others, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
  * 
  * @see org.eclipse.aether.RepositorySystemSession#getDependencySelector()
  * @see org.eclipse.aether.RepositorySystem#collectDependencies(org.eclipse.aether.RepositorySystemSession,

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/collection/DependencyTraverser.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/collection/DependencyTraverser.java b/aether-api/src/main/java/org/eclipse/aether/collection/DependencyTraverser.java
index b237213..8140395 100644
--- a/aether-api/src/main/java/org/eclipse/aether/collection/DependencyTraverser.java
+++ b/aether-api/src/main/java/org/eclipse/aether/collection/DependencyTraverser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2013 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,9 +13,12 @@ package org.eclipse.aether.collection;
 import org.eclipse.aether.graph.Dependency;
 
 /**
- * Decides whether the dependencies of a dependency node should be traversed as well. Implementations must be stateless.
- * <em>Note:</em> This hook is called from a hot spot and therefore implementations should pay attention to performance.
- * Among others, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
+ * Decides whether the dependencies of a dependency node should be traversed as well.
+ * <p>
+ * <strong>Note:</strong> Implementations must be stateless.
+ * <p>
+ * <em>Warning:</em> This hook is called from a hot spot and therefore implementations should pay attention to
+ * performance. Among others, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
  * 
  * @see org.eclipse.aether.RepositorySystemSession#getDependencyTraverser()
  * @see org.eclipse.aether.RepositorySystem#collectDependencies(org.eclipse.aether.RepositorySystemSession,

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/collection/VersionFilter.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/collection/VersionFilter.java b/aether-api/src/main/java/org/eclipse/aether/collection/VersionFilter.java
index 7d8b7c8..02e7ab3 100644
--- a/aether-api/src/main/java/org/eclipse/aether/collection/VersionFilter.java
+++ b/aether-api/src/main/java/org/eclipse/aether/collection/VersionFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 Sonatype, Inc.
+ * Copyright (c) 2013, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,10 +22,13 @@ import org.eclipse.aether.version.Version;
 import org.eclipse.aether.version.VersionConstraint;
 
 /**
- * Decides which versions matching a version range should actually be considered for the dependency graph.
- * Implementations must be stateless. <em>Note:</em> This hook is called from a hot spot and therefore implementations
- * should pay attention to performance. Among others, implementations should provide a semantic
- * {@link Object#equals(Object) equals()} method.
+ * Decides which versions matching a version range should actually be considered for the dependency graph. The version
+ * filter is not invoked for dependencies that do not declare a version range but a single version.
+ * <p>
+ * <strong>Note:</strong> Implementations must be stateless.
+ * <p>
+ * <em>Warning:</em> This hook is called from a hot spot and therefore implementations should pay attention to
+ * performance. Among others, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
  * 
  * @see org.eclipse.aether.RepositorySystemSession#getVersionFilter()
  * @see org.eclipse.aether.RepositorySystem#collectDependencies(org.eclipse.aether.RepositorySystemSession,

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-api/src/main/java/org/eclipse/aether/version/VersionConstraint.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/version/VersionConstraint.java b/aether-api/src/main/java/org/eclipse/aether/version/VersionConstraint.java
index d4f6b52..dcb3b68 100644
--- a/aether-api/src/main/java/org/eclipse/aether/version/VersionConstraint.java
+++ b/aether-api/src/main/java/org/eclipse/aether/version/VersionConstraint.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,9 @@
 package org.eclipse.aether.version;
 
 /**
- * A constraint on versions for a dependency. A constraint can either consist of a version range or a single version. In
- * the first case, the constraint expresses a hard requirement on a version matching the range. In the second case, the
- * constraint expresses a soft requirement on a specific version (i.e. a recommendation).
+ * A constraint on versions for a dependency. A constraint can either consist of a version range (e.g. "[1, ]") or a
+ * single version (e.g. "1.1"). In the first case, the constraint expresses a hard requirement on a version matching the
+ * range. In the second case, the constraint expresses a soft requirement on a specific version (i.e. a recommendation).
  */
 public interface VersionConstraint
 {

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-spi/src/main/java/org/eclipse/aether/spi/connector/layout/RepositoryLayout.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/layout/RepositoryLayout.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/layout/RepositoryLayout.java
index 1594e10..f200714 100644
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/layout/RepositoryLayout.java
+++ b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/layout/RepositoryLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 Sonatype, Inc.
+ * Copyright (c) 2013, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,8 +18,9 @@ import org.eclipse.aether.artifact.Artifact;
 import org.eclipse.aether.metadata.Metadata;
 
 /**
- * The layout for a remote repository whose artifacts/metadata can be addressed via URIs. Implementations must be
- * stateless.
+ * The layout for a remote repository whose artifacts/metadata can be addressed via URIs.
+ * <p>
+ * <strong>Note:</strong> Implementations must be stateless.
  */
 public interface RepositoryLayout
 {

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/65b3b0d5/aether-util/src/main/java/org/eclipse/aether/util/graph/transformer/ConflictResolver.java
----------------------------------------------------------------------
diff --git a/aether-util/src/main/java/org/eclipse/aether/util/graph/transformer/ConflictResolver.java b/aether-util/src/main/java/org/eclipse/aether/util/graph/transformer/ConflictResolver.java
index 7ce9685..2caebb5 100644
--- a/aether-util/src/main/java/org/eclipse/aether/util/graph/transformer/ConflictResolver.java
+++ b/aether-util/src/main/java/org/eclipse/aether/util/graph/transformer/ConflictResolver.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 Sonatype, Inc.
+ * Copyright (c) 2012, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1144,7 +1144,9 @@ public final class ConflictResolver
      * An extension point of {@link ConflictResolver} that determines the winner among conflicting dependencies. The
      * winning node (and its children) will be retained in the dependency graph, the other nodes will get removed. The
      * version selector does not need to deal with potential scope conflicts, these will be addressed afterwards by the
-     * {@link ScopeSelector}. Implementations must be stateless.
+     * {@link ScopeSelector}.
+     * <p>
+     * <strong>Note:</strong> Implementations must be stateless.
      */
     public static abstract class VersionSelector
     {
@@ -1154,7 +1156,7 @@ public final class ConflictResolver
          * this method once per
          * {@link ConflictResolver#transformGraph(DependencyNode, DependencyGraphTransformationContext)} invocation to
          * allow implementations to prepare any auxiliary data that is needed for their operation. Given that
-         * implementations need to be stateless, a new instance needs to be returned to hold such auxiliary data. The
+         * implementations must be stateless, a new instance needs to be returned to hold such auxiliary data. The
          * default implementation simply returns the current instance which is appropriate for implementations which do
          * not require auxiliary data.
          * 
@@ -1186,7 +1188,9 @@ public final class ConflictResolver
     /**
      * An extension point of {@link ConflictResolver} that determines the effective scope of a dependency from a
      * potentially conflicting set of {@link ScopeDeriver derived scopes}. The scope selector gets invoked after the
-     * {@link VersionSelector} has picked the winning node. Implementations must be stateless.
+     * {@link VersionSelector} has picked the winning node.
+     * <p>
+     * <strong>Note:</strong> Implementations must be stateless.
      */
     public static abstract class ScopeSelector
     {
@@ -1196,7 +1200,7 @@ public final class ConflictResolver
          * this method once per
          * {@link ConflictResolver#transformGraph(DependencyNode, DependencyGraphTransformationContext)} invocation to
          * allow implementations to prepare any auxiliary data that is needed for their operation. Given that
-         * implementations need to be stateless, a new instance needs to be returned to hold such auxiliary data. The
+         * implementations must be stateless, a new instance needs to be returned to hold such auxiliary data. The
          * default implementation simply returns the current instance which is appropriate for implementations which do
          * not require auxiliary data.
          * 
@@ -1227,7 +1231,9 @@ public final class ConflictResolver
 
     /**
      * An extension point of {@link ConflictResolver} that determines the scope of a dependency in relation to the scope
-     * of its parent. Implementations must be stateless.
+     * of its parent.
+     * <p>
+     * <strong>Note:</strong> Implementations must be stateless.
      */
     public static abstract class ScopeDeriver
     {
@@ -1237,7 +1243,7 @@ public final class ConflictResolver
          * this method once per
          * {@link ConflictResolver#transformGraph(DependencyNode, DependencyGraphTransformationContext)} invocation to
          * allow implementations to prepare any auxiliary data that is needed for their operation. Given that
-         * implementations need to be stateless, a new instance needs to be returned to hold such auxiliary data. The
+         * implementations must be stateless, a new instance needs to be returned to hold such auxiliary data. The
          * default implementation simply returns the current instance which is appropriate for implementations which do
          * not require auxiliary data.
          * 
@@ -1268,7 +1274,9 @@ public final class ConflictResolver
     /**
      * An extension point of {@link ConflictResolver} that determines the effective optional flag of a dependency from a
      * potentially conflicting set of derived optionalities. The optionality selector gets invoked after the
-     * {@link VersionSelector} has picked the winning node. Implementations must be stateless.
+     * {@link VersionSelector} has picked the winning node.
+     * <p>
+     * <strong>Note:</strong> Implementations must be stateless.
      */
     public static abstract class OptionalitySelector
     {
@@ -1278,7 +1286,7 @@ public final class ConflictResolver
          * calls this method once per
          * {@link ConflictResolver#transformGraph(DependencyNode, DependencyGraphTransformationContext)} invocation to
          * allow implementations to prepare any auxiliary data that is needed for their operation. Given that
-         * implementations need to be stateless, a new instance needs to be returned to hold such auxiliary data. The
+         * implementations must be stateless, a new instance needs to be returned to hold such auxiliary data. The
          * default implementation simply returns the current instance which is appropriate for implementations which do
          * not require auxiliary data.
          * 


[09/15] maven-resolver git commit: Updated timeout test to account for changed exception generation in httpclient:4.3.x (cf. HTTPCLIENT-1362)

Posted by st...@apache.org.
Updated timeout test to account for changed exception generation in httpclient:4.3.x (cf. HTTPCLIENT-1362)


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/8f0a04dd
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/8f0a04dd
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/8f0a04dd

Branch: refs/heads/master
Commit: 8f0a04dd7bf326121ecaf86476e4817e799987ae
Parents: d171401
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:09:51 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:09:51 2014 +0100

----------------------------------------------------------------------
 .../org/eclipse/aether/transport/http/HttpTransporterTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/8f0a04dd/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java b/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
index 1c85c38..8027bcb 100644
--- a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
+++ b/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
@@ -14,6 +14,7 @@ import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.net.ConnectException;
 import java.net.ServerSocket;
 import java.net.SocketTimeoutException;
 import java.net.URI;
@@ -23,7 +24,6 @@ import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.http.client.HttpResponseException;
 import org.apache.http.conn.ConnectTimeoutException;
-import org.apache.http.conn.HttpHostConnectException;
 import org.apache.http.pool.ConnPoolControl;
 import org.apache.http.pool.PoolStats;
 import org.eclipse.aether.ConfigurationProperties;
@@ -975,7 +975,7 @@ public class HttpTransporterTest
         {
             assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
         }
-        catch ( HttpHostConnectException e )
+        catch ( ConnectException e )
         {
             assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
         }


[08/15] maven-resolver git commit: Bug 449599 - Return value of DefaultSessionData.set(key, null, null) disobeys API doc

Posted by st...@apache.org.
Bug 449599 - Return value of DefaultSessionData.set(key, null, null) disobeys API doc

Fixed set(key, null, null) to return true if current mapping is null/non-existing


Project: http://git-wip-us.apache.org/repos/asf/maven-resolver/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-resolver/commit/d171401c
Tree: http://git-wip-us.apache.org/repos/asf/maven-resolver/tree/d171401c
Diff: http://git-wip-us.apache.org/repos/asf/maven-resolver/diff/d171401c

Branch: refs/heads/master
Commit: d171401cf3e24a715006f566774cd48e7932e91c
Parents: 7a07539
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Tue Nov 11 15:08:39 2014 +0100
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Tue Nov 11 15:08:39 2014 +0100

----------------------------------------------------------------------
 .../org/eclipse/aether/DefaultSessionData.java  |   6 +-
 .../eclipse/aether/DefaultSessionDataTest.java  | 128 +++++++++++++++++++
 2 files changed, 133 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/d171401c/aether-api/src/main/java/org/eclipse/aether/DefaultSessionData.java
----------------------------------------------------------------------
diff --git a/aether-api/src/main/java/org/eclipse/aether/DefaultSessionData.java b/aether-api/src/main/java/org/eclipse/aether/DefaultSessionData.java
index 90f1127..738cebc 100644
--- a/aether-api/src/main/java/org/eclipse/aether/DefaultSessionData.java
+++ b/aether-api/src/main/java/org/eclipse/aether/DefaultSessionData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2012 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,6 +61,10 @@ public final class DefaultSessionData
         }
         else
         {
+            if ( oldValue == null )
+            {
+                return !data.containsKey( key );
+            }
             return data.remove( key, oldValue );
         }
     }

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/d171401c/aether-api/src/test/java/org/eclipse/aether/DefaultSessionDataTest.java
----------------------------------------------------------------------
diff --git a/aether-api/src/test/java/org/eclipse/aether/DefaultSessionDataTest.java b/aether-api/src/test/java/org/eclipse/aether/DefaultSessionDataTest.java
new file mode 100644
index 0000000..2c239a4
--- /dev/null
+++ b/aether-api/src/test/java/org/eclipse/aether/DefaultSessionDataTest.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.aether;
+
+import static org.junit.Assert.*;
+
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.junit.Test;
+
+public class DefaultSessionDataTest
+{
+
+    private DefaultSessionData data = new DefaultSessionData();
+
+    private Object get( Object key )
+    {
+        return data.get( key );
+    }
+
+    private void set( Object key, Object value )
+    {
+        data.set( key, value );
+    }
+
+    private boolean set( Object key, Object oldValue, Object newValue )
+    {
+        return data.set( key, oldValue, newValue );
+    }
+
+    @Test( expected = RuntimeException.class )
+    public void testGet_NullKey()
+    {
+        get( null );
+    }
+
+    @Test( expected = RuntimeException.class )
+    public void testSet_NullKey()
+    {
+        set( null, "data" );
+    }
+
+    @Test
+    public void testGetSet()
+    {
+        Object key = "key";
+        assertNull( get( key ) );
+        set( key, "value" );
+        assertEquals( "value", get( key ) );
+        set( key, "changed" );
+        assertEquals( "changed", get( key ) );
+        set( key, null );
+        assertNull( get( key ) );
+    }
+
+    @Test
+    public void testGetSafeSet()
+    {
+        Object key = "key";
+        assertNull( get( key ) );
+        assertFalse( set( key, "wrong", "value" ) );
+        assertNull( get( key ) );
+        assertTrue( set( key, null, "value" ) );
+        assertEquals( "value", get( key ) );
+        assertTrue( set( key, "value", "value" ) );
+        assertEquals( "value", get( key ) );
+        assertFalse( set( key, "wrong", "changed" ) );
+        assertEquals( "value", get( key ) );
+        assertTrue( set( key, "value", "changed" ) );
+        assertEquals( "changed", get( key ) );
+        assertFalse( set( key, "wrong", null ) );
+        assertEquals( "changed", get( key ) );
+        assertTrue( set( key, "changed", null ) );
+        assertNull( get( key ) );
+        assertTrue( set( key, null, null ) );
+        assertNull( get( key ) );
+    }
+
+    @Test( timeout = 10000 )
+    public void testConcurrency()
+        throws Exception
+    {
+        final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
+        Thread threads[] = new Thread[20];
+        for ( int i = 0; i < threads.length; i++ )
+        {
+            threads[i] = new Thread()
+            {
+                @Override
+                public void run()
+                {
+                    for ( int i = 0; i < 100; i++ )
+                    {
+                        String key = UUID.randomUUID().toString();
+                        try
+                        {
+                            set( key, Boolean.TRUE );
+                            assertEquals( Boolean.TRUE, get( key ) );
+                        }
+                        catch ( Throwable t )
+                        {
+                            error.compareAndSet( null, t );
+                            t.printStackTrace();
+                        }
+                    }
+                }
+            };
+        }
+        for ( Thread thread : threads )
+        {
+            thread.start();
+        }
+        for ( Thread thread : threads )
+        {
+            thread.join();
+        }
+        assertNull( String.valueOf( error.get() ), error.get() );
+    }
+}