From 743213aaf3e9d087eff72a53dd7082bd437c888c Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 15 Jun 2007 09:33:41 +0000 Subject: [PATCH] =?UTF-8?q?[MRM-370]=20NPE=20when=20trying=20to=20proxy=20?= =?UTF-8?q?a=20request=20for=20a=20plugin=20Patch=20submitted=20by=20Jens?= =?UTF-8?q?=20M=C3=BChlenhoff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@547590 13f79535-47bb-0310-9956-ffa450edef68 --- .../layout/DefaultBidirectionalRepositoryLayout.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();