diff --git a/archiva-modules/archiva-base/archiva-transaction/pom.xml b/archiva-modules/archiva-base/archiva-transaction/pom.xml
index d14ef761b..b09373a60 100644
--- a/archiva-modules/archiva-base/archiva-transaction/pom.xml
+++ b/archiva-modules/archiva-base/archiva-transaction/pom.xml
@@ -36,6 +36,17 @@
org.codehaus.plexus
plexus-digest
1.0
+
+
+ org.codehaus.plexus
+ plexus-container-default
+
+
+
+
+ org.codehaus.plexus
+ plexus-spring
+ test
org.codehaus.plexus
diff --git a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java
index e5a32577c..5e7064ec2 100644
--- a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java
+++ b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java
@@ -20,7 +20,8 @@ package org.apache.maven.archiva.transaction;
*/
import org.apache.commons.io.FileUtils;
-import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
+import org.codehaus.plexus.spring.PlexusToSpringUtils;
import org.codehaus.plexus.digest.Digester;
import java.io.File;
@@ -33,7 +34,7 @@ import java.util.List;
* @version $Id$
*/
public abstract class AbstractFileEventTest
- extends PlexusTestCase
+ extends PlexusInSpringTestCase
{
protected List digesters;
@@ -42,7 +43,7 @@ public abstract class AbstractFileEventTest
{
super.setUp();
- digesters = getContainer().lookupList( Digester.class.getName() );
+ digesters = PlexusToSpringUtils.lookupList( PlexusToSpringUtils.buildSpringId( Digester.class.getName() ), getApplicationContext() );
}
protected void assertChecksumExists( File file, String algorithm )
@@ -87,4 +88,4 @@ public abstract class AbstractFileEventTest
{
FileUtils.writeStringToFile( file, content );
}
-}
\ No newline at end of file
+}
diff --git a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CopyFileEventTest.java b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CopyFileEventTest.java
index 847c85178..252375c41 100644
--- a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CopyFileEventTest.java
+++ b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CopyFileEventTest.java
@@ -20,7 +20,6 @@ package org.apache.maven.archiva.transaction;
*/
import org.apache.commons.io.FileUtils;
-import org.codehaus.plexus.PlexusTestCase;
import java.io.File;
import java.io.IOException;
@@ -31,11 +30,11 @@ import java.io.IOException;
public class CopyFileEventTest
extends AbstractFileEventTest
{
- private File testDir = new File( PlexusTestCase.getBasedir(), "target/transaction-tests/copy-file" );
+ private File testDir = new File( getBasedir(), "target/transaction-tests/copy-file" );
private File testDest = new File( testDir, "test-file.txt" );
- private File testSource = new File( PlexusTestCase.getBasedir(), "target/transaction-tests/test-file.txt" );
+ private File testSource = new File( getBasedir(), "target/transaction-tests/test-file.txt" );
private File testDestChecksum;
@@ -154,7 +153,7 @@ public class CopyFileEventTest
{
super.tearDown();
- FileUtils.deleteDirectory( new File( PlexusTestCase.getBasedir(), "target/transaction-tests" ) );
+ FileUtils.deleteDirectory( new File( getBasedir(), "target/transaction-tests" ) );
}
protected void assertChecksumCommit( File file )
diff --git a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CreateFileEventTest.java b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CreateFileEventTest.java
index f5dcf0a1c..a212a0ee2 100644
--- a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CreateFileEventTest.java
+++ b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/CreateFileEventTest.java
@@ -22,7 +22,6 @@ package org.apache.maven.archiva.transaction;
import java.io.File;
import org.apache.commons.io.FileUtils;
-import org.codehaus.plexus.PlexusTestCase;
/**
* @author Edwin Punzalan
@@ -30,7 +29,7 @@ import org.codehaus.plexus.PlexusTestCase;
public class CreateFileEventTest
extends AbstractFileEventTest
{
- private File testDir = new File( PlexusTestCase.getBasedir(), "target/transaction-tests/create-file" );
+ private File testDir = new File( getBasedir(), "target/transaction-tests/create-file" );
public void testCreateCommitRollback()
throws Exception
@@ -54,7 +53,7 @@ public class CreateFileEventTest
assertChecksumRollback( testFile );
assertFalse( "Test file parent directories has been rolledback too", testDir.exists() );
- assertTrue( "target directory still exists", new File( PlexusTestCase.getBasedir(), "target" ).exists() );
+ assertTrue( "target directory still exists", new File( getBasedir(), "target" ).exists() );
}
public void testCreateCommitRollbackWithBackup()
@@ -116,6 +115,6 @@ public class CreateFileEventTest
{
super.tearDown();
- FileUtils.deleteDirectory( new File( PlexusTestCase.getBasedir(), "target/transaction-tests" ) );
+ FileUtils.deleteDirectory( new File( getBasedir(), "target/transaction-tests" ) );
}
}