Return-Path: X-Original-To: apmail-archiva-commits-archive@www.apache.org Delivered-To: apmail-archiva-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21DAA93A4 for ; Thu, 3 Nov 2011 00:00:39 +0000 (UTC) Received: (qmail 94024 invoked by uid 500); 3 Nov 2011 00:00:39 -0000 Delivered-To: apmail-archiva-commits-archive@archiva.apache.org Received: (qmail 93991 invoked by uid 500); 3 Nov 2011 00:00:39 -0000 Mailing-List: contact commits-help@archiva.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@archiva.apache.org Delivered-To: mailing list commits@archiva.apache.org Received: (qmail 93984 invoked by uid 99); 3 Nov 2011 00:00:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 00:00:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 00:00:33 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7E9D12388D04 for ; Thu, 3 Nov 2011 00:00:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1196875 - in /archiva/trunk/archiva-modules: archiva-base/archiva-indexer/ archiva-base/archiva-indexer/src/main/resources/META-INF/ archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/ archiva-base/archiva-in... Date: Thu, 03 Nov 2011 00:00:11 -0000 To: commits@archiva.apache.org From: olamy@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111103000011.7E9D12388D04@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olamy Date: Thu Nov 3 00:00:09 2011 New Revision: 1196875 URL: http://svn.apache.org/viewvc?rev=1196875&view=rev Log: fix archiva-indexer tests declare task spring annotations only for webapp Added: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java (with props) archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/redback-core.xml (with props) Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/pom.xml archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/resources/META-INF/spring-context.xml archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/pom.xml URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/pom.xml?rev=1196875&r1=1196874&r2=1196875&view=diff ============================================================================== --- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/pom.xml (original) +++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/pom.xml Thu Nov 3 00:00:09 2011 @@ -116,6 +116,31 @@ slf4j-simple test + + org.apache.derby + derby + test + + + org.codehaus.redback + redback-keys-memory + test + + + org.codehaus.redback + redback-rbac-cached + test + + + org.codehaus.redback + redback-rbac-memory + test + + + org.codehaus.redback + redback-users-memory + test + @@ -131,5 +156,18 @@ + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${project.build.directory}/appserver-base + ${project.build.directory}/appserver-base + ${project.build.directory}/appserver-base + + + + Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/resources/META-INF/spring-context.xml URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/resources/META-INF/spring-context.xml?rev=1196875&r1=1196874&r2=1196875&view=diff ============================================================================== --- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/resources/META-INF/spring-context.xml (original) +++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/resources/META-INF/spring-context.xml Thu Nov 3 00:00:09 2011 @@ -41,8 +41,4 @@ - - - - \ No newline at end of file Added: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java?rev=1196875&view=auto ============================================================================== --- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java (added) +++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java Thu Nov 3 00:00:09 2011 @@ -0,0 +1,249 @@ +package org.apache.archiva.indexer.search.mock; +/* + * 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 org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.model.MetadataFacet; +import org.apache.archiva.metadata.model.ProjectMetadata; +import org.apache.archiva.metadata.model.ProjectVersionMetadata; +import org.apache.archiva.metadata.model.ProjectVersionReference; +import org.apache.archiva.metadata.repository.MetadataRepository; +import org.apache.archiva.metadata.repository.MetadataRepositoryException; +import org.apache.archiva.metadata.repository.MetadataResolutionException; +import org.apache.archiva.metadata.repository.RepositorySession; +import org.apache.archiva.metadata.repository.RepositorySessionFactory; +import org.springframework.stereotype.Service; + +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * @author Olivier Lamy + */ +@Service( "RepositorySessionFactory#mock" ) +public class MockRepositorySessionFactory + implements RepositorySessionFactory +{ + public RepositorySession createSession( ) + { + return new RepositorySession( null, null ) + { + @Override + public void close( ) + { + return; + } + + @Override + public void save( ) + { + // no op + } + + @Override + public MetadataRepository getRepository( ) + { + return new MetadataRepository( ) + { + public void updateProject( String repositoryId, ProjectMetadata project ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void updateArtifact( String repositoryId, String namespace, String projectId, + String projectVersion, ArtifactMetadata artifactMeta ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void updateProjectVersion( String repositoryId, String namespace, String projectId, + ProjectVersionMetadata versionMetadata ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void updateNamespace( String repositoryId, String namespace ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public List getMetadataFacets( String repositoryId, String facetId ) + throws MetadataRepositoryException + { + return Collections.emptyList( ); + } + + public MetadataFacet getMetadataFacet( String repositoryId, String facetId, String name ) + throws MetadataRepositoryException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public void addMetadataFacet( String repositoryId, MetadataFacet metadataFacet ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void removeMetadataFacets( String repositoryId, String facetId ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void removeMetadataFacet( String repositoryId, String facetId, String name ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public List getArtifactsByDateRange( String repositoryId, Date startTime, + Date endTime ) + throws MetadataRepositoryException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getRepositories( ) + throws MetadataRepositoryException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public List getArtifactsByChecksum( String repositoryId, String checksum ) + throws MetadataRepositoryException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public void removeArtifact( String repositoryId, String namespace, String project, String version, + String id ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void removeRepository( String repositoryId ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public List getArtifacts( String repositoryId ) + throws MetadataRepositoryException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public ProjectMetadata getProject( String repoId, String namespace, String projectId ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public ProjectVersionMetadata getProjectVersion( String repoId, String namespace, String projectId, + String projectVersion ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getArtifactVersions( String repoId, String namespace, String projectId, + String projectVersion ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getProjectReferences( String repoId, String namespace, + String projectId, + String projectVersion ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getRootNamespaces( String repoId ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getNamespaces( String repoId, String namespace ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getProjects( String repoId, String namespace ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getProjectVersions( String repoId, String namespace, String projectId ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection getArtifacts( String repoId, String namespace, String projectId, + String projectVersion ) + throws MetadataResolutionException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public void save( ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void close( ) + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void revert( ) + throws MetadataRepositoryException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public boolean canObtainAccess( Class aClass ) + { + return false; //To change body of implemented methods use File | Settings | File Templates. + } + + public Object obtainAccess( Class aClass ) + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + }; + } + }; + } +} Propchange: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/redback-core.xml URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/redback-core.xml?rev=1196875&view=auto ============================================================================== --- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/redback-core.xml (added) +++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/redback-core.xml Thu Nov 3 00:00:09 2011 @@ -0,0 +1,247 @@ + + + + 1.0.0 + + + System + Roles that apply system-wide, across all of the applications + 1.0.0 + + + global + * + true + global resource implies full access for authorization + + + username + ${username} + true + replaced with the username of the principal at authorization check time + + + + + configuration-edit + configuration-edit + edit configuration + true + + + user-management-user-create + user-management-user-create + create user + true + + + user-management-user-edit + user-management-user-edit + edit user + true + + + user-management-user-role + user-management-user-role + user roles + true + + + user-management-user-delete + user-management-user-delete + delete user + true + + + user-management-user-list + user-management-user-list + list users + true + + + user-management-role-grant + user-management-role-grant + grant role + true + + + user-management-role-drop + user-management-role-drop + drop role + true + + + user-management-rbac-admin + user-management-rbac-admin + administer rbac + true + + + guest-access + guest-access + access guest + true + + + user-management-manage-data + user-management-manage-data + manage data + true + + + + + system-administrator + System Administrator + true + true + + + edit-redback-configuration + Edit Redback Configuration + configuration-edit + global + true + + + manage-rbac-setup + User RBAC Management + user-management-rbac-admin + global + true + + + manage-rbac-data + RBAC Manage Data + user-management-manage-data + global + true + + + + user-administrator + + + + user-administrator + User Administrator + true + true + + + drop-roles-for-anyone + Drop Roles for Anyone + user-management-role-drop + global + true + + + grant-roles-for-anyone + Grant Roles for Anyone + user-management-role-grant + global + true + + + user-create + Create Users + user-management-user-create + global + true + + + user-delete + Delete Users + user-management-user-delete + global + true + + + user-edit + Edit Users + user-management-user-edit + global + true + + + access-users-roles + Access Users Roles + user-management-user-role + global + true + + + access-user-list + Access User List + user-management-user-list + global + true + + + + + edit-users-list + edit users list + true + true + + + access-user-list + Access User List + user-management-user-list + global + true + + + + + registered-user + Registered User + true + true + + + edit-user-by-username + Edit User Data by Username + user-management-user-edit + username + true + + + + + guest + Guest + true + true + + + guest-permission + Guest Permission + guest-access + global + true + + + + + + + \ No newline at end of file Propchange: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/redback-core.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/META-INF/redback/redback-core.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml?rev=1196875&r1=1196874&r2=1196875&view=diff ============================================================================== --- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml (original) +++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml Thu Nov 3 00:00:09 2011 @@ -21,12 +21,28 @@ + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context-3.0.xsd + http://www.springframework.org/schema/task + http://www.springframework.org/schema/task/spring-task-3.0.xsd" + default-lazy-init="false"> + + + + + + scheduler1 + org.quartz.simpl.SimpleThreadPool + 2 + 4 + org.quartz.simpl.RAMJobStore + + + \ No newline at end of file Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml?rev=1196875&r1=1196874&r2=1196875&view=diff ============================================================================== --- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml (original) +++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml Thu Nov 3 00:00:09 2011 @@ -20,16 +20,24 @@ + http://www.springframework.org/schema/context/spring-context-3.0.xsd + http://www.springframework.org/schema/task + http://www.springframework.org/schema/task/spring-task-3.0.xsd"> + + + + +