diff --git a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
index fa0c0a2e3..28da53f5a 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
@@ -72,4 +72,17 @@
maven2-repository
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ ${basedir}
+
+
+
+
+
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java
index f6b44c2d4..d45966a2e 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java
@@ -34,7 +34,6 @@ import javax.inject.Named;
* ArtifactReference.
*
* @version $Id$
- * @todo no need to be a component once legacy path parser is not
*
*/
public class RepositoryRequest
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/AbstractRepositoryLayerTestCase.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/AbstractRepositoryLayerTestCase.java
index 7697905b7..9ed7d5e7c 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/AbstractRepositoryLayerTestCase.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/AbstractRepositoryLayerTestCase.java
@@ -41,6 +41,17 @@ public abstract class AbstractRepositoryLayerTestCase
extends TestCase
{
+ public static String getBasedir()
+ {
+ String basedir = System.getProperty( "basedir" );
+ if ( basedir == null )
+ {
+ basedir = new File( "" ).getAbsolutePath();
+ }
+
+ return basedir;
+ }
+
@Inject
protected ApplicationContext applicationContext;
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java
index f99e71830..894ec85d4 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java
@@ -38,12 +38,14 @@ import java.io.File;
*
* @version $Id$
*/
-@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-repo-request-test.xml" } )
+@ContextConfiguration(
+ locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-repo-request-test.xml" } )
public class RepositoryRequestTest
extends AbstractRepositoryLayerTestCase
{
- @Inject @Named(value = "archivaConfiguration#repo-request-test")
+ @Inject
+ @Named( value = "archivaConfiguration#repo-request-test" )
private ArchivaConfiguration archivaConfiguration;
private RepositoryRequest repoRequest;
@@ -367,7 +369,7 @@ public class RepositoryRequestTest
private ManagedRepositoryContent createManagedRepo( String layout )
throws Exception
{
- File repoRoot = new File( "target/test-repo" );
+ File repoRoot = new File( getBasedir() + "/target/test-repo" );
return createManagedRepositoryContent( "test-internal", "Internal Test Repo", repoRoot, layout );
}
@@ -444,8 +446,8 @@ public class RepositoryRequestTest
ManagedRepositoryContent repository = createManagedRepo( "default" );
// Test (pom) legacy to default
- assertEquals( "mygroup/myejb/1.0/myejb-1.0.jar",
- repoRequest.toNativePath( "mygroup/ejbs/myejb-1.0.jar", repository ) );
+ String result = repoRequest.toNativePath( "mygroup/ejbs/myejb-1.0.jar", repository );
+ assertEquals( "mygroup/myejb/1.0/myejb-1.0.jar", result );
}
@Test
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context-repo-request-test.xml b/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context-repo-request-test.xml
index bb7108b1c..2ea6ac817 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context-repo-request-test.xml
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context-repo-request-test.xml
@@ -24,14 +24,15 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd"
- default-lazy-init="false">
+ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+