From 1e4e84e15ec7c7aa4c63fa546256ce676960e6dd Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Fri, 12 Feb 2010 13:12:13 +0000 Subject: [PATCH] make paths work on windows git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@909393 13f79535-47bb-0310-9956-ffa450edef68 --- .../parent/AbstractArtifactManagementTest.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java index cf03765b0..f92ea26c6 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java @@ -1,6 +1,6 @@ package org.apache.archiva.web.test.parent; -import java.io.File; +import java.io.*; public abstract class AbstractArtifactManagementTest extends AbstractArchivaTest @@ -32,9 +32,15 @@ public abstract class AbstractArtifactManagementTest public String getArtifactFilePath() { - File f = new File( "" ); - String artifactFilePath = f.getAbsolutePath(); - return artifactFilePath + "/src/test/it-resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar" ; + File f = new File( "src/test/it-resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar" ); + try + { + return f.getCanonicalPath(); + } + catch ( IOException e ) + { + return f.getAbsolutePath(); + } } public String getRepositoryId() -- 2.39.5