You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by GitBox <gi...@apache.org> on 2021/05/02 16:47:28 UTC

[GitHub] [maven-artifact-transfer] michael-o commented on a change in pull request #24: [MSHARED-987] Make use of SISU

michael-o commented on a change in pull request #24:
URL: https://github.com/apache/maven-artifact-transfer/pull/24#discussion_r624720934



##########
File path: maven-3.0.x/pom.xml
##########
@@ -0,0 +1,148 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.shared</groupId>
+    <artifactId>maven-artifact-transfer-parent</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-artifact-transfer-maven-3.0.x</artifactId>
+
+  <name>Apache Maven Artifact Transfer Maven 3.0.x provider</name>
+
+  <properties>
+    <maven30x.version>3.0</maven30x.version>
+    <sonatypeAether.version>1.7</sonatypeAether.version>

Review comment:
       Does not exist in Maven Central: https://search.maven.org/artifact/org.sonatype.aether/aether-api

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/install/internal/DefaultArtifactInstaller.java
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.shared.transfer.artifact.install.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.install.ArtifactInstaller;
+import org.apache.maven.shared.transfer.artifact.install.ArtifactInstallerException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.io.File;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactInstaller
+        extends DelegatorSupport<ArtifactInstallerDelegate>
+        implements ArtifactInstaller
+{
+    @Inject
+    public DefaultArtifactInstaller( Map<String, ArtifactInstallerDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public void install( ProjectBuildingRequest request,
+                         Collection<Artifact> mavenArtifacts )
+            throws ArtifactInstallerException, IllegalArgumentException
+    {
+        validateParameters( request, mavenArtifacts );
+        delegate.install( request, mavenArtifacts );
+    }
+
+    public void install( ProjectBuildingRequest request,
+                         File localRepository,
+                         Collection<Artifact> mavenArtifacts ) throws ArtifactInstallerException
+    {
+        validateParameters( request, mavenArtifacts );
+        if ( localRepository == null )
+        {
+            throw new IllegalArgumentException( "The parameter localRepository is not allowed to be null." );
+        }
+        if ( !localRepository.isDirectory() )
+        {
+            throw new IllegalArgumentException( "The parameter localRepository must be a directory." );
+        }
+        delegate.install( request, localRepository, mavenArtifacts );
+    }
+
+    private void validateParameters( ProjectBuildingRequest request, Collection<Artifact> mavenArtifacts )
+    {
+        if ( request == null )
+        {
+            throw new IllegalArgumentException( "The parameter request is not allowed to be null." );
+        }
+        if ( mavenArtifacts == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.shared.transfer.artifact.resolve.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.ArtifactCoordinate;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactResolver
+        extends DelegatorSupport<ArtifactResolverDelegate>
+        implements ArtifactResolver
+{
+    @Inject
+    public DefaultArtifactResolver( Map<String, ArtifactResolverDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           Artifact mavenArtifact )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, mavenArtifact );
+        return delegate.resolveArtifact( buildingRequest, mavenArtifact );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           ArtifactCoordinate coordinate )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, coordinate );
+        return delegate.resolveArtifact( buildingRequest, coordinate );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Artifact mavenArtifact )
+    {
+        if ( buildingRequest == null )
+        {
+            throw new IllegalArgumentException( "The parameter buildingRequest is not allowed to be null." );
+        }
+        if ( mavenArtifact == null )
+        {
+            throw new IllegalArgumentException( "The parameter mavenArtifact is not allowed to be null." );
+        }
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, ArtifactCoordinate coordinate )
+    {
+        if ( buildingRequest == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer/pom.xml
##########
@@ -0,0 +1,188 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.shared</groupId>
+    <artifactId>maven-artifact-transfer-parent</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-artifact-transfer</artifactId>
+
+  <name>Apache Maven Artifact Transfer</name>
+
+  <properties>
+    <downstreamMaven.version>3.1.0</downstreamMaven.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-artifact-transfer-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-artifact-transfer-maven-3.0.x</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-artifact-transfer-maven-3.1.x</artifactId>
+    </dependency>
+
+    <!-- Original dependencies consumers expect to have -->
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${downstreamMaven.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>${downstreamMaven.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-common-artifact-filters</artifactId>
+      <version>${artifactFilters.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+
+
+    <!-- TEST -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.inject</groupId>
+      <artifactId>javax.inject</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.sisu</groupId>
+        <artifactId>sisu-maven-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>animal-sniffer-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>run-its</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <dependencies>
+              <dependency>
+                <groupId>org.codehaus.groovy</groupId>
+                <artifactId>groovy</artifactId>
+                <version>3.0.7</version>
+              </dependency>
+              <dependency>
+                <groupId>org.codehaus.gmaven.runtime</groupId>
+                <artifactId>gmaven-runtime-2.0</artifactId>
+                <version>1.5</version>
+              </dependency>
+            </dependencies>
+            <configuration>
+              <addTestClassPath>true</addTestClassPath>
+              <debug>false</debug>
+              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <projectsDirectory>src/it</projectsDirectory>
+              <showVersion>true</showVersion>
+              <pomIncludes>
+                <pomInclude>*/pom.xml</pomInclude>
+              </pomIncludes>
+              <preBuildHookScript>setup</preBuildHookScript>
+              <postBuildHookScript>verify</postBuildHookScript>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <!-- Currently working with more than one thread does not work, cause
+                it is not guaranteed that the setup-config project is build at first. see
+                also http://jira.codehaus.org/browse/MINVOKER-147 -->
+              <parallelThreads>1</parallelThreads>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+                <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              </filterProperties>
+              <extraArtifacts>
+                <extraArtifact>org.apache.maven:apache-maven:3.0.5:tar.gz:bin</extraArtifact>
+                <extraArtifact>org.apache.maven:apache-maven:3.1.1:tar.gz:bin</extraArtifact>
+                <extraArtifact>org.apache.maven:apache-maven:3.2.5:tar.gz:bin</extraArtifact>
+                <extraArtifact>org.apache.maven:apache-maven:3.3.1:tar.gz:bin</extraArtifact>
+                <extraArtifact>org.apache.maven:apache-maven:3.3.9:tar.gz:bin</extraArtifact>
+                <extraArtifact>org.apache.maven:apache-maven:3.5.0:tar.gz:bin</extraArtifact>

Review comment:
       3.5.4

##########
File path: maven-3.0.x/pom.xml
##########
@@ -0,0 +1,148 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.shared</groupId>
+    <artifactId>maven-artifact-transfer-parent</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-artifact-transfer-maven-3.0.x</artifactId>
+
+  <name>Apache Maven Artifact Transfer Maven 3.0.x provider</name>
+
+  <properties>
+    <maven30x.version>3.0</maven30x.version>

Review comment:
       We use Mavn 3.0.5 as bare minimum.

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/deploy/internal/DefaultArtifactDeployer.java
##########
@@ -0,0 +1,80 @@
+package org.apache.maven.shared.transfer.artifact.deploy.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployer;
+import org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployerException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactDeployer
+        extends DelegatorSupport<ArtifactDeployerDelegate>
+        implements ArtifactDeployer
+{
+    @Inject
+    public DefaultArtifactDeployer( Map<String, ArtifactDeployerDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public void deploy( ProjectBuildingRequest request,
+                        Collection<Artifact> mavenArtifacts ) throws ArtifactDeployerException
+    {
+        validateParameters( request, mavenArtifacts );
+        delegate.deploy( request, mavenArtifacts );
+    }
+
+    public void deploy( ProjectBuildingRequest request,
+                        ArtifactRepository remoteRepository,
+                        Collection<Artifact> mavenArtifacts ) throws ArtifactDeployerException
+    {
+        validateParameters( request, mavenArtifacts );
+        delegate.deploy( request, remoteRepository, mavenArtifacts );
+    }
+
+    private void validateParameters( ProjectBuildingRequest request, Collection<Artifact> mavenArtifacts )
+    {
+        if ( request == null )
+        {
+            throw new IllegalArgumentException( "The parameter request is not allowed to be null." );
+        }
+        if ( mavenArtifacts == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/pom.xml
##########
@@ -0,0 +1,107 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.shared</groupId>
+    <artifactId>maven-artifact-transfer-parent</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-artifact-transfer-api</artifactId>
+
+  <name>Apache Maven Artifact Transfer API</name>
+
+  <dependencies>
+    <!-- Maven 3.0.x: all provided -->
+    <dependency>
+      <groupId>javax.inject</groupId>
+      <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>3.0</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>3.0</version>

Review comment:
       Move version to property?

##########
File path: maven-3.1.x/pom.xml
##########
@@ -0,0 +1,148 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.shared</groupId>
+    <artifactId>maven-artifact-transfer-parent</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-artifact-transfer-maven-3.1.x</artifactId>
+
+  <name>Apache Maven Artifact Transfer Maven 3.1.x provider</name>
+
+  <properties>
+    <maven31x.version>3.1.0</maven31x.version>

Review comment:
       I think this should be 3.1.1 too.

##########
File path: maven-3.0.x/src/main/java/org/apache/maven/shared/transfer/repository/internal/Maven302RepositoryManager.java
##########
@@ -20,18 +20,24 @@
  */
 
 import org.sonatype.aether.RepositorySystem;
-import org.sonatype.aether.RepositorySystemSession;
 import org.sonatype.aether.repository.LocalRepository;
 
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
 /**
- * 
+ *
  */
-class Maven302RepositoryManager
-    extends Maven30RepositoryManager
+@Singleton
+@Named( "maven-3.0.2" )

Review comment:
       I think this can be dropped because we won't get lower than 3.0.5.

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/deploy/internal/DefaultArtifactDeployer.java
##########
@@ -0,0 +1,80 @@
+package org.apache.maven.shared.transfer.artifact.deploy.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployer;
+import org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployerException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactDeployer
+        extends DelegatorSupport<ArtifactDeployerDelegate>
+        implements ArtifactDeployer
+{
+    @Inject
+    public DefaultArtifactDeployer( Map<String, ArtifactDeployerDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public void deploy( ProjectBuildingRequest request,
+                        Collection<Artifact> mavenArtifacts ) throws ArtifactDeployerException
+    {
+        validateParameters( request, mavenArtifacts );
+        delegate.deploy( request, mavenArtifacts );
+    }
+
+    public void deploy( ProjectBuildingRequest request,
+                        ArtifactRepository remoteRepository,
+                        Collection<Artifact> mavenArtifacts ) throws ArtifactDeployerException
+    {
+        validateParameters( request, mavenArtifacts );
+        delegate.deploy( request, remoteRepository, mavenArtifacts );
+    }
+
+    private void validateParameters( ProjectBuildingRequest request, Collection<Artifact> mavenArtifacts )
+    {
+        if ( request == null )
+        {
+            throw new IllegalArgumentException( "The parameter request is not allowed to be null." );

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.shared.transfer.artifact.resolve.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.ArtifactCoordinate;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactResolver
+        extends DelegatorSupport<ArtifactResolverDelegate>
+        implements ArtifactResolver
+{
+    @Inject
+    public DefaultArtifactResolver( Map<String, ArtifactResolverDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           Artifact mavenArtifact )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, mavenArtifact );
+        return delegate.resolveArtifact( buildingRequest, mavenArtifact );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           ArtifactCoordinate coordinate )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, coordinate );
+        return delegate.resolveArtifact( buildingRequest, coordinate );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Artifact mavenArtifact )
+    {
+        if ( buildingRequest == null )
+        {
+            throw new IllegalArgumentException( "The parameter buildingRequest is not allowed to be null." );
+        }
+        if ( mavenArtifact == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/install/internal/DefaultArtifactInstaller.java
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.shared.transfer.artifact.install.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.install.ArtifactInstaller;
+import org.apache.maven.shared.transfer.artifact.install.ArtifactInstallerException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.io.File;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactInstaller
+        extends DelegatorSupport<ArtifactInstallerDelegate>
+        implements ArtifactInstaller
+{
+    @Inject
+    public DefaultArtifactInstaller( Map<String, ArtifactInstallerDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public void install( ProjectBuildingRequest request,
+                         Collection<Artifact> mavenArtifacts )
+            throws ArtifactInstallerException, IllegalArgumentException
+    {
+        validateParameters( request, mavenArtifacts );
+        delegate.install( request, mavenArtifacts );
+    }
+
+    public void install( ProjectBuildingRequest request,
+                         File localRepository,
+                         Collection<Artifact> mavenArtifacts ) throws ArtifactInstallerException
+    {
+        validateParameters( request, mavenArtifacts );
+        if ( localRepository == null )
+        {
+            throw new IllegalArgumentException( "The parameter localRepository is not allowed to be null." );
+        }
+        if ( !localRepository.isDirectory() )
+        {
+            throw new IllegalArgumentException( "The parameter localRepository must be a directory." );
+        }
+        delegate.install( request, localRepository, mavenArtifacts );
+    }
+
+    private void validateParameters( ProjectBuildingRequest request, Collection<Artifact> mavenArtifacts )
+    {
+        if ( request == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.shared.transfer.artifact.resolve.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.ArtifactCoordinate;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactResolver
+        extends DelegatorSupport<ArtifactResolverDelegate>
+        implements ArtifactResolver
+{
+    @Inject
+    public DefaultArtifactResolver( Map<String, ArtifactResolverDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           Artifact mavenArtifact )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, mavenArtifact );
+        return delegate.resolveArtifact( buildingRequest, mavenArtifact );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           ArtifactCoordinate coordinate )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, coordinate );
+        return delegate.resolveArtifact( buildingRequest, coordinate );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Artifact mavenArtifact )
+    {
+        if ( buildingRequest == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/install/internal/DefaultArtifactInstaller.java
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.shared.transfer.artifact.install.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.install.ArtifactInstaller;
+import org.apache.maven.shared.transfer.artifact.install.ArtifactInstallerException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.io.File;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactInstaller
+        extends DelegatorSupport<ArtifactInstallerDelegate>
+        implements ArtifactInstaller
+{
+    @Inject
+    public DefaultArtifactInstaller( Map<String, ArtifactInstallerDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public void install( ProjectBuildingRequest request,
+                         Collection<Artifact> mavenArtifacts )
+            throws ArtifactInstallerException, IllegalArgumentException
+    {
+        validateParameters( request, mavenArtifacts );
+        delegate.install( request, mavenArtifacts );
+    }
+
+    public void install( ProjectBuildingRequest request,
+                         File localRepository,
+                         Collection<Artifact> mavenArtifacts ) throws ArtifactInstallerException
+    {
+        validateParameters( request, mavenArtifacts );
+        if ( localRepository == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/artifact/resolve/internal/DefaultArtifactResolver.java
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.shared.transfer.artifact.resolve.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.artifact.ArtifactCoordinate;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultArtifactResolver
+        extends DelegatorSupport<ArtifactResolverDelegate>
+        implements ArtifactResolver
+{
+    @Inject
+    public DefaultArtifactResolver( Map<String, ArtifactResolverDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           Artifact mavenArtifact )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, mavenArtifact );
+        return delegate.resolveArtifact( buildingRequest, mavenArtifact );
+    }
+
+    public ArtifactResult resolveArtifact( ProjectBuildingRequest buildingRequest,
+                                           ArtifactCoordinate coordinate )
+            throws ArtifactResolverException, IllegalArgumentException
+    {
+        validateParameters( buildingRequest, coordinate );
+        return delegate.resolveArtifact( buildingRequest, coordinate );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Artifact mavenArtifact )
+    {
+        if ( buildingRequest == null )
+        {
+            throw new IllegalArgumentException( "The parameter buildingRequest is not allowed to be null." );
+        }
+        if ( mavenArtifact == null )
+        {
+            throw new IllegalArgumentException( "The parameter mavenArtifact is not allowed to be null." );
+        }
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, ArtifactCoordinate coordinate )
+    {
+        if ( buildingRequest == null )
+        {
+            throw new IllegalArgumentException( "The parameter buildingRequest is not allowed to be null." );
+        }
+        if ( coordinate == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/dependencies/collect/internal/DefaultDependencyCollector.java
##########
@@ -0,0 +1,105 @@
+package org.apache.maven.shared.transfer.dependencies.collect.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
+import org.apache.maven.shared.transfer.dependencies.collect.CollectorResult;
+import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollector;
+import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollectorException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultDependencyCollector
+        extends DelegatorSupport<DependencyCollectorDelegate>
+        implements DependencyCollector
+{
+    @Inject
+    public DefaultDependencyCollector( Map<String, DependencyCollectorDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public CollectorResult collectDependencies( ProjectBuildingRequest buildingRequest,
+                                                Dependency root ) throws DependencyCollectorException
+    {
+        validateParameters( buildingRequest, root );
+        return delegate.collectDependencies( buildingRequest, root );
+    }
+
+    public CollectorResult collectDependencies( ProjectBuildingRequest buildingRequest,
+                                                DependableCoordinate root ) throws DependencyCollectorException
+    {
+        validateParameters( buildingRequest, root );
+        return delegate.collectDependencies( buildingRequest, root );
+    }
+
+    public CollectorResult collectDependencies( ProjectBuildingRequest buildingRequest,
+                                                Model root ) throws DependencyCollectorException
+    {
+        validateParameters( buildingRequest, root );
+        return delegate.collectDependencies( buildingRequest, root );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, DependableCoordinate root )
+    {
+        validateBuildingRequest( buildingRequest );
+        validateRoot( root );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Dependency root )
+    {
+        validateBuildingRequest( buildingRequest );
+        validateRoot( root );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Model root )
+    {
+        validateBuildingRequest( buildingRequest );
+        validateRoot( root );
+    }
+
+    private void validateBuildingRequest( ProjectBuildingRequest buildingRequest )
+    {
+        if ( buildingRequest == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/dependencies/resolve/internal/DefaultDependencyResolver.java
##########
@@ -0,0 +1,107 @@
+package org.apache.maven.shared.transfer.dependencies.resolve.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
+import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
+import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver;
+import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolverException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultDependencyResolver
+        extends DelegatorSupport<DependencyResolverDelegate>
+        implements DependencyResolver
+{
+    @Inject
+    public DefaultDependencyResolver( Map<String, DependencyResolverDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         DependableCoordinate coordinate,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateParameters( buildingRequest, coordinate );
+        return delegate.resolveDependencies( buildingRequest, coordinate, filter );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         Model model,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateParameters( buildingRequest, model );
+        return delegate.resolveDependencies( buildingRequest, model, filter );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         Collection<Dependency> dependencies,
+                                                         Collection<Dependency> managedDependencies,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateBuildingRequest( buildingRequest );
+        return delegate.resolveDependencies( buildingRequest, dependencies, managedDependencies, filter );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, DependableCoordinate coordinate )
+    {
+        validateBuildingRequest( buildingRequest );
+        if ( coordinate == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/dependencies/collect/internal/DefaultDependencyCollector.java
##########
@@ -0,0 +1,105 @@
+package org.apache.maven.shared.transfer.dependencies.collect.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
+import org.apache.maven.shared.transfer.dependencies.collect.CollectorResult;
+import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollector;
+import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollectorException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultDependencyCollector
+        extends DelegatorSupport<DependencyCollectorDelegate>
+        implements DependencyCollector
+{
+    @Inject
+    public DefaultDependencyCollector( Map<String, DependencyCollectorDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public CollectorResult collectDependencies( ProjectBuildingRequest buildingRequest,
+                                                Dependency root ) throws DependencyCollectorException
+    {
+        validateParameters( buildingRequest, root );
+        return delegate.collectDependencies( buildingRequest, root );
+    }
+
+    public CollectorResult collectDependencies( ProjectBuildingRequest buildingRequest,
+                                                DependableCoordinate root ) throws DependencyCollectorException
+    {
+        validateParameters( buildingRequest, root );
+        return delegate.collectDependencies( buildingRequest, root );
+    }
+
+    public CollectorResult collectDependencies( ProjectBuildingRequest buildingRequest,
+                                                Model root ) throws DependencyCollectorException
+    {
+        validateParameters( buildingRequest, root );
+        return delegate.collectDependencies( buildingRequest, root );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, DependableCoordinate root )
+    {
+        validateBuildingRequest( buildingRequest );
+        validateRoot( root );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Dependency root )
+    {
+        validateBuildingRequest( buildingRequest );
+        validateRoot( root );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Model root )
+    {
+        validateBuildingRequest( buildingRequest );
+        validateRoot( root );
+    }
+
+    private void validateBuildingRequest( ProjectBuildingRequest buildingRequest )
+    {
+        if ( buildingRequest == null )
+        {
+            throw new IllegalArgumentException( "The parameter buildingRequest is not allowed to be null." );
+        }
+    }
+
+    private void validateRoot( Object root )
+    {
+        if ( root == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/dependencies/resolve/internal/DefaultDependencyResolver.java
##########
@@ -0,0 +1,107 @@
+package org.apache.maven.shared.transfer.dependencies.resolve.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
+import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
+import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver;
+import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolverException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultDependencyResolver
+        extends DelegatorSupport<DependencyResolverDelegate>
+        implements DependencyResolver
+{
+    @Inject
+    public DefaultDependencyResolver( Map<String, DependencyResolverDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         DependableCoordinate coordinate,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateParameters( buildingRequest, coordinate );
+        return delegate.resolveDependencies( buildingRequest, coordinate, filter );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         Model model,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateParameters( buildingRequest, model );
+        return delegate.resolveDependencies( buildingRequest, model, filter );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         Collection<Dependency> dependencies,
+                                                         Collection<Dependency> managedDependencies,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateBuildingRequest( buildingRequest );
+        return delegate.resolveDependencies( buildingRequest, dependencies, managedDependencies, filter );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, DependableCoordinate coordinate )
+    {
+        validateBuildingRequest( buildingRequest );
+        if ( coordinate == null )
+        {
+            throw new IllegalArgumentException( "The parameter coordinate is not allowed to be null." );
+        }
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Model model )
+    {
+        validateBuildingRequest( buildingRequest );
+        if ( model == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer-api/src/main/java/org/apache/maven/shared/transfer/dependencies/resolve/internal/DefaultDependencyResolver.java
##########
@@ -0,0 +1,107 @@
+package org.apache.maven.shared.transfer.dependencies.resolve.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter;
+import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
+import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
+import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver;
+import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolverException;
+import org.apache.maven.shared.transfer.support.DelegatorSupport;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ *
+ */
+@Singleton
+@Named
+public class DefaultDependencyResolver
+        extends DelegatorSupport<DependencyResolverDelegate>
+        implements DependencyResolver
+{
+    @Inject
+    public DefaultDependencyResolver( Map<String, DependencyResolverDelegate> delegates )
+    {
+        super( delegates );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         DependableCoordinate coordinate,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateParameters( buildingRequest, coordinate );
+        return delegate.resolveDependencies( buildingRequest, coordinate, filter );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         Model model,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateParameters( buildingRequest, model );
+        return delegate.resolveDependencies( buildingRequest, model, filter );
+    }
+
+    public Iterable<ArtifactResult> resolveDependencies( ProjectBuildingRequest buildingRequest,
+                                                         Collection<Dependency> dependencies,
+                                                         Collection<Dependency> managedDependencies,
+                                                         TransformableFilter filter )
+            throws DependencyResolverException
+    {
+        validateBuildingRequest( buildingRequest );
+        return delegate.resolveDependencies( buildingRequest, dependencies, managedDependencies, filter );
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, DependableCoordinate coordinate )
+    {
+        validateBuildingRequest( buildingRequest );
+        if ( coordinate == null )
+        {
+            throw new IllegalArgumentException( "The parameter coordinate is not allowed to be null." );
+        }
+    }
+
+    private void validateParameters( ProjectBuildingRequest buildingRequest, Model model )
+    {
+        validateBuildingRequest( buildingRequest );
+        if ( model == null )
+        {
+            throw new IllegalArgumentException( "The parameter model is not allowed to be null." );
+        }
+
+    }
+
+    private void validateBuildingRequest( ProjectBuildingRequest buildingRequest )
+    {
+        if ( buildingRequest == null )

Review comment:
       NPE

##########
File path: maven-artifact-transfer/pom.xml
##########
@@ -0,0 +1,188 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.shared</groupId>
+    <artifactId>maven-artifact-transfer-parent</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-artifact-transfer</artifactId>
+
+  <name>Apache Maven Artifact Transfer</name>
+
+  <properties>
+    <downstreamMaven.version>3.1.0</downstreamMaven.version>

Review comment:
       3.1.1




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org