Repository: archiva
Updated Branches:
  refs/heads/master 3fe100086 -> 5de7825b4


Fixing wrong checksum files of proxy repositories

Fixes https://issues.apache.org/jira/browse/MRM-1926


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/5de7825b
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/5de7825b
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/5de7825b

Branch: refs/heads/master
Commit: 5de7825b42441a17d3c7856032ef3d3d65827975
Parents: 3fe1000
Author: Martin Stockhammer <marti...@apache.org>
Authored: Mon Oct 17 22:11:57 2016 +0200
Committer: Martin Stockhammer <marti...@apache.org>
Committed: Mon Oct 17 22:11:57 2016 +0200

----------------------------------------------------------------------
 .../storage/maven2/RepositoryModelResolver.java | 25 ++++++++++++++++----
 .../1.0/test-artifact-module-a-1.0.pom.md5      |  1 +
 .../1.0/test-artifact-module-a-1.0.pom.sha1     |  1 +
 .../1.0/test-artifact-module-b-1.0.pom.md5      |  1 +
 .../1.0/test-artifact-module-b-1.0.pom.sha1     |  1 +
 .../1/test-artifact-parent-1.pom.md5            |  1 +
 .../1/test-artifact-parent-1.pom.sha1           |  1 +
 .../1.0/test-artifact-root-1.0.pom.md5          |  1 +
 .../1.0/test-artifact-root-1.0.pom.sha1         |  1 +
 ...pshot-artifact-module-a-1.1-SNAPSHOT.pom.md5 |  1 +
 ...shot-artifact-module-a-1.1-SNAPSHOT.pom.sha1 |  1 +
 ...-artifact-root-1.1-20100310.014828-2.pom.md5 |  1 +
 ...artifact-root-1.1-20100310.014828-2.pom.sha1 |  1 +
 13 files changed, 32 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
 
b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
index 0cb9264..b84a859 100644
--- 
a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
+++ 
b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
@@ -413,15 +413,30 @@ public class RepositoryModelResolver
         return connected;
     }
 
-    private File transferChecksum( Wagon wagon, RemoteRepository 
remoteRepository, String remotePath, File resource,
-                                   File tmpDirectory, String ext )
+    /**
+     *
+     * @param wagon The wagon instance that should be connected.
+     * @param remoteRepository The repository from where the checksum file 
should be retrieved
+     * @param remotePath The remote path of the artifact (without extension)
+     * @param resource The local artifact (without extension)
+     * @param workingDir The working directory where the downloaded file 
should be placed to
+     * @param ext The extension of th checksum file
+     * @return The file where the data has been downloaded to.
+     * @throws AuthorizationException
+     * @throws TransferFailedException
+     * @throws ResourceDoesNotExistException
+     */
+    private File transferChecksum( final Wagon wagon, final RemoteRepository 
remoteRepository,
+                                   final String remotePath, final File 
resource,
+                                   final File workingDir, final String ext )
         throws AuthorizationException, TransferFailedException, 
ResourceDoesNotExistException
     {
-        File destFile = new File( tmpDirectory, resource.getName() + ext );
+        File destFile = new File( workingDir, resource.getName() + ext );
+        String remoteChecksumPath = remotePath + ext;
 
-        log.info( "Retrieving {} from {}", remotePath, 
remoteRepository.getName() );
+        log.info( "Retrieving {} from {}", remoteChecksumPath, 
remoteRepository.getName() );
 
-        wagon.get( addParameters( remotePath, remoteRepository ), destFile );
+        wagon.get( addParameters( remoteChecksumPath, remoteRepository ), 
destFile );
 
         log.debug( "Downloaded successfully." );
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.md5
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.md5
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.md5
new file mode 100644
index 0000000..40dc44a
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.md5
@@ -0,0 +1 @@
+61a4d030260fc6bee0681cf99ba54674  test-artifact-module-a-1.0.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.sha1
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.sha1
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.sha1
new file mode 100644
index 0000000..59d8111
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.sha1
@@ -0,0 +1 @@
+6f54bc4223bc39d7880420f66baa3a24d7f9c181  test-artifact-module-a-1.0.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.md5
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.md5
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.md5
new file mode 100644
index 0000000..c087db3
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.md5
@@ -0,0 +1 @@
+daa5fa59239b1a81d7c04aea1c235aad  test-artifact-module-b-1.0.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.sha1
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.sha1
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.sha1
new file mode 100644
index 0000000..3315ef8
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-b/1.0/test-artifact-module-b-1.0.pom.sha1
@@ -0,0 +1 @@
+3d0a66ad4f202b823feb367c46c7574cbb0301c8  test-artifact-module-b-1.0.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.md5
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.md5
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.md5
new file mode 100644
index 0000000..98587da
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.md5
@@ -0,0 +1 @@
+92c60efe85e23fe5afd8a854cea87209  test-artifact-parent-1.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.sha1
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.sha1
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.sha1
new file mode 100644
index 0000000..a0bcb35
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.sha1
@@ -0,0 +1 @@
+6eca3509acf66023c29e2bc17f73e79d1d1a341a  test-artifact-parent-1.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.md5
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.md5
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.md5
new file mode 100644
index 0000000..8870d46
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.md5
@@ -0,0 +1 @@
+034449f8696981edce2485b841a02a47  test-artifact-root-1.0.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.sha1
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.sha1
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.sha1
new file mode 100644
index 0000000..eba4197
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.sha1
@@ -0,0 +1 @@
+bef26aec1a0714cec7fa56cdbb7ebcdb452295eb  test-artifact-root-1.0.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.md5
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.md5
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.md5
new file mode 100644
index 0000000..a36564b
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.md5
@@ -0,0 +1 @@
+3b689a3c3cacecdf4371c342606211f1  
test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.sha1
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.sha1
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.sha1
new file mode 100644
index 0000000..e9d1ab6
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom.sha1
@@ -0,0 +1 @@
+b401e87baeeb0174efd85eaf327d9c98efe79cf1  
test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.md5
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.md5
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.md5
new file mode 100644
index 0000000..278e71b
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.md5
@@ -0,0 +1 @@
+0c304367d7a99291eb8292b1fe7114a2  
test-snapshot-artifact-root-1.1-20100310.014828-2.pom

http://git-wip-us.apache.org/repos/asf/archiva/blob/5de7825b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.sha1
----------------------------------------------------------------------
diff --git 
a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.sha1
 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.sha1
new file mode 100644
index 0000000..3fe44e1
--- /dev/null
+++ 
b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom.sha1
@@ -0,0 +1 @@
+e5e6ca9ae3628ae474c155619467848dc900b8cf  
test-snapshot-artifact-root-1.1-20100310.014828-2.pom

Reply via email to