[maven-resolver] branch MRESOLVER-8 updated (d87ba28 -> f956237)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven-resolver] branch MRESOLVER-8 updated (d87ba28 -> f956237)

michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch MRESOLVER-8
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git.


 discard d87ba28  [MRESOLVER-8] ScopeDependencySelector incorrectly de-selects direct dependencies
     add 34ca09e  [maven-release-plugin] prepare release maven-resolver-1.4.0
     add 7e3a0b8  [maven-release-plugin] prepare for next development iteration
     add 18dd2b5  [MRESOLVER-92] Revert MRESOLVER-7
     add 9417310  [maven-release-plugin] prepare release maven-resolver-1.4.1
     add 0a55f70  [maven-release-plugin] prepare for next development iteration
     add 2a1f4a1  [MRESOLVER-93] PathRecordingDependencyVisitor to handle 3 cycles
     add 89e8e66  [MRESOLVER-101] - Upgrade parent to version 34  o Need to add configuration to ignore empty    module name in demo project.
     add 32b7768  [MRESOLVER-102] make build Reproducible
     add 0498b5a  added README
     add 2ab4d73  Trim whitespace in README.md
     add fe24ef7  [maven-release-plugin] prepare release maven-resolver-1.4.2
     add a923656  [maven-release-plugin] prepare for next development iteration
     add 1fc2952  update JUnit (#43)
     add 7cd1ac8  ignore backup files (#44)
     add b6c09d9  udpate wagon api
     add db53659  Merge pull request #47 from apache/wagon
     add 5ed5f71  update org.apache.httpcomponents
     add 2655827  Merge pull request #45 from apache/plexus
     add 14e6724  update plexus
     add 5ff45a2  Merge pull request #46 from apache/plex
     add ce12285  add checkstyle to .gitignore
     add 47010e1  Merge pull request #49 from apache/i108
     add 702931e  [MRESOLVER-108] - Update mockito-core to 2.28.2
     add 8d2c375  Merge pull request #50 from jonvolfson/master
     add 8e8a4f1  [MRESOLVER-56] Support SHA-256 and SHA-512 as checksums
     add 7699c99  Fix Javadoc link
     add e0d665d  Convert http:// to https://
     add 1679d47  [MRESOLVER-117] Upgrade SLF4J to 1.7.30
     add 885dfc0  [MRESOLVER-118] Upgrade Sisu Components to 0.3.4
     add 3c2a514  [MRESOLVER-119] Turn log messages to SLF4J placeholders
     add 194808a  use try with resources (#56)
     add 86c1cb2  deprecate yet another StringUtils class (#57)
     add d271894  Bump maven-enforcer-plugin from 3.0.0-M2 to 3.0.0-M3
     add dd23364  Bump maven-invoker-plugin from 3.0.1 to 3.2.1
     add 812d071  Bump maven-bundle-plugin from 3.5.0 to 4.2.1
     add 8cf9660  Upgrade maven-bundle-plugin 4.1.0
     add e73be26  Upgrade maven-bundle-plugin 4.0.0
     add a7a5f70  Revert bundle plugin upgrade
     add 2112029  Fixed typo
     add 768d781  Fixed typo
     add b418a7b  [MRESOLVER-115] Make checksum algorithms configurable
     add 55fa2d7  [MRESOLVER-91] Error messages not clear when not reattempting resolution when a previous attempt failed and the failure was cached
     add d47a4ad  Fixed Travis build for OpenJDK7
     add 09925f7  [MRESOLVER-125] Use type conversions returning primitives
     add 4851485  [MRESOLVER-127] Don't use boolean for property 'aether.updateCheckManager.sessionState'
     add 091aea8  [MRESOLVER-116] Add page with all supported configuration options
     add a7b9ab4  Quick fix - Java 7
     add 2133d0d  [MRESOLVER-116] fix table rendering in Github
     add 86654e0  [MRESOLVER-123] Provide a global locking sync context by default
     add 4009b52  [maven-release-plugin] prepare release maven-resolver-1.5.0
     add 8978a28  [maven-release-plugin] prepare for next development iteration
     add bceb43a  [MRESOLVER-129] Exclusion has no setters
     add 9670c14  [MRESOLVER-130] Move GlobalSyncContextFactory to a separate module
     add 196d6a2  Fix description
     add a477e26  update ASF CI url
     add bd026bf  update ASF CI url
     add fcb6be5  [MRESOLVER-132] Remove synchronization in TrackingFileManager
     add d045b4d  [MRESOLVER-131] Introduce a Redisson-based SyncContextFactory
     add 0200804  Prepare SyncContextFactories docs for release
     add 8f56ce9  [maven-release-plugin] prepare release maven-resolver-1.6.0
     add 177ec77  [maven-release-plugin] prepare for next development iteration
     add a720126  fixup test dependencies
     add d1d3001  Merge pull request #70 from apache/deps
     add 02c04c9  [MRESOLVER-139] Make SimpleDigest use SHA-1 or MD5 only
     add 464ae7d  [MRESOLVER-140] Default to SHA-1 and MD5 hashing algorithms
     add 21cf41f  [MRESOLVER-109] AndDependencySelector should override toString
     add 526fa33  [MRESOLVER-136] Migrate from maven-bundle-plugin to bnd-maven-plugin
     add be51390  [maven-release-plugin] prepare release maven-resolver-1.6.1
     add aa5e9b1  [maven-release-plugin] prepare for next development iteration
     add b85faae  Move OSGi metadata generation to apache-release profile
     add 75a23f4  Revert "Move OSGi metadata generation to apache-release profile"
     add f8f0ef5  Remove unused parameters and local variables
     add 28e4ec0  [MRESOLVER-104] maven-resolver-demo-maven-plugin uses reserved artifactId
     add a932eac  [MRESOLVER-141] Review index-based access to collections
     add 195f1af  [MRESOLVER-147] Upgrade to Java 8
     add d1f0354  [MRESOLVER-148] Use vanilla Guice 4 instead of forked Guice 3
     new f956237  [MRESOLVER-8] ScopeDependencySelector incorrectly de-selects direct dependencies

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d87ba28)
            \
             N -- N -- N   refs/heads/MRESOLVER-8 (f956237)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .asf.yaml                                          |   9 +
 .gitignore                                         |   3 +
 .travis.yml                                        |   5 +-
 Jenkinsfile                                        |   5 +-
 README.md                                          |  99 +++
 maven-resolver-api/pom.xml                         | 157 ++--
 .../aether/graph/DefaultDependencyNode.java        |   4 +-
 .../java/org/eclipse/aether/graph/Exclusion.java   |  19 +-
 maven-resolver-connector-basic/pom.xml             | 230 +++---
 .../connector/basic/BasicRepositoryConnector.java  |  43 +-
 .../aether/connector/basic/ChecksumValidator.java  |   6 +-
 .../aether/connector/basic/PartialFile.java        |   7 +-
 .../connector/basic/ChecksumCalculatorTest.java    |  44 +-
 .../connector/basic/ChecksumValidatorTest.java     |   4 +-
 .../maven-resolver-demo-maven-plugin/pom.xml       |  18 +-
 .../maven-resolver-demo-snippets/pom.xml           |   8 +-
 .../manual/ManualRepositorySystemFactory.java      |   8 +-
 maven-resolver-demos/pom.xml                       |   2 +-
 maven-resolver-demos/src/site/xdoc/download.xml.vm |   8 +-
 maven-resolver-impl/pom.xml                        | 249 +++---
 .../aether/internal/impl/DefaultDeployer.java      |   8 +-
 .../aether/internal/impl/DefaultInstaller.java     |   7 +-
 .../impl/DefaultLocalRepositoryProvider.java       |   7 +-
 .../impl/DefaultRemoteRepositoryManager.java       |   2 +-
 .../impl/DefaultRepositoryConnectorProvider.java   |   7 +-
 .../impl/DefaultRepositoryEventDispatcher.java     |  16 +-
 .../impl/DefaultRepositoryLayoutProvider.java      |   7 +-
 .../internal/impl/DefaultSyncContextFactory.java   |   6 +-
 .../internal/impl/DefaultTransporterProvider.java  |   7 +-
 .../internal/impl/DefaultUpdateCheckManager.java   |  95 ++-
 .../internal/impl/DefaultUpdatePolicyAnalyzer.java |   2 +-
 .../impl/Maven2RepositoryLayoutFactory.java        |  36 +-
 .../internal/impl/PrioritizedComponents.java       |   6 +-
 .../eclipse/aether/internal/impl/SimpleDigest.java |  19 +-
 .../aether/internal/impl/TrackingFileManager.java  | 205 ++---
 .../aether/internal/impl/WarnChecksumPolicy.java   |  16 +-
 .../eclipse/aether/internal/impl/collect/Args.java |  70 --
 .../aether/internal/impl/collect/DataPool.java     | 120 ++-
 .../DefaultDependencyCollectionContext.java        | 178 +----
 .../impl/collect/DefaultDependencyCollector.java   | 889 +++++++++++++--------
 .../impl/collect/DefaultDependencyCycle.java       |   7 +-
 .../impl/collect/DefaultVersionFilterContext.java  | 118 +--
 .../impl/collect/DependencyCollectionUtils.java    | 173 ----
 .../internal/impl/collect/DependencyContext.java   |  74 --
 .../impl/collect/PremanagedDependency.java         | 149 ----
 .../aether/internal/impl/collect/Results.java      |  84 --
 .../impl/DefaultRemoteRepositoryManagerTest.java   |   2 +-
 .../impl/DefaultUpdateCheckManagerTest.java        |   6 +-
 .../impl/Maven2RepositoryLayoutFactoryTest.java    |  31 +-
 .../internal/impl/PrioritizedComponentsTest.java   |  17 +
 .../internal/impl/StubRemoteRepositoryManager.java |   2 +-
 .../internal/impl/TrackingFileManagerTest.java     |  57 +-
 .../aether/internal/impl/collect/DataPoolTest.java |  37 +-
 .../collect/DefaultDependencyCollectorTest.java    |  39 -
 .../impl/collect/DefaultDependencyCycleTest.java   |  44 +
 .../collect/DefaultVersionFilterContextTest.java   | 170 ++++
 .../artifact-descriptions/gid3_aid1_1.ini          |   7 -
 .../artifact-descriptions/gid3_aid2_1.ini          |   2 -
 .../artifact-descriptions/gid3_aid3_1.ini          |   2 -
 .../artifact-descriptions/gid3_aid3_2.ini          |   2 -
 maven-resolver-spi/pom.xml                         | 154 ++--
 .../aether/spi/connector/layout/ChecksumTest.java  |  14 +-
 .../pom.xml                                        |  46 +-
 .../aether/internal/impl/TrackingFileManager.java  | 151 ++++
 .../synccontext/GlobalSyncContextFactory.java      |  93 +++
 .../src/site/markdown/index.md.vm                  |  57 ++
 .../src/site/site.xml                              |   6 +-
 .../pom.xml                                        |  42 +-
 .../aether/internal/impl/TrackingFileManager.java  | 151 ++++
 .../synccontext/RedissonSyncContextFactory.java    | 390 +++++++++
 .../src/site/markdown/index.md.vm                  | 103 +++
 .../src/site/site.xml                              |   6 +-
 maven-resolver-test-util/pom.xml                   | 162 ++--
 .../aether/internal/test/util/TestVersion.java     |   4 +-
 .../internal/test/util/TestVersionConstraint.java  |   6 +-
 maven-resolver-transport-classpath/pom.xml         | 212 ++---
 maven-resolver-transport-file/pom.xml              | 222 ++---
 maven-resolver-transport-http/pom.xml              | 322 ++++----
 maven-resolver-transport-wagon/pom.xml             | 274 +++----
 .../aether/transport/wagon/WagonTransporter.java   | 172 +---
 maven-resolver-util/pom.xml                        | 164 ++--
 .../java/org/eclipse/aether/util/ConfigUtils.java  |   6 +-
 .../java/org/eclipse/aether/util/StringUtils.java  |   2 +
 .../aether/util/concurrency/FutureResult.java      |  69 --
 .../util/graph/selector/AndDependencySelector.java |  18 +
 .../selector/ExclusionDependencySelector.java      |  15 +
 .../graph/selector/OptionalDependencySelector.java |   6 +
 .../graph/selector/ScopeDependencySelector.java    |   8 +
 .../graph/selector/StaticDependencySelector.java   |   6 +
 .../util/graph/transformer/ConflictResolver.java   |  14 +-
 .../visitor/PathRecordingDependencyVisitor.java    |  14 +-
 .../org/eclipse/aether/util/ChecksumUtilTest.java  |  40 +-
 .../org/eclipse/aether/util/StringUtilsTest.java   |   3 +-
 .../graph/selector/AndDependencySelectorTest.java  |  15 +
 .../selector/ExclusionDependencySelectorTest.java} |  26 +-
 .../selector/OptionalDependencySelectorTest.java}  |  26 +-
 .../selector/ScopeDependencySelectorTest.java}     |  27 +-
 .../selector/StaticDependencySelectorTest.java}    |  26 +-
 .../graph/transformer/ConflictResolverTest.java    | 175 ++++
 .../PathRecordingDependencyVisitorTest.java        |  14 +
 .../visitor/path-recorder/cycle-3paths.txt         |   8 +
 pom.xml                                            |  93 ++-
 src/site/markdown/configuration.md                 |  74 ++
 src/site/site.xml                                  |   7 +-
 src/site/xdoc/download.xml.vm                      |   8 +-
 src/site/xdoc/index.xml                            |   4 +-
 106 files changed, 3921 insertions(+), 3188 deletions(-)
 create mode 100644 .asf.yaml
 create mode 100644 README.md
 delete mode 100644 maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/Args.java
 delete mode 100644 maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DependencyCollectionUtils.java
 delete mode 100644 maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DependencyContext.java
 delete mode 100644 maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/PremanagedDependency.java
 delete mode 100644 maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/Results.java
 create mode 100644 maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCycleTest.java
 create mode 100644 maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/collect/DefaultVersionFilterContextTest.java
 delete mode 100644 maven-resolver-impl/src/test/resources/artifact-descriptions/gid3_aid1_1.ini
 delete mode 100644 maven-resolver-impl/src/test/resources/artifact-descriptions/gid3_aid2_1.ini
 delete mode 100644 maven-resolver-impl/src/test/resources/artifact-descriptions/gid3_aid3_1.ini
 delete mode 100644 maven-resolver-impl/src/test/resources/artifact-descriptions/gid3_aid3_2.ini
 copy {maven-resolver-transport-file => maven-resolver-synccontext-global}/pom.xml (64%)
 create mode 100644 maven-resolver-synccontext-global/src/main/java/org/eclipse/aether/internal/impl/TrackingFileManager.java
 create mode 100644 maven-resolver-synccontext-global/src/main/java/org/eclipse/aether/synccontext/GlobalSyncContextFactory.java
 create mode 100644 maven-resolver-synccontext-global/src/site/markdown/index.md.vm
 copy {maven-resolver-impl => maven-resolver-synccontext-global}/src/site/site.xml (93%)
 copy {maven-resolver-transport-classpath => maven-resolver-synccontext-redisson}/pom.xml (69%)
 create mode 100644 maven-resolver-synccontext-redisson/src/main/java/org/eclipse/aether/internal/impl/TrackingFileManager.java
 create mode 100644 maven-resolver-synccontext-redisson/src/main/java/org/eclipse/aether/synccontext/RedissonSyncContextFactory.java
 create mode 100644 maven-resolver-synccontext-redisson/src/site/markdown/index.md.vm
 copy {maven-resolver-impl => maven-resolver-synccontext-redisson}/src/site/site.xml (93%)
 delete mode 100644 maven-resolver-util/src/main/java/org/eclipse/aether/util/concurrency/FutureResult.java
 copy maven-resolver-util/src/test/java/org/eclipse/aether/util/{StringUtilsTest.java => graph/selector/ExclusionDependencySelectorTest.java} (68%)
 copy maven-resolver-util/src/{main/java/org/eclipse/aether/util/graph/selector/package-info.java => test/java/org/eclipse/aether/util/graph/selector/OptionalDependencySelectorTest.java} (73%)
 copy maven-resolver-util/src/test/java/org/eclipse/aether/util/{StringUtilsTest.java => graph/selector/ScopeDependencySelectorTest.java} (69%)
 copy maven-resolver-util/src/{main/java/org/eclipse/aether/util/graph/selector/package-info.java => test/java/org/eclipse/aether/util/graph/selector/StaticDependencySelectorTest.java} (73%)
 create mode 100644 maven-resolver-util/src/test/java/org/eclipse/aether/util/graph/transformer/ConflictResolverTest.java
 create mode 100644 maven-resolver-util/src/test/resources/visitor/path-recorder/cycle-3paths.txt
 create mode 100644 src/site/markdown/configuration.md

Reply | Threaded
Open this post in threaded view
|

[maven-resolver] 01/01: [MRESOLVER-8] ScopeDependencySelector incorrectly de-selects direct dependencies

michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MRESOLVER-8
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git

commit f956237ba8ca37e64a87b868169ea5700652413a
Author: Christian Schulte <[hidden email]>
AuthorDate: Sat Mar 11 22:38:14 2017 +0100

    [MRESOLVER-8] ScopeDependencySelector incorrectly de-selects direct dependencies
---
 .../graph/selector/ScopeDependencySelector.java    | 40 ++++++++--------------
 1 file changed, 15 insertions(+), 25 deletions(-)

diff --git a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/selector/ScopeDependencySelector.java b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/selector/ScopeDependencySelector.java
index 75a8fd6..dc79f5e 100644
--- a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/selector/ScopeDependencySelector.java
+++ b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/selector/ScopeDependencySelector.java
@@ -8,9 +8,9 @@ package org.eclipse.aether.util.graph.selector;
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -34,14 +34,14 @@ import org.eclipse.aether.graph.Dependency;
  * A dependency selector that filters transitive dependencies based on their scope. Direct dependencies are always
  * included regardless of their scope. <em>Note:</em> This filter does not assume any relationships between the scopes.
  * In particular, the filter is not aware of scopes that logically include other scopes.
- *
+ *
  * @see Dependency#getScope()
  */
 public final class ScopeDependencySelector
     implements DependencySelector
 {
 
-    private final boolean transitive;
+    private final int depth;
 
     private final Collection<String> included;
 
@@ -49,13 +49,13 @@ public final class ScopeDependencySelector
 
     /**
      * Creates a new selector using the specified includes and excludes.
-     *
+     *
      * @param included The set of scopes to include, may be {@code null} or empty to include any scope.
      * @param excluded The set of scopes to exclude, may be {@code null} or empty to exclude no scope.
      */
     public ScopeDependencySelector( Collection<String> included, Collection<String> excluded )
     {
-        transitive = false;
+        this.depth = 0;
         this.included = clone( included );
         this.excluded = clone( excluded );
     }
@@ -82,7 +82,7 @@ public final class ScopeDependencySelector
 
     /**
      * Creates a new selector using the specified excludes.
-     *
+     *
      * @param excluded The set of scopes to exclude, may be {@code null} or empty to exclude no scope.
      */
     public ScopeDependencySelector( String... excluded )
@@ -90,33 +90,23 @@ public final class ScopeDependencySelector
         this( null, ( excluded != null ) ? Arrays.asList( excluded ) : null );
     }
 
-    private ScopeDependencySelector( boolean transitive, Collection<String> included, Collection<String> excluded )
+    private ScopeDependencySelector( int depth, Collection<String> included, Collection<String> excluded )
     {
-        this.transitive = transitive;
+        this.depth = depth;
         this.included = included;
         this.excluded = excluded;
     }
 
     public boolean selectDependency( Dependency dependency )
     {
-        if ( !transitive )
-        {
-            return true;
-        }
-
-        String scope = dependency.getScope();
-        return ( included == null || included.contains( scope ) )
-                && ( excluded == null || !excluded.contains( scope ) );
+        return depth < 2
+                   || ( ( included == null || included.contains( dependency.getScope() ) )
+                        && ( excluded == null || !excluded.contains( dependency.getScope() ) ) );
     }
 
     public DependencySelector deriveChildSelector( DependencyCollectionContext context )
     {
-        if ( this.transitive || context.getDependency() == null )
-        {
-            return this;
-        }
-
-        return new ScopeDependencySelector( true, included, excluded );
+        return depth >= 2 ? this : new ScopeDependencySelector( depth + 1, included, excluded );
     }
 
     @Override
@@ -132,7 +122,7 @@ public final class ScopeDependencySelector
         }
 
         ScopeDependencySelector that = (ScopeDependencySelector) obj;
-        return transitive == that.transitive && Objects.equals( included, that.included )
+        return depth == that.depth && Objects.equals( included, that.included )
                 && Objects.equals( excluded, that.excluded );
     }
 
@@ -140,7 +130,7 @@ public final class ScopeDependencySelector
     public int hashCode()
     {
         int hash = 17;
-        hash = hash * 31 + ( transitive ? 1 : 0 );
+        hash = hash * 31 + depth;
         hash = hash * 31 + ( included != null ? included.hashCode() : 0 );
         hash = hash * 31 + ( excluded != null ? excluded.hashCode() : 0 );
         return hash;