aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-checksum
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2011-06-15 11:03:10 +0000
committerMaria Odea B. Ching <oching@apache.org>2011-06-15 11:03:10 +0000
commit1af82ff7d8db47ff0dee286869d80189cabf78e4 (patch)
treee20a661bf889dca04af820b71e9908e7e2a86f02 /archiva-modules/archiva-base/archiva-checksum
parentdab1e929905186a20423260d0f1ce275eef4add2 (diff)
downloadarchiva-1af82ff7d8db47ff0dee286869d80189cabf78e4.tar.gz
archiva-1af82ff7d8db47ff0dee286869d80189cabf78e4.zip
use getBasedir() in FileUtil in archiva-common
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-checksum')
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/pom.xml4
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java24
2 files changed, 7 insertions, 21 deletions
diff --git a/archiva-modules/archiva-base/archiva-checksum/pom.xml b/archiva-modules/archiva-base/archiva-checksum/pom.xml
index 5d7053fea..3faf4fa5f 100644
--- a/archiva-modules/archiva-base/archiva-checksum/pom.xml
+++ b/archiva-modules/archiva-base/archiva-checksum/pom.xml
@@ -41,6 +41,10 @@
<dependencies>
<dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-common</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java
index 6f75f6944..6f8d285a0 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java
@@ -22,6 +22,7 @@ package org.apache.archiva.checksum;
import java.io.File;
import junit.framework.TestCase;
+import org.apache.maven.archiva.common.utils.FileUtil;
/**
* AbstractChecksumTestCase
@@ -31,28 +32,9 @@ import junit.framework.TestCase;
public abstract class AbstractChecksumTestCase
extends TestCase
{
- private File basedir;
-
- public File getBasedir()
- {
- if ( basedir == null )
- {
- String sysprop = System.getProperty( "basedir" );
- if ( sysprop != null )
- {
- basedir = new File( sysprop );
- }
- else
- {
- basedir = new File( System.getProperty( "user.dir" ) );
- }
- }
- return basedir;
- }
-
public File getTestOutputDir()
{
- File dir = new File( getBasedir(), "target/test-output/" + getName() );
+ File dir = new File( FileUtil.getBasedir(), "target/test-output/" + getName() );
if ( dir.exists() == false )
{
if ( dir.mkdirs() == false )
@@ -65,7 +47,7 @@ public abstract class AbstractChecksumTestCase
public File getTestResource( String filename )
{
- File dir = new File( getBasedir(), "src/test/resources" );
+ File dir = new File( FileUtil.getBasedir(), "src/test/resources" );
File file = new File( dir, filename );
if ( file.exists() == false )
{