geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r614105 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
Date Tue, 22 Jan 2008 03:16:49 GMT
Author: gawor
Date: Mon Jan 21 19:16:47 2008
New Revision: 614105

URL: http://svn.apache.org/viewvc?rev=614105&view=rev
Log:
fix installing plugins from remote repos (GERONIMO-3775)

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java?rev=614105&r1=614104&r2=614105&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/RemoteSourceRepository.java
Mon Jan 21 19:16:47 2008
@@ -101,7 +101,7 @@
             // The maven-metadata file contains this extra information.
             if (version.toString().indexOf("SNAPSHOT") >= 0 && !(version instanceof
SnapshotVersion)) {
                 // base path for the artifact version in a maven repo
-                URI basePath = base.resolve(artifact.getGroupId().replace('.', '/') + "/"
+ artifact.getArtifactId() + "/" + version);
+                URI basePath = base.resolve(artifact.getGroupId().replace('.', '/') + "/"
+ artifact.getArtifactId() + "/" + version + "/");
 
                 // get the maven-metadata file
                 Document metadata = getMavenMetadata(basePath);
@@ -140,7 +140,7 @@
         else {
 
             // base path for the artifact version in a maven repo
-            URI basePath = base.resolve(artifact.getGroupId().replace('.', '/') + "/" + artifact.getArtifactId());
+            URI basePath = base.resolve(artifact.getGroupId().replace('.', '/') + "/" + artifact.getArtifactId()
+ "/");
 
             // get the maven-metadata file
             Document metadata = getMavenMetadata(basePath);
@@ -175,7 +175,7 @@
 
     private OpenResult open(Artifact artifact, URL location) throws IOException, FailedLoginException
{
         InputStream in = openStream(artifact, location);
-        return new RemoteOpenResult(artifact, in);
+        return (in == null) ? null : new RemoteOpenResult(artifact, in);
     }
 
     private InputStream openStream(Artifact artifact, URL location) throws IOException, FailedLoginException
{



Mime
View raw message