This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva.git

commit d3fd08be17f6e990488a60680047150f7464a13e
Author: Martin Stockhammer <[email protected]>
AuthorDate: Sat Dec 25 17:37:41 2021 +0100

    Package refactoring
---
 .../content/ManagedDefaultRepositoryContent.java   |   1 +
 .../archiva/web/api/DefaultFileUploadService.java  |   1 +
 .../archiva/web/AbstractRestServicesTest.java      | 313 +++++++++++++++++++++
 .../archiva/{ => web}/RuntimeInfoServiceTest.java  |   7 +-
 .../TestRepositorySessionFactoryBean.java          |   5 +-
 .../mock}/security/UserRepositoriesStub.java       |   9 +-
 .../remotedownload/AbstractDownloadTest.java       |   5 +-
 .../DownloadArtifactFromQueryTest.java             |   5 +-
 .../remotedownload/DownloadArtifactsTest.java      |   5 +-
 .../DownloadMergedIndexNonDefaultPathTest.java     |   5 +-
 .../remotedownload/DownloadMergedIndexTest.java    |   5 +-
 .../remotedownload/DownloadSnapshotTest.java       |   5 +-
 .../RemoteRepositoryConnectivityCheckTest.java     |   5 +-
 .../{ => web}/upload/UploadArtifactsTest.java      |  37 ++-
 .../webtest/memory/TestMetadataRepository.java     |   5 +-
 .../webtest/memory/TestMetadataResolver.java       |   5 +-
 .../memory/TestRepositorySessionFactory.java       |   3 +-
 .../src/test/resources/log4j2-test.xml             |   3 +-
 .../spring-context-artifacts-download.xml          |   4 +-
 .../spring-context-merge-index-download.xml        |   4 +-
 .../test/resources/spring-context-rss-servlet.xml  |   6 +-
 .../test/resources/spring-context-test-upload.xml  |   4 +-
 .../src/test/resources/spring-context-with-jcr.xml |   2 +-
 23 files changed, 379 insertions(+), 65 deletions(-)

diff --git 
a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/maven/repository/content/ManagedDefaultRepositoryContent.java
 
b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/maven/repository/content/ManagedDefaultRepositoryContent.java
index 12f7691..e9818dc 100644
--- 
a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/maven/repository/content/ManagedDefaultRepositoryContent.java
+++ 
b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/maven/repository/content/ManagedDefaultRepositoryContent.java
@@ -135,6 +135,7 @@ public class ManagedDefaultRepositoryContent
 
     private StorageAsset getAssetByPath( String assetPath )
     {
+        log.debug( "Get asset {}", assetPath );
         return getStorage( ).getAsset( assetPath );
     }
 
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
index c091095..72df50c 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
@@ -394,6 +394,7 @@ public class DefaultFileUploadService
 
             org.apache.archiva.repository.ManagedRepository repository = 
repositoryRegistry.getManagedRepository(repositoryId);
 
+            log.debug( "Finding artifact path for {}, {}, {}, {}", groupId, 
artifactId, version, packaging );
             ItemSelector selector = ArchivaItemSelector.builder( )
                 .withNamespace( groupId )
                 .withProjectId( artifactId )
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/AbstractRestServicesTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/AbstractRestServicesTest.java
new file mode 100644
index 0000000..e7206a6
--- /dev/null
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/AbstractRestServicesTest.java
@@ -0,0 +1,313 @@
+package org.apache.archiva.web;/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+import junit.framework.TestCase;
+import 
org.apache.archiva.redback.integration.security.role.RedbackRoleConstants;
+import org.apache.archiva.redback.rest.api.model.User;
+import org.apache.archiva.redback.rest.api.services.LdapGroupMappingService;
+import org.apache.archiva.redback.rest.api.services.LoginService;
+import org.apache.archiva.redback.rest.api.services.RoleManagementService;
+import org.apache.archiva.redback.rest.api.services.UserService;
+import org.apache.archiva.redback.rest.api.services.v2.AuthenticationService;
+import org.apache.archiva.redback.rest.services.BaseSetup;
+import org.apache.archiva.redback.rest.services.FakeCreateAdminService;
+import org.apache.commons.lang3.SystemUtils;
+import org.apache.cxf.common.util.Base64Utility;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.transport.servlet.CXFServlet;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.session.SessionHandler;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.context.ContextLoaderListener;
+
+import javax.ws.rs.core.MediaType;
+import java.util.Collections;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * @author Olivier Lamy
+ */
+@RunWith(JUnit4.class)
+public abstract class AbstractRestServicesTest
+    extends TestCase
+{
+    protected Logger log = LoggerFactory.getLogger( getClass() );
+
+    private static AtomicReference<Server> server = new AtomicReference<>();
+    private static AtomicReference<ServerConnector> serverConnector = new 
AtomicReference<>();
+
+    public String authorizationHeader = getAdminAuthzHeader();
+
+    /**
+     * Returns the server that was started, or null if not initialized before.
+     * @return
+     */
+    public Server getServer() {
+        return this.server.get();
+    }
+
+    public int getServerPort() {
+        ServerConnector connector = serverConnector.get();
+        if (connector!=null) {
+            return connector.getLocalPort();
+        } else {
+            return 0;
+        }
+    }
+
+    JacksonJaxbJsonProvider getJsonProvider() {
+        JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider( );
+        ObjectMapper mapper = new ObjectMapper( );
+        mapper.registerModule( new JavaTimeModule( ) );
+        provider.setMapper( mapper );
+        return provider;
+    }
+
+    /**
+     * Returns true, if the server does exist and is running.
+     * @return true, if server does exist and is running.
+     */
+    public boolean isServerRunning() {
+        return this.server.get() != null && this.server.get().isRunning();
+    }
+
+    /**
+     * Returns the timeout in ms for rest requests. The timeout can be set by
+     * the system property <code>rest.test.timeout</code>.
+     * @return The timeout value in ms.
+     */
+    public long getTimeout()
+    {
+        return Long.getLong( "rest.test.timeout", 1000000 );
+    }
+
+    public static String encode( String uid, String password )
+    {
+        return "Basic " + Base64Utility.encode( ( uid + ":" + password 
).getBytes() );
+    }
+
+    public static String getAdminAuthzHeader()
+    {
+        return encode( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME, 
BaseSetup.getAdminPwd() );
+    }
+
+    protected String getSpringConfigLocation()
+    {
+        return 
"classpath*:spring-context.xml,classpath*:META-INF/spring-context.xml";
+    }
+
+
+    protected String getRestServicesPath()
+    {
+        return "restServices";
+    }
+
+    @Before
+    public void startServer()
+        throws Exception
+    {
+        log.info("Starting server");
+        log.info( "User config {}", System.getProperty( 
"archiva.user.configFileName" ) );
+        log.info( "Appserver base {}", System.getProperty( "appserver.base" ) 
);
+        Server myServer = new Server();
+        this.server.set(myServer);
+        this.serverConnector.set(new ServerConnector( myServer, new 
HttpConnectionFactory()));
+        myServer.addConnector(serverConnector.get());
+
+        ServletHolder servletHolder = new ServletHolder( new CXFServlet() );
+        ServletContextHandler context = new 
ServletContextHandler(ServletContextHandler.SESSIONS);
+        context.setResourceBase( SystemUtils.JAVA_IO_TMPDIR );
+        context.setSessionHandler( new SessionHandler(  ) );
+        context.addServlet( servletHolder, "/" + getRestServicesPath() + "/*" 
);
+        context.setInitParameter( "contextConfigLocation", 
getSpringConfigLocation() );
+        context.addEventListener(new ContextLoaderListener());
+
+        getServer().setHandler( context );
+        getServer().start();
+
+        if (log.isDebugEnabled())
+        {
+            log.debug( "Jetty dump: {}", getServer().dump() );
+        }
+
+        log.info( "Started server on port {}", getServerPort() );
+
+        UserService userService = getUserService();
+
+        User adminUser = new User();
+        adminUser.setUsername( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME 
);
+        adminUser.setPassword( BaseSetup.getAdminPwd() );
+        adminUser.setFullName( "the admin user" );
+        adminUser.setEmail( "[email protected]" );
+        if( !userService.createAdminUser( adminUser ) ) {
+            log.info( "Could not create admin user." );
+        }
+
+        FakeCreateAdminService fakeCreateAdminService = 
getFakeCreateAdminService();
+        //assertTrue( res.booleanValue() );
+
+    }
+
+    protected FakeCreateAdminService getFakeCreateAdminService()
+    {
+        return JAXRSClientFactory.create(
+            "http://localhost:"; + getServerPort()+ "/" + getRestServicesPath() 
+ "/fakeCreateAdminService/",
+            FakeCreateAdminService.class, Collections.singletonList( 
getJsonProvider() ) );
+    }
+
+    @After
+    public void stopServer()
+        throws Exception
+    {
+        if ( getServer() != null )
+        {
+            log.info("Stopping server");
+            getServer().stop();
+        }
+    }
+
+    protected UserService getUserService()
+    {
+
+        return getUserService( null );
+    }
+
+    // START SNIPPET: get-user-service
+    protected UserService getUserService( String authzHeader )
+    {
+        UserService service =
+            JAXRSClientFactory.create( "http://localhost:"; + getServerPort() + 
"/" + getRestServicesPath() + "/redbackServices/",
+                                       UserService.class, 
Collections.singletonList( new JacksonJaxbJsonProvider() ) );
+
+        // time out for debuging purpose
+        WebClient.getConfig( service 
).getHttpConduit().getClient().setReceiveTimeout( getTimeout() );
+
+        if ( authzHeader != null )
+        {
+            WebClient.client( service ).header( "Authorization", authzHeader );
+        }
+        
WebClient.client(service).header("Referer","http://localhost:"+getServerPort());
+        WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
+        WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
+
+        return service;
+    }
+    // END SNIPPET: get-user-service
+
+    protected RoleManagementService getRoleManagementService( String 
authzHeader )
+    {
+        RoleManagementService service =
+            JAXRSClientFactory.create( "http://localhost:"; + getServerPort() + 
"/" + getRestServicesPath() + "/redbackServices/",
+                                       RoleManagementService.class,
+                                       Collections.singletonList( new 
JacksonJaxbJsonProvider() ) );
+
+        // for debuging purpose
+        WebClient.getConfig( service 
).getHttpConduit().getClient().setReceiveTimeout( getTimeout() );
+
+        if ( authzHeader != null )
+        {
+            WebClient.client( service ).header( "Authorization", authzHeader );
+        }
+        
WebClient.client(service).header("Referer","http://localhost:"+getServerPort());
+
+        WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
+        WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
+
+        return service;
+    }
+
+    protected LoginService getLoginService( String authzHeader )
+    {
+        LoginService service =
+            JAXRSClientFactory.create( "http://localhost:"; + getServerPort() + 
"/" + getRestServicesPath() + "/redbackServices/",
+                                       LoginService.class, 
Collections.singletonList( getJsonProvider() ) );
+
+        // for debuging purpose
+        WebClient.getConfig( service 
).getHttpConduit().getClient().setReceiveTimeout( getTimeout() );
+
+        if ( authzHeader != null )
+        {
+            WebClient.client( service ).header( "Authorization", authzHeader );
+        }
+        
WebClient.client(service).header("Referer","http://localhost:"+getServerPort());
+
+        WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
+        WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
+
+        return service;
+    }
+
+    protected AuthenticationService getLoginServiceV2( String authzHeader )
+    {
+        AuthenticationService service =
+            JAXRSClientFactory.create( "http://localhost:"; + getServerPort() + 
"/" + getRestServicesPath() + "/v2/redback/",
+                AuthenticationService.class, Collections.singletonList( 
getJsonProvider() ) );
+
+        // for debuging purpose
+        WebClient.getConfig( service 
).getHttpConduit().getClient().setReceiveTimeout( getTimeout() );
+
+        if ( authzHeader != null )
+        {
+            WebClient.client( service ).header( "Authorization", authzHeader );
+        }
+        
WebClient.client(service).header("Referer","http://localhost:"+getServerPort());
+
+        WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
+        WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
+
+        return service;
+    }
+
+
+    protected LdapGroupMappingService getLdapGroupMappingService( String 
authzHeader )
+    {
+        LdapGroupMappingService service =
+            JAXRSClientFactory.create( "http://localhost:"; + getServerPort() + 
"/" + getRestServicesPath() + "/redbackServices/",
+                                       LdapGroupMappingService.class,
+                                       Collections.singletonList( 
getJsonProvider() ) );
+
+        // for debuging purpose
+        WebClient.getConfig( service 
).getHttpConduit().getClient().setReceiveTimeout( getTimeout() );
+
+        if ( authzHeader != null )
+        {
+            WebClient.client( service ).header( "Authorization", authzHeader );
+        }
+        
WebClient.client(service).header("Referer","http://localhost:"+getServerPort());
+
+        WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
+        WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
+
+        return service;
+    }
+
+
+}
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/RuntimeInfoServiceTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/RuntimeInfoServiceTest.java
similarity index 95%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/RuntimeInfoServiceTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/RuntimeInfoServiceTest.java
index 77a1ee3..3e9bf4f 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/RuntimeInfoServiceTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/RuntimeInfoServiceTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva;
+package org.apache.archiva.web;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -8,8 +8,7 @@ package org.apache.archiva;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,7 +19,6 @@ package org.apache.archiva;
 
 import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
 import org.apache.archiva.redback.rest.services.AbstractRestServicesTest;
-import org.apache.archiva.remotedownload.DownloadArtifactsTest;
 import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
 import org.apache.archiva.web.api.RuntimeInfoService;
 import org.apache.archiva.web.model.ApplicationRuntimeInfo;
@@ -37,7 +35,6 @@ import org.junit.runner.RunWith;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.Collections;
 
 /**
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/TestRepositorySessionFactoryBean.java
similarity index 96%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/TestRepositorySessionFactoryBean.java
index cc789e1..1849e4c 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/TestRepositorySessionFactoryBean.java
@@ -1,4 +1,4 @@
-package org.apache.archiva;
+package org.apache.archiva.web;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,8 +9,7 @@ package org.apache.archiva;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/security/UserRepositoriesStub.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/mock/security/UserRepositoriesStub.java
similarity index 88%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/security/UserRepositoriesStub.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/mock/security/UserRepositoriesStub.java
index 3cd2dad..6c4258f 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/security/UserRepositoriesStub.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/mock/security/UserRepositoriesStub.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.security;
+package org.apache.archiva.web.mock.security;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,8 +9,7 @@ package org.apache.archiva.security;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,6 +19,10 @@ package org.apache.archiva.security;
  */
 
 import org.apache.archiva.admin.model.beans.ManagedRepository;
+import org.apache.archiva.security.AccessDeniedException;
+import org.apache.archiva.security.ArchivaSecurityException;
+import org.apache.archiva.security.PrincipalNotFoundException;
+import org.apache.archiva.security.UserRepositories;
 
 import java.util.Collections;
 import java.util.List;
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/AbstractDownloadTest.java
similarity index 99%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/AbstractDownloadTest.java
index 34a93d1..ec291f9 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/AbstractDownloadTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.remotedownload;
+package org.apache.archiva.web.remotedownload;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -8,8 +8,7 @@ package org.apache.archiva.remotedownload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadArtifactFromQueryTest.java
similarity index 98%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadArtifactFromQueryTest.java
index 183839c..f6ed904 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadArtifactFromQueryTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.remotedownload;
+package org.apache.archiva.web.remotedownload;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -8,8 +8,7 @@ package org.apache.archiva.remotedownload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadArtifactsTest.java
similarity index 99%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadArtifactsTest.java
index acd74d0..0c8f95b 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadArtifactsTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.remotedownload;
+package org.apache.archiva.web.remotedownload;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -8,8 +8,7 @@ package org.apache.archiva.remotedownload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
similarity index 98%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
index e3bb940..7e465f2 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.remotedownload;
+package org.apache.archiva.web.remotedownload;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -8,8 +8,7 @@ package org.apache.archiva.remotedownload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadMergedIndexTest.java
similarity index 98%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadMergedIndexTest.java
index 3b49e17..88e39a2 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadMergedIndexTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.remotedownload;
+package org.apache.archiva.web.remotedownload;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -8,8 +8,7 @@ package org.apache.archiva.remotedownload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadSnapshotTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadSnapshotTest.java
similarity index 98%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadSnapshotTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadSnapshotTest.java
index 05a2996..0457fdc 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadSnapshotTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/DownloadSnapshotTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.remotedownload;
+package org.apache.archiva.web.remotedownload;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,8 +9,7 @@ package org.apache.archiva.remotedownload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/RemoteRepositoryConnectivityCheckTest.java
similarity index 98%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/RemoteRepositoryConnectivityCheckTest.java
index 084a38c..768920d 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/remotedownload/RemoteRepositoryConnectivityCheckTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.remotedownload;
+package org.apache.archiva.web.remotedownload;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,8 +9,7 @@ package org.apache.archiva.remotedownload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/upload/UploadArtifactsTest.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/upload/UploadArtifactsTest.java
similarity index 88%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/upload/UploadArtifactsTest.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/upload/UploadArtifactsTest.java
index 3c2cbe9..0487368 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/upload/UploadArtifactsTest.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/upload/UploadArtifactsTest.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.upload;
+package org.apache.archiva.web.upload;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -8,8 +8,7 @@ package org.apache.archiva.upload;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,10 +19,9 @@ package org.apache.archiva.upload;
 
 import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
 import org.apache.archiva.configuration.ArchivaConfiguration;
-import org.apache.archiva.redback.rest.services.AbstractRestServicesTest;
-import org.apache.archiva.redback.rest.services.FakeCreateAdminService;
 import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
 import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
+import org.apache.archiva.web.AbstractRestServicesTest;
 import org.apache.archiva.web.api.FileUploadService;
 import org.apache.archiva.web.model.FileMetadata;
 import org.apache.commons.lang3.StringUtils;
@@ -54,7 +52,8 @@ import java.util.concurrent.atomic.AtomicReference;
  */
 @RunWith(ArchivaBlockJUnit4ClassRunner.class)
 public class UploadArtifactsTest
-        extends AbstractRestServicesTest {
+        extends AbstractRestServicesTest
+{
 
     private static String PREVIOUS_ARCHIVA_PATH;
     private AtomicReference<Path> projectDir = new AtomicReference<>( );
@@ -64,8 +63,17 @@ public class UploadArtifactsTest
             throws Exception
     {
         PREVIOUS_ARCHIVA_PATH = 
System.getProperty(ArchivaConfiguration.USER_CONFIG_PROPERTY);
-        System.setProperty( ArchivaConfiguration.USER_CONFIG_PROPERTY,
+        if (System.getProperties().containsKey( "test.resources.path" ))
+        {
+            System.setProperty( ArchivaConfiguration.USER_CONFIG_PROPERTY,
                 System.getProperty( "test.resources.path" ) + "/archiva.xml" );
+        } else {
+            Path path = Paths.get( "src/test/resources/archiva.xml" 
).toAbsolutePath();
+            System.setProperty( ArchivaConfiguration.USER_CONFIG_PROPERTY,
+                path.toString() );
+
+        }
+        System.err.println( "USER_CONFIG_DIR " + System.getProperty( 
ArchivaConfiguration.USER_CONFIG_PROPERTY ) );
     }
 
 
@@ -91,6 +99,7 @@ public class UploadArtifactsTest
             }
             projectDir.compareAndSet(null, newVal);
         }
+        System.err.println( "project dir: " + projectDir.get( ).toString( ) );
         return projectDir.get();
     }
 
@@ -196,7 +205,7 @@ public class UploadArtifactsTest
         try {
             FileUploadService service = getUploadService();
             Path file = 
getProjectDirectory().resolve("src/test/repositories/snapshot-repo/org/apache/archiva/archiva-model/1.4-M4-SNAPSHOT/archiva-model-1.4-M4-20130425.081822-1.jar");
-            Path targetDir = Paths.get("target/testDelete").toAbsolutePath();
+            Path targetDir = 
getProjectDirectory().resolve("target/testDelete").toAbsolutePath();
             if (!Files.exists(targetDir)) Files.createDirectories(targetDir);
             Path tempDir = SystemUtils.getJavaIoTmpDir().toPath();
             testFile = Files.createTempFile(targetDir, "TestFile", ".txt");
@@ -224,7 +233,7 @@ public class UploadArtifactsTest
 
     @Test
     public void failSaveFileWithBadParams() throws IOException, 
ArchivaRestServiceException {
-        Path path = 
Paths.get("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.jar");
+        Path path = 
getProjectDirectory().resolve("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.jar");
         Files.deleteIfExists(path);
         FileUploadService service = getUploadService();
         Path file = 
getProjectDirectory().resolve("src/test/repositories/snapshot-repo/org/apache/archiva/archiva-model/1.4-M4-SNAPSHOT/archiva-model-1.4-M4-20130425.081822-1.jar");
@@ -244,17 +253,17 @@ public class UploadArtifactsTest
         } catch (ClientErrorException e) {
             assertEquals(422, e.getResponse().getStatus());
         }
-        assertFalse(Files.exists(Paths.get("target/test-testSave.4")));
+        
assertFalse(Files.exists(getProjectDirectory().resolve("target/test-testSave.4")));
     }
 
     @Test
     public void saveFile() throws IOException, ArchivaRestServiceException {
         log.debug("Starting saveFile()");
 
-        Path path = 
Paths.get("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.jar");
+        Path path = 
getProjectDirectory().resolve("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.jar");
         log.debug("Jar exists: {}",Files.exists(path));
         Files.deleteIfExists(path);
-        path = 
Paths.get("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.pom");
+        path = 
getProjectDirectory().resolve("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.pom");
         Files.deleteIfExists(path);
         FileUploadService service = getUploadService();
         service.clearUploadedFiles();
@@ -270,10 +279,10 @@ public class UploadArtifactsTest
     public void saveFileWithOtherExtension() throws IOException, 
ArchivaRestServiceException {
         log.debug("Starting saveFileWithOtherExtension()");
 
-        Path path = 
Paths.get("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.bin");
+        Path path = 
getProjectDirectory().resolve("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.bin");
         log.debug("Jar exists: {}",Files.exists(path));
         Files.deleteIfExists(path);
-        Path pomPath = 
Paths.get("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.pom");
+        Path pomPath = 
getProjectDirectory().resolve("target/appserver-base/repositories/internal/org/apache/archiva/archiva-model/1.2/archiva-model-1.2.pom");
         Files.deleteIfExists(pomPath);
         FileUploadService service = getUploadService();
         service.clearUploadedFiles();
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestMetadataRepository.java
similarity index 97%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestMetadataRepository.java
index 662d2c2..8f8c801 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestMetadataRepository.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.webtest.memory;
+package org.apache.archiva.web.webtest.memory;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,8 +9,7 @@ package org.apache.archiva.webtest.memory;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestMetadataResolver.java
similarity index 98%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestMetadataResolver.java
index b0edd24..edc7d64 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestMetadataResolver.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.webtest.memory;
+package org.apache.archiva.web.webtest.memory;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -9,8 +9,7 @@ package org.apache.archiva.webtest.memory;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
+ * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestRepositorySessionFactory.java
similarity index 97%
rename from 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
rename to 
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestRepositorySessionFactory.java
index 1fd8b35..c5f5878 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/webtest/memory/TestRepositorySessionFactory.java
@@ -1,4 +1,4 @@
-package org.apache.archiva.webtest.memory;
+package org.apache.archiva.web.webtest.memory;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -10,7 +10,6 @@ package org.apache.archiva.webtest.memory;
  * with the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
index 11ff568..fa4d35a 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
@@ -29,7 +29,8 @@
 
     <logger name="org.springframework" level="error"/>
     <logger name="org.apache.archiva" level="error"/>
-    <logger name="org.apache.archiva.web" level="info"/>
+    <logger name="org.apache.archiva.web" level="debug"/>
+    <logger name="org.apache.archiva.repository" level="debug"/>
     <logger name="org.apache.commons.configuration" level="error"/>
     <logger name="org.apache.archiva.scheduler.indexing" level="info"/>
     <logger name="org.apache.archiva.remotedownload" level="info"/>
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
index d35643f..f266fd1 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
@@ -50,11 +50,11 @@
     </property>
   </bean>
 
-  <bean name="repositorySessionFactory" 
class="org.apache.archiva.webtest.memory.TestRepositorySessionFactory"/>
+  <bean name="repositorySessionFactory" 
class="org.apache.archiva.web.webtest.memory.TestRepositorySessionFactory"/>
 
   <alias name="userManager#configurable" alias="userManager#default"/>
 
-  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.TestRepositorySessionFactoryBean">
+  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.web.TestRepositorySessionFactoryBean">
     <constructor-arg>
       <value>jcr</value>
     </constructor-arg>
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml
index 05b289c..8dff20e 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml
@@ -51,12 +51,12 @@
     </property>
   </bean>
 
-  <bean name="repositorySessionFactory" 
class="org.apache.archiva.webtest.memory.TestRepositorySessionFactory"/>
+  <bean name="repositorySessionFactory" 
class="org.apache.archiva.web.webtest.memory.TestRepositorySessionFactory"/>
   <alias name="userConfiguration#archiva" alias="userConfiguration#default"/>
   <alias name="authorizer#rbac" alias="authorizer#default"/>
   <alias name="userManager#configurable" alias="userManager#default"/>
 
-  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.TestRepositorySessionFactoryBean">
+  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.web.TestRepositorySessionFactoryBean">
     <constructor-arg>
       <value>jcr</value>
     </constructor-arg>
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
index 944f854..ae84b96 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
@@ -30,11 +30,11 @@
   <context:property-placeholder system-properties-mode="OVERRIDE"/>
 
   <context:annotation-config/>
-  <context:component-scan base-package="org.apache.archiva.webtest.memory"/>
+  <context:component-scan 
base-package="org.apache.archiva.web.webtest.memory"/>
 
   <alias name="repositorySessionFactory#test" 
alias="repositorySessionFactory"/>
 
-  <bean name="userRepositories#test" 
class="org.apache.archiva.security.UserRepositoriesStub"/>
+  <bean name="userRepositories#test" 
class="org.apache.archiva.web.mock.security.UserRepositoriesStub"/>
 
   <alias name="userRepositories#test" alias="userRepositories"/>
 
@@ -49,7 +49,7 @@
 
   <alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
 
-  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.TestRepositorySessionFactoryBean">
+  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.web.TestRepositorySessionFactoryBean">
     <constructor-arg>
       <value>jcr</value>
     </constructor-arg>
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml
index f1c60f9..fb1d521 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml
@@ -31,7 +31,7 @@
 
   <context:annotation-config/>
   <context:component-scan
-      
base-package="org.apache.archiva.repository.content.maven2,org.apache.archiva.redback.keys,org.apache.archiva.rest.services.utils"/>
+      
base-package="org.apache.archiva.maven.repository.content,org.apache.archiva.redback.keys,org.apache.archiva.rest.services.utils"/>
 
   <bean name="scheduler" 
class="org.apache.archiva.components.scheduler.DefaultScheduler">
     <property name="properties">
@@ -68,7 +68,7 @@
   </bean>
 
 
-  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.TestRepositorySessionFactoryBean">
+  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.web.TestRepositorySessionFactoryBean">
     <constructor-arg>
       <value>jcr</value>
     </constructor-arg>
diff --git 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
index 79622a7..84dccd7 100644
--- 
a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
+++ 
b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
@@ -39,7 +39,7 @@
 
   <alias name="repositorySessionFactory#jcr" alias="repositorySessionFactory"/>
 
-  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.TestRepositorySessionFactoryBean">
+  <bean name="TestRepositorySessionFactoryBean" 
class="org.apache.archiva.web.TestRepositorySessionFactoryBean">
     <constructor-arg>
       <value>jcr</value>
     </constructor-arg>

Reply via email to