Author: gboue
Date: Sun Oct 30 18:07:25 2016
New Revision: 1767174

URL: http://svn.apache.org/viewvc?rev=1767174&view=rev
Log:
- Using latest Maven Artifact Transfer (re-versioned to 0.9.0-SNAPSHOT).
- Adding ITs for the manual installation of files with POM and generating 
checksums in a overridden local repository

Added:
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/pom.xml
   (with props)
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/setup.bsh
   (with props)
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.jar
   (with props)
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.properties
   (with props)
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/verify.bsh
   (with props)
Modified:
    maven/plugins/trunk/maven-install-plugin/pom.xml
    
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum/verify.bsh
    
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
    
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
    
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
    
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallMojoTest.java
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-checksum/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-packaging-pom/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-with-attached-artifacts/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/configured-install-test/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-basic-test/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-test-generatePom/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-checksum/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-classifier/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pom-as-packaging/plugin-config.xml
    
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml

Modified: maven/plugins/trunk/maven-install-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/pom.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-install-plugin/pom.xml Sun Oct 30 18:07:25 2016
@@ -83,7 +83,7 @@
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-artifact-transfer</artifactId>
-      <version>3.0.0-SNAPSHOT</version>
+      <version>0.9.0-SNAPSHOT</version>
     </dependency>
     <!-- Upgrade of transitive dependency. -->
     <dependency>

Added: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/invoker.properties?rev=1767174&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/invoker.properties
 Sun Oct 30 18:07:25 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 = 
org.apache.maven.plugins:maven-install-plugin:${project.version}:install-file

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/pom.xml?rev=1767174&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/pom.xml
 Sun Oct 30 18:07:25 2016
@@ -0,0 +1,46 @@
+<?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.install.lro</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <description>
+    Tests the manual installation into a different local repo than the one 
configured in the settings
+    (MINSTALL-35), also installing checksums.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/setup.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/setup.bsh?rev=1767174&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/setup.bsh
 (added)
+++ 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/setup.bsh
 Sun Oct 30 18:07:25 2016
@@ -0,0 +1,29 @@
+/*
+ * 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 java.util.*;
+
+import org.codehaus.plexus.util.*;
+
+File file = new File( basedir, "target" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/setup.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/setup.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.jar
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.jar?rev=1767174&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.properties?rev=1767174&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.properties
 (added)
+++ 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.properties
 Sun Oct 30 18:07:25 2016
@@ -0,0 +1,25 @@
+# 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.
+
+file = test.jar
+groupId = gid
+artifactId = test
+version = 0.1
+packaging = jar
+createChecksum = true
+generatePom = true
+localRepositoryPath = target/local-repo

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/verify.bsh?rev=1767174&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/verify.bsh
 (added)
+++ 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/verify.bsh
 Sun Oct 30 18:07:25 2016
@@ -0,0 +1,56 @@
+/*
+ * 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 java.util.*;
+
+import org.apache.maven.plugin.install.Utils;
+
+String[] paths =
+{
+    "gid/test/0.1/test-0.1.jar",
+    "gid/test/0.1/test-0.1.jar.md5",
+    "gid/test/0.1/test-0.1.jar.sha1",
+    "gid/test/0.1/test-0.1.pom",
+    "gid/test/0.1/test-0.1.pom.md5",
+    "gid/test/0.1/test-0.1.pom.sha1",
+};
+
+Set cksumToCheckPaths = new HashSet( Arrays.asList( new String[]
+{
+    "gid/test/0.1/test-0.1.pom",
+    "gid/test/0.1/test-0.1.jar"
+} ) );
+
+for ( String path : paths )
+{
+    File file = new File( new File( basedir, "target/local-repo" ), path );
+    System.out.println( "Checking for existence of " + file );
+    if ( !file.isFile() )
+    {
+        throw new FileNotFoundException( "Existing: " + file.getAbsolutePath() 
);
+    }
+    if ( cksumToCheckPaths.contains( path ) )
+    {    
+        System.out.println( "Verifying " + file );
+        Utils.verifyChecksum( file );
+    }
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum-generatePom/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum/verify.bsh?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum/verify.bsh
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/it/local-repo-override-with-checksum/verify.bsh
 Sun Oct 30 18:07:25 2016
@@ -20,6 +20,8 @@
 import java.io.*;
 import java.util.*;
 
+import org.apache.maven.plugin.install.Utils;
+
 String[] paths =
 {
     "gid/test/0.1/test-0.1.jar",
@@ -27,6 +29,11 @@ String[] paths =
     "gid/test/0.1/test-0.1.jar.sha1",
 };
 
+Set cksumToCheckPaths = new HashSet( Arrays.asList( new String[]
+{
+    "gid/test/0.1/test-0.1.jar"
+} ) );
+
 for ( String path : paths )
 {
     File file = new File( new File( basedir, "target/local-repo" ), path );
@@ -35,6 +42,11 @@ for ( String path : paths )
     {
         throw new FileNotFoundException( "Existing: " + file.getAbsolutePath() 
);
     }
+    if ( cksumToCheckPaths.contains( path ) )
+    {    
+        System.out.println( "Verifying " + file );
+        Utils.verifyChecksum( file );
+    }
 }
 
 return true;

Modified: 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/AbstractInstallMojo.java
 Sun Oct 30 18:07:25 2016
@@ -22,11 +22,11 @@ package org.apache.maven.plugin.install;
 import java.io.File;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.project.artifact.ProjectArtifactMetadata;
 import org.apache.maven.shared.repository.RepositoryManager;
 
@@ -44,11 +44,6 @@ public abstract class AbstractInstallMoj
     protected RepositoryManager repositoryManager;
 
     /**
-     */
-    @Parameter( property = "localRepository", required = true, readonly = true 
)
-    protected ArtifactRepository localRepository;
-
-    /**
      * Flag whether to create checksums (MD5, SHA-1) or not.
      *
      * @since 2.2
@@ -72,10 +67,10 @@ public abstract class AbstractInstallMoj
      * @param artifact The artifact whose local repo path should be 
determined, must not be <code>null</code>.
      * @return The absolute path to the artifact when installed, never 
<code>null</code>.
      */
-    protected File getLocalRepoFile( Artifact artifact )
+    protected File getLocalRepoFile( ProjectBuildingRequest buildingRequest, 
Artifact artifact )
     {
-        String path = repositoryManager.getPathForLocalArtifact( 
session.getProjectBuildingRequest(), artifact );
-        return new File( localRepository.getBasedir(), path );
+        String path = repositoryManager.getPathForLocalArtifact( 
buildingRequest, artifact );
+        return new File( repositoryManager.getLocalRepositoryBasedir( 
buildingRequest ), path );
     }
 
     /**
@@ -85,10 +80,10 @@ public abstract class AbstractInstallMoj
      * @param metadata The artifact metadata whose local repo path should be 
determined, must not be <code>null</code>.
      * @return The absolute path to the artifact metadata when installed, 
never <code>null</code>.
      */
-    protected File getLocalRepoFile( ProjectArtifactMetadata metadata )
+    protected File getLocalRepoFile( ProjectBuildingRequest buildingRequest, 
ProjectArtifactMetadata metadata )
     {
-        String path = localRepository.pathOfLocalRepositoryMetadata( metadata, 
localRepository );
-        return new File( localRepository.getBasedir(), path );
+        String path = repositoryManager.getPathForLocalMetadata( 
buildingRequest, metadata );
+        return new File( repositoryManager.getLocalRepositoryBasedir( 
buildingRequest ), path );
     }
 
 }

Modified: 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java
 Sun Oct 30 18:07:25 2016
@@ -227,7 +227,7 @@ public class InstallFileMojo
         MavenProject project = createMavenProject();
         Artifact artifact = project.getArtifact();
         
-        if ( file.equals( getLocalRepoFile( artifact ) ) )
+        if ( file.equals( getLocalRepoFile( buildingRequest, artifact ) ) )
         {
             throw new MojoFailureException( "Cannot install artifact. "
                 + "Artifact is already in the local repository.\n\nFile in 
question is: " + file + "\n" );
@@ -264,7 +264,7 @@ public class InstallFileMojo
                 File generatedPomFile = generatePomFile();
                 ProjectArtifactMetadata pomMetadata = new 
ProjectArtifactMetadata( artifact, generatedPomFile );
                 if ( Boolean.TRUE.equals( generatePom )
-                    || ( generatePom == null && !getLocalRepoFile( pomMetadata 
).exists() ) )
+                    || ( generatePom == null && !getLocalRepoFile( 
buildingRequest, pomMetadata ).exists() ) )
                 {
                     getLog().debug( "Installing generated POM" );
                     if ( classifier == null )
@@ -300,7 +300,7 @@ public class InstallFileMojo
                 new ProjectInstallerRequest().setProject( project 
).setCreateChecksum( createChecksum ).setUpdateReleaseInfo( updateReleaseInfo );
             // CHECKSTYLE_ON: LineLength
 
-            installer.install( buildingRequest, projectInstallerRequest, 
localRepository );
+            installer.install( buildingRequest, projectInstallerRequest );
         }
         catch ( Exception e )
         {

Modified: 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
 Sun Oct 30 18:07:25 2016
@@ -138,8 +138,7 @@ public class InstallMojo
     {
         try
         {
-            installer.install( session.getProjectBuildingRequest(), pir,
-                                      localRepository );
+            installer.install( session.getProjectBuildingRequest(), pir );
         }
         catch ( IOException e )
         {

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallMojoTest.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallMojoTest.java?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallMojoTest.java
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallMojoTest.java
 Sun Oct 30 18:07:25 2016
@@ -29,7 +29,6 @@ import java.util.Map;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.install.stubs.AttachedArtifactStub0;
@@ -38,6 +37,7 @@ import org.apache.maven.plugin.testing.A
 import org.apache.maven.project.DefaultProjectBuildingRequest;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.shared.repository.RepositoryManager;
 import org.apache.maven.shared.utils.io.FileUtils;
 import org.sonatype.aether.impl.internal.EnhancedLocalRepositoryManager;
 import org.sonatype.aether.util.ChecksumUtils;
@@ -264,10 +264,11 @@ public class InstallMojoTest
         File file = new File( getBasedir(), 
"target/test-classes/unit/basic-install-checksum/" + "maven-test-jar.jar" );
 
         MavenProject project = (MavenProject) getVariableValueFromObject( 
mojo, "project" );
+        MavenSession mavenSession = createMavenSession();
         updateMavenProject( project );
 
         setVariableValueToObject( mojo, "reactorProjects", 
Collections.singletonList( project ) );
-        setVariableValueToObject( mojo, "session", createMavenSession() );
+        setVariableValueToObject( mojo, "session", mavenSession );
 
         artifact = (InstallArtifactStub) project.getArtifact();
 
@@ -289,9 +290,12 @@ public class InstallMojoTest
             }
         }
 
-        ArtifactRepository localRepo = (ArtifactRepository) 
getVariableValueFromObject( mojo, "localRepository" );
+        RepositoryManager repoManager = (RepositoryManager) 
getVariableValueFromObject( mojo, "repositoryManager" );
+        
+        ProjectBuildingRequest pbr = mavenSession.getProjectBuildingRequest();
 
-        File pom = new File( localRepo.getBasedir(), 
localRepo.pathOfLocalRepositoryMetadata( metadata, localRepo ) );
+        File pom = new File( repoManager.getLocalRepositoryBasedir( pbr ),
+                             repoManager.getPathForLocalMetadata( pbr, 
metadata ) );
 
         assertTrue( pom.exists() );
 

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-checksum/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-checksum/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-checksum/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-checksum/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -22,7 +22,6 @@ under the License.
       <plugin>
         <artifactId>maven-install-plugin</artifactId>
         <configuration>
-          <localRepository>${localRepository}</localRepository>
           <createChecksum>true</createChecksum>
           <project 
implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub">
             
<file>${basedir}/src/test/resources/unit/basic-install-checksum/plugin-config.xml</file>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-packaging-pom/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-packaging-pom/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-packaging-pom/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-packaging-pom/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -22,7 +22,6 @@ under the License.
       <plugin>
         <artifactId>maven-install-plugin</artifactId>
         <configuration>
-          <localRepository>${localRepository}</localRepository>
           <project 
implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub">
             
<file>${basedir}/src/test/resources/unit/basic-install-test-packaging-pom/plugin-config.xml</file>
             <packaging>pom</packaging>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-with-attached-artifacts/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-with-attached-artifacts/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-with-attached-artifacts/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test-with-attached-artifacts/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -22,7 +22,6 @@ under the License.
       <plugin>
         <artifactId>maven-install-plugin</artifactId>
         <configuration>
-          <localRepository>${localRepository}</localRepository>
           <project 
implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub">
             
<file>${basedir}/src/test/resources/unit/basic-install-test-with-attached-artifacts/plugin-config.xml</file>
             <packaging>jar</packaging>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/basic-install-test/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -22,7 +22,6 @@ under the License.
       <plugin>
         <artifactId>maven-install-plugin</artifactId>
         <configuration>
-          <localRepository>${localRepository}</localRepository>
           <project 
implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub">
             
<file>${basedir}/src/test/resources/unit/basic-install-test/plugin-config.xml</file>
             <packaging>jar</packaging>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/configured-install-test/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/configured-install-test/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/configured-install-test/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/configured-install-test/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -23,7 +23,6 @@ under the License.
         <artifactId>maven-install-plugin</artifactId>
         <configuration>
           <updateReleaseInfo>true</updateReleaseInfo>
-          <localRepository>${localRepository}</localRepository>
           <project 
implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub">
             
<file>${basedir}/src/test/resources/unit/configured-install-test/plugin-config.xml</file>
             <packaging>jar</packaging>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-basic-test/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-basic-test/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-basic-test/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-basic-test/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -28,7 +28,6 @@ under the License.
           <packaging>jar</packaging>
           
<file>${basedir}/target/test-classes/unit/install-file-basic-test/target/maven-install-test-1.0-SNAPSHOT.jar
           </file>
-          <localRepository>${localRepository}</localRepository>
         </configuration>
       </plugin>
     </plugins>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-test-generatePom/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-test-generatePom/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-test-generatePom/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-test-generatePom/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -30,7 +30,6 @@ under the License.
             
${basedir}/src/test/resources/unit/install-file-test-generatePom/target/maven-install-test-1.0-SNAPSHOT.jar
           </file>
           <generatePom>true</generatePom>
-          <localRepository>${localRepository}</localRepository>
         </configuration>
       </plugin>
     </plugins>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-checksum/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-checksum/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-checksum/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-checksum/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -27,7 +27,6 @@ under the License.
           <version>1.0-SNAPSHOT</version>
           <packaging>jar</packaging>
           
<file>${basedir}/src/test/resources/unit/install-file-with-checksum/maven-test-jar.jar</file>
-          <localRepository>${localRepository}</localRepository>
           <createChecksum>true</createChecksum>
           <generatePom>true</generatePom>
         </configuration>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-classifier/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-classifier/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-classifier/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-classifier/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -29,7 +29,6 @@ under the License.
           <classifier>sources</classifier>
           
<file>${basedir}/target/test-classes/unit/install-file-with-classifier/target/maven-install-test-1.0-SNAPSHOT.jar
           </file>
-          <localRepository>${localRepository}</localRepository>
         </configuration>
       </plugin>
     </plugins>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pom-as-packaging/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pom-as-packaging/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pom-as-packaging/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pom-as-packaging/plugin-config.xml
 Sun Oct 30 18:07:25 2016
@@ -27,7 +27,6 @@ under the License.
           <version>1.0-SNAPSHOT</version>
           <packaging>pom</packaging>
           
<file>${basedir}/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml</file>
-          <localRepository>${localRepository}</localRepository>
         </configuration>
       </plugin>
     </plugins>

Modified: 
maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml?rev=1767174&r1=1767173&r2=1767174&view=diff
==============================================================================
Binary files - no diff available.



Reply via email to