You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2015/10/01 09:42:24 UTC

[08/10] archiva git commit: more usage of MockRepositorySessionFactory

 more usage of MockRepositorySessionFactory


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/da1216f7
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/da1216f7
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/da1216f7

Branch: refs/heads/master
Commit: da1216f7346d74c4b45c1b7f042a2fabb0251baa
Parents: 418042a
Author: Olivier Lamy <ol...@apache.org>
Authored: Thu Oct 1 16:02:49 2015 +1000
Committer: Olivier Lamy <ol...@apache.org>
Committed: Thu Oct 1 16:02:49 2015 +1000

----------------------------------------------------------------------
 .../archiva-base/archiva-proxy/pom.xml          |  7 +++-
 .../TestRepositorySessionFactory.java           | 43 --------------------
 2 files changed, 6 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/da1216f7/archiva-modules/archiva-base/archiva-proxy/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml
index 09ab294..83e0ce0 100644
--- a/archiva-modules/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml
@@ -176,6 +176,11 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.archiva</groupId>
+      <artifactId>archiva-mock</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-rbac-cached</artifactId>
       <scope>test</scope>
@@ -254,7 +259,7 @@
             <derby.system.home>${project.build.directory}/appserver-base</derby.system.home>
             <redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
-            <archiva.repositorySessionFactory.id>test</archiva.repositorySessionFactory.id>
+            <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/da1216f7/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java
deleted file mode 100644
index 5d2e820..0000000
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.archiva.metadata.repository;
-
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Configurable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
-import org.springframework.stereotype.Service;
-
-/*
-* 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.
-*/
-@Service("repositorySessionFactory#test")
-public class TestRepositorySessionFactory
-    implements RepositorySessionFactory
-{
-    private MetadataResolver resolver;
-
-    @Override
-    public RepositorySession createSession()
-    {
-        return new RepositorySession( new AbstractMetadataRepository() {}, resolver );
-    }
-
-    public void setResolver( MetadataResolver resolver )
-    {
-        Configurable configurable;
-        Startable startable;
-        this.resolver = resolver;
-    }
-}