aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-checksum
diff options
context:
space:
mode:
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 )
{