[maven-artifact-transfer] branch CODE-IMPROVEMENTS updated (fdf72a7 -> 42978d4)

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

[maven-artifact-transfer] branch CODE-IMPROVEMENTS updated (fdf72a7 -> 42978d4)

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

khmarbaise pushed a change to branch CODE-IMPROVEMENTS
in repository https://gitbox.apache.org/repos/asf/maven-artifact-transfer.git.


 discard fdf72a7  Removed outcommented code.
     add 8000df6  [MSHARED-742] - Add null check for DependencyResolver Interface  o Added missing check of ProjectBuildingRequest parameter
     add 87d6c19  [maven-release-plugin] prepare release maven-artifact-transfer-0.10.0
     add d66d750  [maven-release-plugin] prepare for next development iteration
     add 61e262e  [MSHARED-743] - Improve documentation about install project
     add 1fae4db  [MSHARED-753] - Remove updateReleaseInfo from ProjectDeployer docs
     new 42978d4  Removed outcommented code.

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   (fdf72a7)
            \
             N -- N -- N   refs/heads/CODE-IMPROVEMENTS (42978d4)

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:
 pom.xml                                                             | 6 ++----
 .../dependencies/resolve/internal/DefaultDependencyResolver.java    | 2 ++
 .../maven/shared/transfer/project/deploy/ProjectDeployer.java       | 3 +--
 src/site/apt/install-project.apt                                    | 3 +--
 4 files changed, 6 insertions(+), 8 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[maven-artifact-transfer] 01/01: Removed outcommented code.

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

khmarbaise pushed a commit to branch CODE-IMPROVEMENTS
in repository https://gitbox.apache.org/repos/asf/maven-artifact-transfer.git

commit 42978d499d23ed1046b1a365cd1ce1edce6ca13b
Author: Karl Heinz Marbaise <[hidden email]>
AuthorDate: Sun Mar 4 12:36:23 2018 +0100

    Removed outcommented code.
---
 .../artifact/resolve/ArtifactResolver.java         |  30 ----
 .../resolve/internal/DefaultArtifactResolver.java  |  40 ------
 .../resolve/internal/Maven30ArtifactResolver.java  | 157 --------------------
 .../resolve/internal/Maven31ArtifactResolver.java  | 158 ---------------------
 4 files changed, 385 deletions(-)

diff --git a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/ArtifactResolver.java b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/ArtifactResolver.java
index 0491023..86b8330 100644
--- a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/ArtifactResolver.java
+++ b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/ArtifactResolver.java
@@ -51,34 +51,4 @@ public interface ArtifactResolver
     ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest, ArtifactCoordinate coordinate )
         throws ArtifactResolverException, IllegalArgumentException;
 
-    // /**
-    // * This will resolve the dependencies of the coordinate, not resolving the the artifact of the coordinate itself.
-    // * If the coordinate needs to be resolved too, use
-    // * {@link #resolveDependencies(ProjectBuildingRequest, Collection, Collection, TransformableFilter)} passing
-    // * {@code Collections.singletonList(coordinate)}
-    // *
-    // * @param buildingRequest {@link ProjectBuildingRequest}
-    // * @param coordinate {@link ArtifactCoordinate}
-    // * @param filter {@link TransformableFilter}
-    // * @return the resolved dependencies.
-    // * @throws ArtifactResolverException in case of an error.
-    // */
-    // Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest, ArtifactCoordinate
-    // coordinate,
-    // TransformableFilter filter )
-    // throws ArtifactResolverException;
-    //
-    // /**
-    // * @param buildingRequest the project building request, never {@code null}
-    // * @param dependencies the dependencies to resolve, never {@code null}
-    // * @param managedDependencies managed dependencies, can be {@code null}
-    // * @param filter a filter, can be {@code null}
-    // * @return the resolved dependencies.
-    // * @throws ArtifactResolverException in case of an error.
-    // */
-    // Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-    // Collection<Dependency> dependencies,
-    // Collection<Dependency> managedDependencies,
-    // TransformableFilter filter )
-    // throws ArtifactResolverException;
 }
diff --git a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java
index e778630..7e25f1f 100644
--- a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java
+++ b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java
@@ -104,46 +104,6 @@ class DefaultArtifactResolver
         }
     }
 
-    // @Override
-    // public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-    // Collection<Dependency> coordinates,
-    // Collection<Dependency> managedDependencies,
-    // TransformableFilter filter )
-    // throws ArtifactResolverException
-    // {
-    // try
-    // {
-    // String hint = isMaven31() ? "maven31" : "maven3";
-    //
-    // ArtifactResolver effectiveArtifactResolver = container.lookup( ArtifactResolver.class, hint );
-    //
-    // return effectiveArtifactResolver.resolveDependencies( buildingRequest, coordinates, null, filter );
-    // }
-    // catch ( ComponentLookupException e )
-    // {
-    // throw new ArtifactResolverException( e.getMessage(), e );
-    // }
-    // }
-    //
-    // @Override
-    // public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-    // ArtifactCoordinate coordinate, TransformableFilter filter )
-    // throws ArtifactResolverException
-    // {
-    // try
-    // {
-    // String hint = isMaven31() ? "maven31" : "maven3";
-    //
-    // ArtifactResolver effectiveArtifactResolver = container.lookup( ArtifactResolver.class, hint );
-    //
-    // return effectiveArtifactResolver.resolveDependencies( buildingRequest, coordinate, filter );
-    // }
-    // catch ( ComponentLookupException e )
-    // {
-    // throw new ArtifactResolverException( e.getMessage(), e );
-    // }
-    // }
-
     /**
      * @return true if the current Maven version is Maven 3.1.
      */
diff --git a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven30ArtifactResolver.java b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven30ArtifactResolver.java
index fa9f7b3..f81b243 100644
--- a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven30ArtifactResolver.java
+++ b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven30ArtifactResolver.java
@@ -117,161 +117,4 @@ class Maven30ArtifactResolver
         }
     }
 
-//    @Override
-//    // CHECKSTYLE_OFF: LineLength
-//    public Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-//                                                                                                  ArtifactCoordinate coordinate,
-//                                                                                                  TransformableFilter dependencyFilter )
-//                                                                                                      // CHECKSTYLE_ON:
-//                                                                                                      // LineLength
-//                                                                                                      throws ArtifactResolverException
-//    {
-//        ArtifactTypeRegistry typeRegistry =
-//            (ArtifactTypeRegistry) Invoker.invoke( RepositoryUtils.class, "newArtifactTypeRegistry",
-//                                                   ArtifactHandlerManager.class, artifactHandlerManager );
-//
-//        Dependency aetherRoot = toDependency( coordinate, typeRegistry );
-//
-//        @SuppressWarnings( "unchecked" )
-//        List<RemoteRepository> aetherRepositories =
-//            (List<RemoteRepository>) Invoker.invoke( RepositoryUtils.class, "toRepos", List.class,
-//                                                     buildingRequest.getRemoteRepositories() );
-//
-//        CollectRequest request = new CollectRequest( aetherRoot, aetherRepositories );
-//
-//        return resolveDependencies( buildingRequest, aetherRepositories, dependencyFilter, request );
-//    }
-//
-//    @Override
-//    // CHECKSTYLE_OFF: LineLength
-//    public Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-//                                                                                                  Collection<org.apache.maven.model.Dependency> mavenDependencies,
-//                                                                                                  Collection<org.apache.maven.model.Dependency> managedMavenDependencies,
-//                                                                                                  TransformableFilter filter )
-//                                                                                                      // CHECKSTYLE_ON:
-//                                                                                                      // LineLength
-//                                                                                                      throws ArtifactResolverException
-//    {
-//        ArtifactTypeRegistry typeRegistry =
-//            (ArtifactTypeRegistry) Invoker.invoke( RepositoryUtils.class, "newArtifactTypeRegistry",
-//                                                   ArtifactHandlerManager.class, artifactHandlerManager );
-//
-//        List<Dependency> aetherDependencies = new ArrayList<Dependency>( mavenDependencies.size() );
-//
-//        final Class<?>[] argClasses =
-//            new Class<?>[] { org.apache.maven.model.Dependency.class, ArtifactTypeRegistry.class };
-//
-//        for ( org.apache.maven.model.Dependency mavenDependency : mavenDependencies )
-//        {
-//            Object[] args = new Object[] { mavenDependency, typeRegistry };
-//
-//            Dependency aetherDependency =
-//                (Dependency) Invoker.invoke( RepositoryUtils.class, "toDependency", argClasses, args );
-//
-//            aetherDependencies.add( aetherDependency );
-//        }
-//
-//        List<Dependency> aetherManagedDependencies = new ArrayList<Dependency>( managedMavenDependencies.size() );
-//
-//        for ( org.apache.maven.model.Dependency mavenDependency : managedMavenDependencies )
-//        {
-//            Object[] args = new Object[] { mavenDependency, typeRegistry };
-//
-//            Dependency aetherDependency =
-//                (Dependency) Invoker.invoke( RepositoryUtils.class, "toDependency", argClasses, args );
-//
-//            aetherManagedDependencies.add( aetherDependency );
-//        }
-//
-//        @SuppressWarnings( "unchecked" )
-//        List<RemoteRepository> aetherRepositories =
-//            (List<RemoteRepository>) Invoker.invoke( RepositoryUtils.class, "toRepos", List.class,
-//                                                     buildingRequest.getRemoteRepositories() );
-//
-//        CollectRequest request =
-//            new CollectRequest( aetherDependencies, aetherManagedDependencies, aetherRepositories );
-//
-//        return resolveDependencies( buildingRequest, aetherRepositories, filter, request );
-//    }
-
-//    // CHECKSTYLE_OFF: LineLength
-//    private Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-//                                                                                                   List<RemoteRepository> aetherRepositories,
-//                                                                                                   TransformableFilter dependencyFilter,
-//                                                                                                   CollectRequest request )
-//                                                                                                       throws ArtifactResolverException
-//    // CHECKSTYLE_ON :LineLength
-//    {
-//        try
-//        {
-//            DependencyFilter depFilter = null;
-//            if ( dependencyFilter != null )
-//            {
-//                depFilter = dependencyFilter.transform( new SonatypeAetherFilterTransformer() );
-//            }
-//
-//            RepositorySystemSession session =
-//                (RepositorySystemSession) Invoker.invoke( buildingRequest, "getRepositorySession" );
-//
-//            List<ArtifactResult> dependencyResults =
-//                repositorySystem.resolveDependencies( session, request, depFilter );
-//
-//            Collection<ArtifactRequest> artifactRequests = new ArrayList<ArtifactRequest>( dependencyResults.size() );
-//
-//            for ( ArtifactResult artifactResult : dependencyResults )
-//            {
-//                artifactRequests.add( new ArtifactRequest( artifactResult.getArtifact(), aetherRepositories, null ) );
-//            }
-//
-//            final List<ArtifactResult> artifactResults = repositorySystem.resolveArtifacts( session, artifactRequests );
-//
-//            // Keep it lazy! Often artifactsResults aren't used, so transforming up front is too expensive
-//            return new Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult>()
-//            {
-//                @Override
-//                public Iterator<org.apache.maven.shared.artifact.resolve.ArtifactResult> iterator()
-//                {
-//                    Collection<org.apache.maven.shared.artifact.resolve.ArtifactResult> artResults =
-//                        new ArrayList<org.apache.maven.shared.artifact.resolve.ArtifactResult>( artifactResults.size() );
-//
-//                    for ( ArtifactResult artifactResult : artifactResults )
-//                    {
-//                        artResults.add( new Maven30ArtifactResult( artifactResult ) );
-//                    }
-//
-//                    return artResults.iterator();
-//                }
-//            };
-//        }
-//        catch ( ArtifactResolutionException e )
-//        {
-//            throw new ArtifactResolverException( e.getMessage(), e );
-//        }
-//        catch ( DependencyCollectionException e )
-//        {
-//            throw new ArtifactResolverException( e.getMessage(), e );
-//        }
-//    }
-
-//    /**
-//     * Based on RepositoryUtils#toDependency(org.apache.maven.model.Dependency, ArtifactTypeRegistry)
-//     *
-//     * @param coordinate
-//     * @param stereotypes
-//     * @return as Aether Dependency
-//     */
-//    private static Dependency toDependency( ArtifactCoordinate coordinate, ArtifactTypeRegistry stereotypes )
-//    {
-//        ArtifactType stereotype = stereotypes.get( coordinate.getExtension() );
-//        if ( stereotype == null )
-//        {
-//            stereotype = new DefaultArtifactType( coordinate.getExtension() );
-//        }
-//
-//        Artifact artifact =
-//            new DefaultArtifact( coordinate.getGroupId(), coordinate.getArtifactId(), coordinate.getClassifier(), null,
-//                                 coordinate.getVersion(), null, stereotype );
-//
-//        return new Dependency( artifact, null );
-//    }
 }
diff --git a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven31ArtifactResolver.java b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven31ArtifactResolver.java
index b326e53..56e4519 100644
--- a/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven31ArtifactResolver.java
+++ b/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/Maven31ArtifactResolver.java
@@ -117,162 +117,4 @@ class Maven31ArtifactResolver
         }
     }
 
-//    @Override
-//    // CHECKSTYLE_OFF: LineLength
-//    public Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-//                                                                                                  ArtifactCoordinate coordinate,
-//                                                                                                  TransformableFilter dependencyFilter )
-//                                                                                                      throws ArtifactResolverException
-//    // CHECKSTYLE_ON: LineLength
-//    {
-//        ArtifactTypeRegistry typeRegistry =
-//            (ArtifactTypeRegistry) Invoker.invoke( RepositoryUtils.class, "newArtifactTypeRegistry",
-//                                                   ArtifactHandlerManager.class, artifactHandlerManager );
-//
-//        Dependency aetherRoot = toDependency( coordinate, typeRegistry );
-//
-//        @SuppressWarnings( "unchecked" )
-//        List<RemoteRepository> aetherRepositories =
-//            (List<RemoteRepository>) Invoker.invoke( RepositoryUtils.class, "toRepos", List.class,
-//                                                     buildingRequest.getRemoteRepositories() );
-//
-//        CollectRequest request = new CollectRequest( aetherRoot, aetherRepositories );
-//
-//        return resolveDependencies( buildingRequest, aetherRepositories, dependencyFilter, request );
-//    }
-//
-//    @Override
-//    // CHECKSTYLE_OFF: LineLength
-//    public Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-//                                                                                                  Collection<org.apache.maven.model.Dependency> mavenDependencies,
-//                                                                                                  Collection<org.apache.maven.model.Dependency> managedMavenDependencies,
-//                                                                                                  TransformableFilter filter )
-//                                                                                                      throws ArtifactResolverException
-//    // CHECKSTYLE_ON: LineLength
-//    {
-//        ArtifactTypeRegistry typeRegistry =
-//            (ArtifactTypeRegistry) Invoker.invoke( RepositoryUtils.class, "newArtifactTypeRegistry",
-//                                                   ArtifactHandlerManager.class, artifactHandlerManager );
-//
-//        List<Dependency> aetherDeps = new ArrayList<Dependency>( mavenDependencies.size() );
-//
-//        final Class<?>[] argClasses =
-//            new Class<?>[] { org.apache.maven.model.Dependency.class, ArtifactTypeRegistry.class };
-//
-//        for ( org.apache.maven.model.Dependency mavenDependency : mavenDependencies )
-//        {
-//            Object[] args = new Object[] { mavenDependency, typeRegistry };
-//
-//            Dependency aetherDependency =
-//                (Dependency) Invoker.invoke( RepositoryUtils.class, "toDependency", argClasses, args );
-//
-//            aetherDeps.add( aetherDependency );
-//        }
-//
-//        List<Dependency> aetherManagedDeps = new ArrayList<Dependency>( managedMavenDependencies.size() );
-//
-//        for ( org.apache.maven.model.Dependency mavenDependency : managedMavenDependencies )
-//        {
-//            Object[] args = new Object[] { mavenDependency, typeRegistry };
-//
-//            Dependency aetherDependency =
-//                (Dependency) Invoker.invoke( RepositoryUtils.class, "toDependency", argClasses, args );
-//
-//            aetherManagedDeps.add( aetherDependency );
-//        }
-//
-//        @SuppressWarnings( "unchecked" )
-//        List<RemoteRepository> aetherRepos =
-//            (List<RemoteRepository>) Invoker.invoke( RepositoryUtils.class, "toRepos", List.class,
-//                                                     buildingRequest.getRemoteRepositories() );
-//
-//        CollectRequest request = new CollectRequest( aetherDeps, aetherManagedDeps, aetherRepos );
-//
-//        return resolveDependencies( buildingRequest, aetherRepos, filter, request );
-//    }
-
-//    // CHECKSTYLE_OFF: LineLength
-//    private Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
-//                                                                                                   List<RemoteRepository> aetherRepositories,
-//                                                                                                   TransformableFilter dependencyFilter,
-//                                                                                                   CollectRequest request )
-//                                                                                                       throws ArtifactResolverException
-//    // CHECKSTYLE_ON: LineLength
-//    {
-//        try
-//        {
-//            DependencyFilter depFilter = null;
-//            if ( dependencyFilter != null )
-//            {
-//                depFilter = dependencyFilter.transform( new EclipseAetherFilterTransformer() );
-//            }
-//
-//            DependencyRequest depRequest = new DependencyRequest( request, depFilter );
-//
-//            RepositorySystemSession session =
-//                (RepositorySystemSession) Invoker.invoke( buildingRequest, "getRepositorySession" );
-//
-//            DependencyResult dependencyResults = repositorySystem.resolveDependencies( session, depRequest );
-//
-//            Collection<ArtifactRequest> artifactRequests =
-//                new ArrayList<ArtifactRequest>( dependencyResults.getArtifactResults().size() );
-//
-//            for ( ArtifactResult artifactResult : dependencyResults.getArtifactResults() )
-//            {
-//                artifactRequests.add( new ArtifactRequest( artifactResult.getArtifact(), aetherRepositories, null ) );
-//            }
-//
-//         final List<ArtifactResult> artifactResults = repositorySystem.resolveArtifacts( session, artifactRequests );
-//
-//            // Keep it lazy! Often artifactsResults aren't used, so transforming up front is too expensive
-//            return new Iterable<org.apache.maven.shared.artifact.resolve.ArtifactResult>()
-//            {
-//                @Override
-//                public Iterator<org.apache.maven.shared.artifact.resolve.ArtifactResult> iterator()
-//                {
-//                    // CHECKSTYLE_OFF: LineLength
-//                    Collection<org.apache.maven.shared.artifact.resolve.ArtifactResult> artResults =
-//                    new ArrayList<org.apache.maven.shared.artifact.resolve.ArtifactResult>( artifactResults.size() );
-//                    // CHECKSTYLE_ON: LineLength
-//
-//                    for ( ArtifactResult artifactResult : artifactResults )
-//                    {
-//                        artResults.add( new Maven31ArtifactResult( artifactResult ) );
-//                    }
-//
-//                    return artResults.iterator();
-//                }
-//            };
-//        }
-//        catch ( ArtifactResolutionException e )
-//        {
-//            throw new ArtifactResolverException( e.getMessage(), e );
-//        }
-//        catch ( DependencyResolutionException e )
-//        {
-//            throw new ArtifactResolverException( e.getMessage(), e );
-//        }
-//    }
-
-//    /**
-//     * Based on RepositoryUtils#toDependency(org.apache.maven.model.Dependency, ArtifactTypeRegistry)
-//     *
-//     * @param coordinate {@link ArtifactCoordinate}
-//     * @param stereotypes {@link ArtifactTypeRegistry
-//     * @return as Aether Dependency
-//     */
-//    private static Dependency toDependency( ArtifactCoordinate coordinate, ArtifactTypeRegistry stereotypes )
-//    {
-//        ArtifactType stereotype = stereotypes.get( coordinate.getExtension() );
-//        if ( stereotype == null )
-//        {
-//            stereotype = new DefaultArtifactType( coordinate.getExtension() );
-//        }
-//
-//        Artifact artifact =
-//          new DefaultArtifact( coordinate.getGroupId(), coordinate.getArtifactId(), coordinate.getClassifier(), null,
-//                                 coordinate.getVersion(), null, stereotype );
-//
-//        return new Dependency( artifact, null );
-//    }
 }