Author: gboue
Date: Sat Dec 17 15:03:53 2016
New Revision: 1774770

URL: http://svn.apache.org/viewvc?rev=1774770&view=rev
Log:
[MDEP-548] The get Mojo doesn't resolve the artifact when setting transitive to 
false

When transitive is set to false, the ArtifactResolver needs to be used to 
resolve just the specified artifact, without its transitive dependencies.

Added:
    
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.jar
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.jar
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.jar
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom
   (with props)
    maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/pom.xml
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/test.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh
   (with props)
    maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/invoker.properties
   (with props)
    maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/pom.xml 
  (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/setup.bsh   
(with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/test.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/verify.bsh  
 (with props)
Modified:
    
maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.jar
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.jar?rev=1774770&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,42 @@
+<?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>
+
+  <groupId>org.apache.maven.its.dependency</groupId>
+  <artifactId>get-artifact</artifactId>
+  <version>1.0</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.dependency</groupId>
+      <artifactId>get-artifact-transitive</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+
+</project>

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.jar
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.jar?rev=1774770&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,35 @@
+<?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>
+
+  <groupId>org.apache.maven.its.dependency</groupId>
+  <artifactId>get-artifact-maven-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <version>1.0</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.jar
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.jar?rev=1774770&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,30 @@
+<?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>
+
+  <groupId>org.apache.maven.its.dependency</groupId>
+  <artifactId>get-artifact-transitive</artifactId>
+  <version>1.0</version>
+
+</project>

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:get

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,35 @@
+<?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>
+  
+  <groupId>org.apache.maven.plugins.dependency.its</groupId>
+  <artifactId>get-artifact-maven-plugin</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <description>
+    Tests that when the packaging is different than the extension, the main 
artifact is correctly resolved.
+  </description>
+
+</project>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,41 @@
+/*
+ * 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 java.io.*;
+
+import org.codehaus.plexus.util.*;
+
+String[] foldersToDelete = {
+    "org/apache/maven/its/dependency/get-artifact-maven-plugin"
+};
+
+try
+{
+    for ( String folderToDelete : foldersToDelete )
+    {
+        FileUtils.deleteDirectory( new File( localRepositoryPath, 
folderToDelete ) );
+    }
+}
+catch ( IOException e )
+{
+    e.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,18 @@
+# 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.
+
+artifact=org.apache.maven.its.dependency:get-artifact-maven-plugin:1.0:maven-plugin

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,37 @@
+/*
+ * 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 java.io.*;
+
+String[] expectedFiles = {
+    
"org/apache/maven/its/dependency/get-artifact-maven-plugin/1.0/get-artifact-maven-plugin-1.0.jar",
+    
"org/apache/maven/its/dependency/get-artifact-maven-plugin/1.0/get-artifact-maven-plugin-1.0.pom"
+};
+
+for ( String expectedFile : expectedFiles )
+{
+    File file = new File( localRepositoryPath, expectedFile );
+    System.out.println( "Checking for existence of " + file );
+    if ( !file.isFile() )
+    {
+        throw new Exception( "Missing file " + file );
+    }
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:get

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+  
+<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>
+  
+  <groupId>org.apache.maven.plugins.dependency.its</groupId>
+  <artifactId>get-artifact-no-transitive</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <url>https://issues.apache.org/jira/browse/MDEP-548</url>
+  <description>
+    Tests that transitive=false disables the resolution of the transitive 
dependencies, but that the artifact itself
+    is still resolved.
+  </description>
+
+</project>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,42 @@
+/*
+ * 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 java.io.*;
+
+import org.codehaus.plexus.util.*;
+
+String[] foldersToDelete = {
+    "org/apache/maven/its/dependency/get-artifact",
+    "org/apache/maven/its/dependency/get-artifact-transitive"
+};
+
+try
+{
+    for ( String folderToDelete : foldersToDelete )
+    {
+        FileUtils.deleteDirectory( new File( localRepositoryPath, 
folderToDelete ) );
+    }
+}
+catch ( IOException e )
+{
+    e.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,19 @@
+# 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.
+
+artifact=org.apache.maven.its.dependency:get-artifact:1.0
+transitive=false

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,52 @@
+/*
+ * 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 java.io.*;
+
+String[] expectedFiles = {
+    "org/apache/maven/its/dependency/get-artifact/1.0/get-artifact-1.0.jar",
+    "org/apache/maven/its/dependency/get-artifact/1.0/get-artifact-1.0.pom"
+};
+
+for ( String expectedFile : expectedFiles )
+{
+    File file = new File( localRepositoryPath, expectedFile );
+    System.out.println( "Checking for existence of " + file );
+    if ( !file.isFile() )
+    {
+        throw new Exception( "Missing file " + file );
+    }
+}
+
+String[] notExpectedFiles = {
+    
"org/apache/maven/its/dependency/get-artifact-transitive/1.0/get-artifact-transitive-1.0.jar",
+    
"org/apache/maven/its/dependency/get-artifact-transitive/1.0/get-artifact-transitive-1.0.pom"
+};
+
+for ( String notExpectedFile : notExpectedFiles )
+{
+    File file = new File( localRepositoryPath, notExpectedFile );
+    System.out.println( "Checking for absence of " + file );
+    if ( file.isFile() )
+    {
+        throw new Exception( "Existing file " + file );
+    }
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:get

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/pom.xml?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/pom.xml
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,35 @@
+<?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>
+  
+  <groupId>org.apache.maven.plugins.dependency.its</groupId>
+  <artifactId>get-artifact-transitive</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <description>
+    Tests that using get with the artifact parameter resolves this artifact 
and its transitive dependencies.
+  </description>
+
+</project>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,42 @@
+/*
+ * 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 java.io.*;
+
+import org.codehaus.plexus.util.*;
+
+String[] foldersToDelete = {
+    "org/apache/maven/its/dependency/get-artifact",
+    "org/apache/maven/its/dependency/get-artifact-transitive"
+};
+
+try
+{
+    for ( String folderToDelete : foldersToDelete )
+    {
+        FileUtils.deleteDirectory( new File( localRepositoryPath, 
folderToDelete ) );
+    }
+}
+catch ( IOException e )
+{
+    e.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/test.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/test.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/test.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/test.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,18 @@
+# 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.
+
+artifact=org.apache.maven.its.dependency:get-artifact:1.0

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,39 @@
+/*
+ * 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 java.io.*;
+
+String[] expectedFiles = {
+    "org/apache/maven/its/dependency/get-artifact/1.0/get-artifact-1.0.jar",
+    "org/apache/maven/its/dependency/get-artifact/1.0/get-artifact-1.0.pom",
+    
"org/apache/maven/its/dependency/get-artifact-transitive/1.0/get-artifact-transitive-1.0.jar",
+    
"org/apache/maven/its/dependency/get-artifact-transitive/1.0/get-artifact-transitive-1.0.pom"
+};
+
+for ( String expectedFile : expectedFiles )
+{
+    File file = new File( localRepositoryPath, expectedFile );
+    System.out.println( "Checking for existence of " + file );
+    if ( !file.isFile() )
+    {
+        throw new Exception( "Missing file " + file );
+    }
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/invoker.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/invoker.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:get

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/pom.xml?rev=1774770&view=auto
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/pom.xml 
(added)
+++ maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/pom.xml 
Sat Dec 17 15:03:53 2016
@@ -0,0 +1,35 @@
+<?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>
+  
+  <groupId>org.apache.maven.plugins.dependency.its</groupId>
+  <artifactId>get-gav</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <description>
+    Tests that artifact and its transitive dependencies are correctly resolved 
when using the separate GAV options.
+  </description>
+
+</project>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/setup.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/setup.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/setup.bsh 
(added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/setup.bsh 
Sat Dec 17 15:03:53 2016
@@ -0,0 +1,42 @@
+/*
+ * 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 java.io.*;
+
+import org.codehaus.plexus.util.*;
+
+String[] foldersToDelete = {
+    "org/apache/maven/its/dependency/get-artifact",
+    "org/apache/maven/its/dependency/get-artifact-transitive"
+};
+
+try
+{
+    for ( String folderToDelete : foldersToDelete )
+    {
+        FileUtils.deleteDirectory( new File( localRepositoryPath, 
folderToDelete ) );
+    }
+}
+catch ( IOException e )
+{
+    e.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/setup.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/setup.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/test.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/test.properties?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/test.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/test.properties
 Sat Dec 17 15:03:53 2016
@@ -0,0 +1,20 @@
+# 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.
+
+groupId=org.apache.maven.its.dependency
+artifactId=get-artifact
+version=1.0

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/verify.bsh?rev=1774770&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/verify.bsh 
(added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/verify.bsh 
Sat Dec 17 15:03:53 2016
@@ -0,0 +1,39 @@
+/*
+ * 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 java.io.*;
+
+String[] expectedFiles = {
+    "org/apache/maven/its/dependency/get-artifact/1.0/get-artifact-1.0.jar",
+    "org/apache/maven/its/dependency/get-artifact/1.0/get-artifact-1.0.pom",
+    
"org/apache/maven/its/dependency/get-artifact-transitive/1.0/get-artifact-transitive-1.0.jar",
+    
"org/apache/maven/its/dependency/get-artifact-transitive/1.0/get-artifact-transitive-1.0.pom"
+};
+
+for ( String expectedFile : expectedFiles )
+{
+    File file = new File( localRepositoryPath, expectedFile );
+    System.out.println( "Checking for existence of " + file );
+    if ( !file.isFile() )
+    {
+        throw new Exception( "Missing file " + file );
+    }
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/get-gav/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java?rev=1774770&r1=1774769&r2=1774770&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
 Sat Dec 17 15:03:53 2016
@@ -26,6 +26,8 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.maven.artifact.handler.ArtifactHandler;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
 import org.apache.maven.artifact.repository.MavenArtifactRepository;
@@ -39,8 +41,12 @@ import org.apache.maven.plugins.annotati
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.DefaultProjectBuildingRequest;
 import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.artifact.ArtifactCoordinate;
+import org.apache.maven.shared.artifact.DefaultArtifactCoordinate;
 import org.apache.maven.shared.artifact.resolve.ArtifactResolver;
+import org.apache.maven.shared.artifact.resolve.ArtifactResolverException;
 import org.apache.maven.shared.dependencies.DefaultDependableCoordinate;
+import org.apache.maven.shared.dependencies.DependableCoordinate;
 import org.apache.maven.shared.dependencies.resolve.DependencyResolver;
 import 
org.apache.maven.shared.dependencies.resolve.DependencyResolverException;
 import org.codehaus.plexus.util.StringUtils;
@@ -71,6 +77,9 @@ public class GetMojo
    @Component
    private DependencyResolver dependencyResolver;
 
+   @Component
+   private ArtifactHandlerManager artifactHandlerManager;
+
     /**
      * Map that contains the layouts.
      */
@@ -212,19 +221,17 @@ public class GetMojo
             if ( transitive )
             {
                 getLog().info( "Resolving " + coordinate + " with transitive 
dependencies" );
+                dependencyResolver.resolveDependencies( buildingRequest, 
coordinate, null );
             }
             else
             {
                 getLog().info( "Resolving " + coordinate );
+                artifactResolver.resolveArtifact( buildingRequest, 
toArtifactCoordinate( coordinate ) );
             }
-
-            // FIXME
-            // artifactResolver.resolveArtifact( buildingRequest, coordinate );
-
-            if ( transitive )
-            {
-                dependencyResolver.resolveDependencies( buildingRequest, 
coordinate, null );
-            }
+        }
+        catch ( ArtifactResolverException e )
+        {
+            throw new MojoExecutionException( "Couldn't download artifact: " + 
e.getMessage(), e );
         }
         catch ( DependencyResolverException e )
         {
@@ -232,6 +239,18 @@ public class GetMojo
         }
     }
 
+    private ArtifactCoordinate toArtifactCoordinate( DependableCoordinate 
dependableCoordinate )
+    {
+        ArtifactHandler artifactHandler = 
artifactHandlerManager.getArtifactHandler( dependableCoordinate.getType() );
+        DefaultArtifactCoordinate artifactCoordinate = new 
DefaultArtifactCoordinate();
+        artifactCoordinate.setGroupId( dependableCoordinate.getGroupId() );
+        artifactCoordinate.setArtifactId( dependableCoordinate.getArtifactId() 
);
+        artifactCoordinate.setVersion( dependableCoordinate.getVersion() );
+        artifactCoordinate.setClassifier( dependableCoordinate.getClassifier() 
);
+        artifactCoordinate.setExtension( artifactHandler.getExtension() );
+        return artifactCoordinate;
+    }
+
     ArtifactRepository parseRepository( String repo, ArtifactRepositoryPolicy 
policy )
         throws MojoFailureException
     {


Reply via email to