aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-base/archiva-repository-layer
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@apache.org>2007-06-15 09:33:41 +0000
committerFabrice Bellingard <bellingard@apache.org>2007-06-15 09:33:41 +0000
commit743213aaf3e9d087eff72a53dd7082bd437c888c (patch)
tree6b168300c1dbc781a8cf34d16c03d52e96934a8f /archiva-base/archiva-repository-layer
parent68721e8607c9cdb8a2694b21a4f8586969bd943d (diff)
downloadarchiva-743213aaf3e9d087eff72a53dd7082bd437c888c.tar.gz
archiva-743213aaf3e9d087eff72a53dd7082bd437c888c.zip
[MRM-370] NPE when trying to proxy a request for a plugin
Patch submitted by Jens Mühlenhoff git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@547590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base/archiva-repository-layer')
-rw-r--r--archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayout.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayout.java b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayout.java
index ae309dd52..9cc6f368e 100644
--- a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayout.java
+++ b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayout.java
@@ -134,7 +134,10 @@ public class DefaultBidirectionalRepositoryLayout
path.append( formatAsDirectory( reference.getGroupId() ) ).append( PATH_SEPARATOR );
path.append( reference.getArtifactId() ).append( PATH_SEPARATOR );
- path.append( VersionUtil.getBaseVersion( reference.getVersion() ) ).append( PATH_SEPARATOR );
+ if( reference.getVersion() != null ) {
+ // add the version only if it is present
+ path.append( VersionUtil.getBaseVersion( reference.getVersion() ) ).append( PATH_SEPARATOR );
+ }
path.append( MAVEN_METADATA );
return path.toString();