From 3e8972f42e0e7c66fdbed0ee4d06d09a8037cab3 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 2 Apr 2012 19:26:58 +0000 Subject: [PATCH] take of non absolute path when creating a repository git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308492 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/managed/DefaultManagedRepositoryAdmin.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index cd0291a70..5a7c7cd1f 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -523,6 +523,12 @@ public class DefaultManagedRepositoryAdmin { // Normalize the path File file = new File( repository.getLocation() ); + if ( !file.isAbsolute() ) + { + // add appserver.base/repositories + file = new File( getRegistry().getString( "appserver.base" ) + File.separatorChar + "repositories", + repository.getLocation() ); + } repository.setLocation( file.getCanonicalPath() ); if ( !file.exists() ) { -- 2.39.5