diff options
author | Olivier Lamy <olamy@apache.org> | 2015-10-01 14:51:45 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2015-10-01 14:51:45 +1000 |
commit | e62d96a1fa22bc477ef1e3cbfdc8404e07864cad (patch) | |
tree | 42443f0f77868257e7b459be523f7c8037d71c66 /archiva-modules | |
parent | be86b55e5c922687ab66e36a3363b99e6ecaa6a8 (diff) | |
download | archiva-e62d96a1fa22bc477ef1e3cbfdc8404e07864cad.tar.gz archiva-e62d96a1fa22bc477ef1e3cbfdc8404e07864cad.zip |
add a new module with mock for test
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-base/archiva-mock/pom.xml | 55 | ||||
-rw-r--r-- | archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java (renamed from archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java) | 7 | ||||
-rw-r--r-- | archiva-modules/archiva-base/archiva-mock/src/main/resources/META-INF/spring-context.xml | 33 | ||||
-rw-r--r-- | archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml | 6 | ||||
-rw-r--r-- | archiva-modules/archiva-base/pom.xml | 1 |
5 files changed, 100 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-mock/pom.xml b/archiva-modules/archiva-base/archiva-mock/pom.xml new file mode 100644 index 000000000..bbe2e8cb3 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-mock/pom.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>org.apache.archiva</groupId> + <artifactId>archiva-base</artifactId> + <version>2.2.1-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>archiva-mock</artifactId> + <packaging>jar</packaging> + <name>Archiva Base :: Mocks</name> + <dependencies> + + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.archiva</groupId> + <artifactId>metadata-repository-api</artifactId> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + </dependency> + </dependencies> + +</project> diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java index d26a70443..303d2e08a 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java +++ b/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java @@ -1,4 +1,5 @@ -package org.apache.archiva.admin.mock; +package org.apache.archiva.mock; + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -51,7 +52,9 @@ public class MockRepositorySessionFactory @Override public MetadataRepository getRepository() { - return new AbstractMetadataRepository() {}; + return new AbstractMetadataRepository() + { + }; } }; } diff --git a/archiva-modules/archiva-base/archiva-mock/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-mock/src/main/resources/META-INF/spring-context.xml new file mode 100644 index 000000000..2c9156d19 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-mock/src/main/resources/META-INF/spring-context.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> + +<!-- + ~ 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. + --> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:context="http://www.springframework.org/schema/context" + 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="true"> + + + <context:annotation-config /> + <context:component-scan base-package="org.apache.archiva.mock"/> + +</beans>
\ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml index 9927f885c..f91ed7789 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml @@ -229,6 +229,12 @@ <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.archiva</groupId> + <artifactId>archiva-mock</artifactId> + <scope>test</scope> + </dependency> + </dependencies> <build> diff --git a/archiva-modules/archiva-base/pom.xml b/archiva-modules/archiva-base/pom.xml index cf2c25fa1..3a5da0d66 100644 --- a/archiva-modules/archiva-base/pom.xml +++ b/archiva-modules/archiva-base/pom.xml @@ -32,6 +32,7 @@ <modules> <module>archiva-test-utils</module> <module>archiva-common</module> + <module>archiva-mock</module> <module>archiva-filelock</module> <module>archiva-model</module> <module>archiva-configuration</module> |