Browse Source

move rss servlet to webapp common for reuse in webapp js, move some test resources too shared with webapp tru a test jar

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1215265 13f79535-47bb-0310-9956-ffa450edef68
tags/archiva-1.4-M3
Olivier Lamy 12 years ago
parent
commit
d6a6f7b316
14 changed files with 247 additions and 6 deletions
  1. 75
    1
      archiva-modules/archiva-web/archiva-webapp-common/pom.xml
  2. 5
    5
      archiva-modules/archiva-web/archiva-webapp-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java
  3. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/security/UserRepositoriesStub.java
  4. 8
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/web/rss/RoleManagerStub.java
  5. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java
  6. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
  7. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
  8. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java
  9. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
  10. 111
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/resources/empty-archiva.xml
  11. 40
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/resources/log4j.xml
  12. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/resources/spring-context-rss-servlet.xml
  13. 0
    0
      archiva-modules/archiva-web/archiva-webapp-common/src/test/webapp/WEB-INF/feedServletTest-web.xml
  14. 8
    0
      archiva-modules/archiva-web/archiva-webapp/pom.xml

+ 75
- 1
archiva-modules/archiva-web/archiva-webapp-common/pom.xml View File

@@ -42,6 +42,24 @@
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-security-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-rss</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-security</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.redback</groupId>
<artifactId>redback-common-integrations</artifactId>
<exclusions>
<exclusion>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-plexus-bridge</artifactId>
@@ -105,6 +123,21 @@
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>httpunit</groupId>
<artifactId>httpunit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -124,6 +157,7 @@
javax.annotation,
javax.inject,
javax.servlet,
javax.servlet.http,
org.apache.archiva.common;version=${project.version},
org.apache.archiva.common.plexusbridge;version=${project.version},
org.apache.archiva.configuration;version=${project.version},
@@ -144,11 +178,51 @@
org.quartz;version="[2,3)",
org.slf4j;resolution:=optional,
org.springframework*;version="[3,4)",
org.springframework.web*;version="[3,4)"
org.springframework.web*;version="[3,4)",
com.sun.syndication.feed.synd,
com.sun.syndication.io,
org.apache.archiva.metadata.repository,
org.apache.archiva.rss.processor,
org.apache.archiva.security,
org.apache.commons.codec,
org.apache.commons.codec.binary,
org.codehaus.plexus.redback.authentication,
org.codehaus.plexus.redback.authorization,
org.codehaus.plexus.redback.policy,
org.codehaus.plexus.redback.system,
org.codehaus.plexus.redback.users,
org.codehaus.redback.integration.filter.authentication
</Import-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<appserver.base>${project.build.directory}/appserver-base</appserver.base>
<plexus.home>${project.build.directory}/appserver-base</plexus.home>
<derby.system.home>${project.build.directory}/appserver-base</derby.system.home>
<archiva.user.configFileName>${basedir}/target/archiva.xml</archiva.user.configFileName>
<test.resources.path>${project.build.testOutputDirectory}</test.resources.path>
<redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
<redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
<basedir>${basedir}</basedir>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java → archiva-modules/archiva-web/archiva-webapp-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java View File


archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/security/UserRepositoriesStub.java → archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/security/UserRepositoriesStub.java View File


archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/rss/RoleManagerStub.java → archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/web/rss/RoleManagerStub.java View File

@@ -18,12 +18,18 @@ package org.apache.archiva.web.rss;
* under the License.
*/

import org.apache.archiva.metadata.repository.RepositorySession;
import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.apache.archiva.security.ArchivaSecurityException;
import org.apache.archiva.security.UserRepositories;
import org.codehaus.plexus.redback.role.RoleManager;
import org.codehaus.plexus.redback.role.RoleManagerException;
import org.codehaus.plexus.redback.role.model.RedbackRoleModel;
import org.springframework.stereotype.Service;

import java.net.URL;
import java.util.Collections;
import java.util.List;

/**
* @author Olivier Lamy
@@ -114,4 +120,6 @@ public class RoleManagerStub
{
//To change body of implemented methods use File | Settings | File Templates.
}


}

archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java → archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java View File


archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java → archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java View File


archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java → archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java View File


archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java → archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataResolver.java View File


archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java → archiva-modules/archiva-web/archiva-webapp-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java View File


+ 111
- 0
archiva-modules/archiva-web/archiva-webapp-common/src/test/resources/empty-archiva.xml View File

@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
~ 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.
-->

<configuration>

<version>2</version>
<repositoryScanning>
<fileTypes>
<fileType>
<id>artifacts</id>
<patterns>
<pattern>**/*.pom</pattern>
<pattern>**/*.jar</pattern>
<pattern>**/*.ear</pattern>
<pattern>**/*.war</pattern>
<pattern>**/*.car</pattern>
<pattern>**/*.sar</pattern>
<pattern>**/*.mar</pattern>
<pattern>**/*.rar</pattern>
<pattern>**/*.dtd</pattern>
<pattern>**/*.tld</pattern>
<pattern>**/*.tar.gz</pattern>
<pattern>**/*.tar.bz2</pattern>
<pattern>**/*.zip</pattern>
</patterns>
</fileType>
<fileType>
<id>indexable-content</id>
<patterns>
<pattern>**/*.txt</pattern>
<pattern>**/*.TXT</pattern>
<pattern>**/*.block</pattern>
<pattern>**/*.config</pattern>
<pattern>**/*.pom</pattern>
<pattern>**/*.xml</pattern>
<pattern>**/*.xsd</pattern>
<pattern>**/*.dtd</pattern>
<pattern>**/*.tld</pattern>
</patterns>
</fileType>
<fileType>
<id>auto-remove</id>
<patterns>
<pattern>**/*.bak</pattern>
<pattern>**/*~</pattern>
<pattern>**/*-</pattern>
</patterns>
</fileType>
<fileType>
<id>ignored</id>
<patterns>
<pattern>**/.htaccess</pattern>
<pattern>**/KEYS</pattern>
<pattern>**/*.rb</pattern>
<pattern>**/*.sh</pattern>
<pattern>**/.svn/**</pattern>
<pattern>**/.DAV/**</pattern>
</patterns>
</fileType>
</fileTypes>
<knownContentConsumers>
<knownContentConsumer>update-db-artifact</knownContentConsumer>
<knownContentConsumer>create-missing-checksums</knownContentConsumer>
<knownContentConsumer>update-db-repository-metadata</knownContentConsumer>
<knownContentConsumer>validate-checksum</knownContentConsumer>
<knownContentConsumer>validate-signature</knownContentConsumer>
<knownContentConsumer>index-content</knownContentConsumer>
<knownContentConsumer>auto-remove</knownContentConsumer>
<knownContentConsumer>auto-rename</knownContentConsumer>
</knownContentConsumers>
<invalidContentConsumers>
<invalidContentConsumer>update-db-bad-content</invalidContentConsumer>
</invalidContentConsumers>
</repositoryScanning>

<databaseScanning>
<cronExpression>0 0 * * * ?</cronExpression>
<unprocessedConsumers>
<unprocessedConsumer>index-artifact</unprocessedConsumer>
<unprocessedConsumer>update-db-project</unprocessedConsumer>
<unprocessedConsumer>validate-repository-metadata</unprocessedConsumer>
<unprocessedConsumer>index-archive-toc</unprocessedConsumer>
<unprocessedConsumer>update-db-bytecode-stats</unprocessedConsumer>
<unprocessedConsumer>index-public-methods</unprocessedConsumer>
</unprocessedConsumers>
<cleanupConsumers>
<cleanupConsumer>not-present-remove-db-artifact</cleanupConsumer>
<cleanupConsumer>not-present-remove-db-project</cleanupConsumer>
<cleanupConsumer>not-present-remove-indexed</cleanupConsumer>
</cleanupConsumers>
</databaseScanning>

</configuration>

+ 40
- 0
archiva-modules/archiva-web/archiva-webapp-common/src/test/resources/log4j.xml View File

@@ -0,0 +1,40 @@
<?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.
-->

<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
</layout>
</appender>
<logger name="org.apache.archiva.web">
<level value="debug"/>
</logger>


<root>
<priority value ="info" />
<appender-ref ref="console" />
</root>

</log4j:configuration>

archiva-modules/archiva-web/archiva-webapp/src/test/resources/spring-context-rss-servlet.xml → archiva-modules/archiva-web/archiva-webapp-common/src/test/resources/spring-context-rss-servlet.xml View File


archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml → archiva-modules/archiva-web/archiva-webapp-common/src/test/webapp/WEB-INF/feedServletTest-web.xml View File


+ 8
- 0
archiva-modules/archiva-web/archiva-webapp/pom.xml View File

@@ -808,6 +808,14 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-webapp-common</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
<version>${project.version}</version>
</dependency>

</dependencies>
<build>
<resources>

Loading…
Cancel
Save