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-components.git


The following commit(s) were added to refs/heads/master by this push:
     new 8dfc8ea  Removing oscache implementation - no further development of 
oscache
8dfc8ea is described below

commit 8dfc8eafd866d5e69ef700829b2a2248c80f9782
Author: Martin Stockhammer <[email protected]>
AuthorDate: Tue Nov 19 18:49:42 2019 +0100

    Removing oscache implementation - no further development of oscache
---
 spring-cache/spring-cache-providers/pom.xml        |   1 -
 .../spring-cache-oscache/pom.xml                   |  64 ----
 .../components/cache/oscache/OsCacheCache.java     | 422 ---------------------
 .../components/cache/oscache/OsCacheCreator.java   |  74 ----
 .../cache/oscache/OsCacheStatistics.java           |  50 ---
 .../resources/META-INF/archiva-cache.properties    |  17 -
 .../src/main/resources/META-INF/spring-context.xml |  33 --
 .../components/cache/oscache/OsCacheCacheTest.java |  90 -----
 .../src/test/resources/spring-context.xml          |  58 ---
 9 files changed, 809 deletions(-)

diff --git a/spring-cache/spring-cache-providers/pom.xml 
b/spring-cache/spring-cache-providers/pom.xml
index 9aa569d..720e372 100644
--- a/spring-cache/spring-cache-providers/pom.xml
+++ b/spring-cache/spring-cache-providers/pom.xml
@@ -51,6 +51,5 @@
   <modules>
     <module>spring-cache-hashmap</module>
     <module>spring-cache-ehcache</module>
-    <module>spring-cache-oscache</module>
   </modules>
 </project>
diff --git a/spring-cache/spring-cache-providers/spring-cache-oscache/pom.xml 
b/spring-cache/spring-cache-providers/spring-cache-oscache/pom.xml
deleted file mode 100644
index 5636a50..0000000
--- a/spring-cache/spring-cache-providers/spring-cache-oscache/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed 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";>
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.archiva.components.cache</groupId>
-    <artifactId>archiva-components-spring-cache-providers</artifactId>
-    <version>3.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>archiva-components-spring-cache-oscache</artifactId>
-
-  <name>Archiva Components :: Spring Cache Provider :: oscache</name>
-
-  <description>Commons Cache API : oscache implementation.</description>
-  <properties>
-    <site.staging.base>${project.parent.parent.basedir}</site.staging.base>
-  </properties>
-
-  
<url>${webUrl}/spring-cache/spring-cache-providers/${project.artifactId}</url>
-
-  <dependencies>
-    <dependency>
-      <groupId>opensymphony</groupId>
-      <artifactId>oscache</artifactId>
-      <version>2.4</version>
-      <exclusions>
-        <exclusion>
-          <groupId>javax.jms</groupId>
-          <artifactId>jms</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.annotation</groupId>
-      <artifactId>javax.annotation-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-    </dependency>
-
-  </dependencies>
-
-</project>
diff --git 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheCache.java
 
b/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheCache.java
deleted file mode 100644
index 1b6c1c1..0000000
--- 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheCache.java
+++ /dev/null
@@ -1,422 +0,0 @@
-package org.apache.archiva.components.cache.oscache;
-
-/*
- * 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.opensymphony.oscache.base.CacheEntry;
-import com.opensymphony.oscache.base.NeedsRefreshException;
-import com.opensymphony.oscache.general.GeneralCacheAdministrator;
-import org.apache.archiva.components.cache.AbstractCache;
-import org.apache.archiva.components.cache.Cache;
-import org.apache.archiva.components.cache.CacheStatistics;
-
-import javax.annotation.PostConstruct;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * For configuration see documentation : 
http://opensymphony.com/oscache/wiki/Configuration.html
- *
- * @author @author Olivier Lamy
- */
-public class OsCacheCache<V, T>
-    extends AbstractCache<V, T>
-    implements Cache<V, T>
-{
-
-    private GeneralCacheAdministrator generalCacheAdministrator;
-
-    private OsCacheStatistics osCacheStatistics;
-
-    //---------------------------------------------
-    // Configuration attributes
-    //--------------------------------------------- 
-
-    /**
-     * use memory cache
-     */
-    private boolean cacheMemory = true;
-
-    /**
-     * maximum item numbers default value -1 means unlimited
-     */
-    private int capacity = -1;
-
-    /**
-     * cache algorithm
-     */
-    private String cacheAlgorithm;
-
-    /**
-     *
-     */
-    private boolean blockingCache = false;
-
-    /**
-     *
-     */
-    private boolean cacheUnlimitedDisk = false;
-
-    /**
-     *
-     */
-    private String cachePersistenceClass;
-
-    /**
-     *
-     */
-    private String cachePath;
-
-    /**
-     *
-     */
-    private boolean cachePersistenceOverflowOnly = false;
-
-    /**
-     * A default one will be added to provided CacheStatistics
-     */
-    private List cacheEventListeners;
-
-    /**
-     *
-     */
-    private String cacheKey;
-
-    /**
-     *
-     */
-    private boolean cacheUseHostDomainInKey = false;
-
-    /**
-     * in order to add some other osCache properties
-     */
-    private Map additionnalProperties;
-
-    /**
-     * default Value {@link CacheEntry#INDEFINITE_EXPIRY}
-     */
-    private int refreshPeriod = CacheEntry.INDEFINITE_EXPIRY;
-
-    //---------------------------------------------
-    // Component lifecycle
-    //---------------------------------------------
-    @PostConstruct
-    public void initialize( )
-    {
-        Properties cacheProperties = new Properties( );
-        if ( this.getAdditionnalProperties( ) != null )
-        {
-            cacheProperties.putAll( this.getAdditionnalProperties( ) );
-        }
-        if ( this.getCacheAlgorithm( ) != null )
-        {
-            cacheProperties.put( 
GeneralCacheAdministrator.CACHE_ALGORITHM_KEY, this.getCacheAlgorithm( ) );
-        }
-        cacheProperties.put( GeneralCacheAdministrator.CACHE_BLOCKING_KEY, 
Boolean.toString( this.isBlockingCache( ) ) );
-        cacheProperties.put( GeneralCacheAdministrator.CACHE_CAPACITY_KEY, 
Integer.toString( this.getCapacity( ) ) );
-        cacheProperties.put( 
GeneralCacheAdministrator.CACHE_DISK_UNLIMITED_KEY,
-            Boolean.toString( this.isCacheUnlimitedDisk( ) ) );
-
-        String cacheEventListenersAsString = 
this.getCacheEventListenersAsString( );
-        if ( cacheEventListenersAsString != null )
-        {
-            cacheProperties.put( 
GeneralCacheAdministrator.CACHE_ENTRY_EVENT_LISTENERS_KEY,
-                cacheEventListenersAsString );
-        }
-        cacheProperties.put( GeneralCacheAdministrator.CACHE_MEMORY_KEY, 
Boolean.toString( this.isCacheMemory( ) ) );
-        cacheProperties.put( 
GeneralCacheAdministrator.CACHE_PERSISTENCE_OVERFLOW_KEY,
-            Boolean.toString( this.isCachePersistenceOverflowOnly( ) ) );
-
-        if ( this.getCachePersistenceClass( ) != null )
-        {
-            cacheProperties.put( 
GeneralCacheAdministrator.PERSISTENCE_CLASS_KEY, this.getCachePersistenceClass( 
) );
-        }
-
-        cacheProperties.put( "cache.unlimited.disk", Boolean.toString( 
this.isCacheUnlimitedDisk( ) ) );
-        if ( this.getCachePath( ) != null )
-        {
-            cacheProperties.put( "cache.path", this.getCachePath( ) );
-        }
-        if ( this.getCacheKey( ) != null )
-        {
-            cacheProperties.put( "cache.key", this.getCacheKey( ) );
-        }
-        cacheProperties.put( "cache.use.host.domain.in.key", Boolean.toString( 
this.isCacheUseHostDomainInKey( ) ) );
-        this.generalCacheAdministrator = new GeneralCacheAdministrator( 
cacheProperties );
-        this.osCacheStatistics = new OsCacheStatistics( 
this.generalCacheAdministrator.getCache( ) );
-    }
-
-    //---------------------------------------------
-    // Interface implementation
-    //---------------------------------------------
-
-    public void clear( )
-    {
-        this.generalCacheAdministrator.flushAll( );
-    }
-
-    public T get( V key )
-    {
-        try
-        {
-            T object = null;
-            if ( this.getRefreshPeriod( ) >= 0 )
-            {
-                object = (T) this.generalCacheAdministrator.getFromCache( 
key.toString( ), this.getRefreshPeriod( ) );
-            }
-            else
-            {
-                object = (T) this.generalCacheAdministrator.getFromCache( 
key.toString( ) );
-            }
-            if ( object != null )
-            {
-                this.osCacheStatistics.hit( );
-            }
-            else
-            {
-                this.osCacheStatistics.miss( );
-            }
-            return object;
-        }
-        catch ( NeedsRefreshException e )
-        {
-            this.generalCacheAdministrator.cancelUpdate( key.toString( ) );
-            this.osCacheStatistics.miss( );
-            return null;
-        }
-    }
-
-
-    public CacheStatistics getStatistics( )
-    {
-        // osCacheStatistics to update ??
-        return this.osCacheStatistics;
-    }
-
-    public boolean hasKey( V key )
-    {
-        // TODO if null increase/decrease statistics ?
-        return this.get( key ) == null;
-    }
-
-    public void register( V key, T value )
-    {
-        this.generalCacheAdministrator.putInCache( key.toString( ), value );
-    }
-
-    public T put( V key, T value )
-    {
-        Object previous = null;
-        try
-        {
-            previous = this.generalCacheAdministrator.getFromCache( 
key.toString( ), this.getRefreshPeriod( ) );
-        }
-        catch ( NeedsRefreshException e )
-        {
-            // ignore this because the content will be updated
-        }
-        this.generalCacheAdministrator.putInCache( key.toString( ), value );
-        return (T) previous;
-    }
-
-    public T remove( V key )
-    {
-        Object previous = null;
-        try
-        {
-            previous = this.generalCacheAdministrator.getFromCache( 
key.toString( ), this.getRefreshPeriod( ) );
-
-        }
-        catch ( NeedsRefreshException e )
-        {
-            // ignore this because the content will be updated
-        }
-        this.generalCacheAdministrator.cancelUpdate( key.toString( ) );
-        this.generalCacheAdministrator.flushEntry( key.toString( ) );
-        return (T) previous;
-    }
-
-    //---------------------------------------------
-    // getters/setters
-    //---------------------------------------------    
-
-    public Map getAdditionnalProperties( )
-    {
-        return additionnalProperties;
-    }
-
-    public void setAdditionnalProperties( Map additionnalProperties )
-    {
-        this.additionnalProperties = additionnalProperties;
-    }
-
-    public boolean isBlockingCache( )
-    {
-        return blockingCache;
-    }
-
-    public void setBlockingCache( boolean blockingCache )
-    {
-        this.blockingCache = blockingCache;
-    }
-
-    public String getCacheAlgorithm( )
-    {
-        return cacheAlgorithm == null ? 
"com.opensymphony.oscache.base.algorithm.UnlimitedCache" : cacheAlgorithm;
-    }
-
-    public void setCacheAlgorithm( String cacheAlgorithm )
-    {
-        this.cacheAlgorithm = cacheAlgorithm;
-    }
-
-    public List getCacheEventListeners( )
-    {
-        return cacheEventListeners;
-    }
-
-    /**
-     * @return list values in a String separated with comma
-     */
-    private String getCacheEventListenersAsString( )
-    {
-        if ( this.getCacheEventListeners( ) == null )
-        {
-            return null;
-        }
-        if ( this.getCacheEventListeners( ).isEmpty( ) )
-        {
-            return null;
-        }
-        StringBuilder stringBuffer = new StringBuilder( );
-        for ( Iterator iterator = this.getCacheEventListeners( ).iterator( ); 
iterator.hasNext( ); )
-        {
-            stringBuffer.append( iterator.next( ) ).append( ',' );
-        }
-        return stringBuffer.toString( ).substring( 0, stringBuffer.toString( 
).length( ) - 1 );
-    }
-
-    public void setCacheEventListeners( List cacheEventListeners )
-    {
-        this.cacheEventListeners = cacheEventListeners;
-    }
-
-    public String getCacheKey( )
-    {
-        return cacheKey == null ? "cacheKey" : cacheKey;
-    }
-
-    public void setCacheKey( String cacheKey )
-    {
-        this.cacheKey = cacheKey;
-    }
-
-    public boolean isCacheMemory( )
-    {
-        return cacheMemory;
-    }
-
-    public void setCacheMemory( boolean cacheMemory )
-    {
-        this.cacheMemory = cacheMemory;
-    }
-
-    public String getCachePath( )
-    {
-        return cachePath;
-    }
-
-    public void setCachePath( String cachePath )
-    {
-        this.cachePath = cachePath;
-    }
-
-    public String getCachePersistenceClass( )
-    {
-        return cachePersistenceClass;
-    }
-
-    public void setCachePersistenceClass( String cachePersistenceClass )
-    {
-        this.cachePersistenceClass = cachePersistenceClass;
-    }
-
-    public boolean isCachePersistenceOverflowOnly( )
-    {
-        return cachePersistenceOverflowOnly;
-    }
-
-    public void setCachePersistenceOverflowOnly( boolean 
cachePersistenceOverflowOnly )
-    {
-        this.cachePersistenceOverflowOnly = cachePersistenceOverflowOnly;
-    }
-
-    public boolean isCacheUnlimitedDisk( )
-    {
-        return cacheUnlimitedDisk;
-    }
-
-    public void setCacheUnlimitedDisk( boolean cacheUnlimitedDisk )
-    {
-        this.cacheUnlimitedDisk = cacheUnlimitedDisk;
-    }
-
-    public boolean isCacheUseHostDomainInKey( )
-    {
-        return cacheUseHostDomainInKey;
-    }
-
-    public void setCacheUseHostDomainInKey( boolean cacheUseHostDomainInKey )
-    {
-        this.cacheUseHostDomainInKey = cacheUseHostDomainInKey;
-    }
-
-    public int getCapacity( )
-    {
-        return capacity;
-    }
-
-    public void setCapacity( int capacity )
-    {
-        this.capacity = capacity;
-    }
-
-    public GeneralCacheAdministrator getGeneralCacheAdministrator( )
-    {
-        return generalCacheAdministrator;
-    }
-
-    public void setGeneralCacheAdministrator( GeneralCacheAdministrator 
generalCacheAdministrator )
-    {
-        this.generalCacheAdministrator = generalCacheAdministrator;
-    }
-
-    public int getRefreshPeriod( )
-    {
-        return refreshPeriod;
-    }
-
-    public void setRefreshPeriod( int refreshPeriod )
-    {
-        this.refreshPeriod = refreshPeriod;
-    }
-
-}
diff --git 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheCreator.java
 
b/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheCreator.java
deleted file mode 100644
index 775fa66..0000000
--- 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheCreator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.apache.archiva.components.cache.oscache;
-
-/*
- * 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.components.cache.Cache;
-import org.apache.archiva.components.cache.CacheException;
-import org.apache.archiva.components.cache.CacheHints;
-import org.apache.archiva.components.cache.factory.CacheCreator;
-import org.apache.commons.lang3.SystemUtils;
-
-import java.io.File;
-
-/**
- * OsCacheCreator
- *
- * @author <a href="mailto:[email protected]";>Joakim Erdfelt</a>
- */
-public class OsCacheCreator
-    implements CacheCreator
-{
-
-    public Cache createCache( CacheHints hints )
-        throws CacheException
-    {
-        OsCacheCache cache = new OsCacheCache( );
-
-        cache.setCacheKey( hints.getName( ) );
-
-        cache.setCachePersistenceOverflowOnly( hints.isOverflowToDisk( ) );
-        if ( hints.isOverflowToDisk( ) )
-        {
-            File overflowPath = null;
-
-            if ( hints.getDiskOverflowPath( ) != null )
-            {
-                overflowPath = hints.getDiskOverflowPath( );
-            }
-            else
-            {
-                File tmpDir = SystemUtils.getJavaIoTmpDir( );
-                overflowPath = new File( tmpDir, "oscache/" + hints.getName( ) 
);
-            }
-
-            cache.setCachePath( overflowPath.getAbsolutePath( ) );
-        }
-
-        cache.setCapacity( hints.getMaxElements( ) );
-        cache.setRefreshPeriod( hints.getIdleExpirationSeconds( ) );
-
-        // Does not support:  hints.getMaxSecondsInCache()
-
-        cache.initialize( );
-
-        return cache;
-    }
-
-}
diff --git 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheStatistics.java
 
b/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheStatistics.java
deleted file mode 100644
index ec6b06e..0000000
--- 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/java/org/apache/archiva/components/cache/oscache/OsCacheStatistics.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.archiva.components.cache.oscache;
-
-/*
- * 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.opensymphony.oscache.base.Cache;
-import org.apache.archiva.components.cache.AbstractCacheStatistics;
-import org.apache.archiva.components.cache.CacheStatistics;
-
-/**
- * @author Olivier Lamy
- */
-public class OsCacheStatistics
-    extends AbstractCacheStatistics
-    implements CacheStatistics
-{
-
-    private Cache cache;
-
-    protected OsCacheStatistics( Cache cache )
-    {
-        super( );
-        this.cache = cache;
-    }
-
-    /**
-     * @see AbstractCacheStatistics#getSize()
-     */
-    public long getSize( )
-    {
-        return this.cache.getNbEntries( );
-    }
-
-}
diff --git 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/resources/META-INF/archiva-cache.properties
 
b/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/resources/META-INF/archiva-cache.properties
deleted file mode 100644
index a9eeb9e..0000000
--- 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/resources/META-INF/archiva-cache.properties
+++ /dev/null
@@ -1,17 +0,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.
-cache.creator=org.apache.archiva.components.cache.oscache.OsCacheCreator
\ No newline at end of file
diff --git 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/resources/META-INF/spring-context.xml
 
b/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/resources/META-INF/spring-context.xml
deleted file mode 100644
index b1bceef..0000000
--- 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/main/resources/META-INF/spring-context.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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";>
-
-  <context:annotation-config/>
-  <context:component-scan
-          base-package="org.apache.archiva.components.cache.oscache"/>
-
-</beans>
\ No newline at end of file
diff --git 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/test/java/org/apache/archiva/components/cache/oscache/OsCacheCacheTest.java
 
b/spring-cache/spring-cache-providers/spring-cache-oscache/src/test/java/org/apache/archiva/components/cache/oscache/OsCacheCacheTest.java
deleted file mode 100644
index 38297fa..0000000
--- 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/test/java/org/apache/archiva/components/cache/oscache/OsCacheCacheTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.apache.archiva.components.cache.oscache;
-
-/*
- * Copyright 2001-2007 The Codehaus.
- *
- * Licensed 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.components.cache.Cache;
-import org.apache.archiva.components.cache.test.AbstractCacheTestCase;
-import org.apache.archiva.components.cache.test.examples.wine.Wine;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-
-/**
- * Tests for OsCacheCache.
- *
- * @author Olivier Lamy
- * @since 3 February, 2007
- */
-public class OsCacheCacheTest
-    extends AbstractCacheTestCase
-{
-
-    @Inject
-    @Named( value = "cache#oscache" )
-    Cache<String, Integer> cache;
-
-    @Inject
-    @Named( value = "cache#alwaysrefresh" )
-    Cache<String, Wine> cachealwaysrefresh;
-
-    @Inject
-    @Named( value = "cache#onesecondrefresh" )
-    Cache<String, Wine> cacheonesecondrefresh;
-
-    @Inject
-    @Named( value = "cache#twosecondrefresh" )
-    Cache<String, Wine> cachetwosecondrefresh;
-
-    @Inject
-    @Named( value = "cache#neverrefresh" )
-    Cache<String, Wine> cacheneversecondrefresh;
-
-    @Override
-    public Cache<String, Integer> getCache( )
-    {
-        return cache;
-    }
-
-    public Cache<String, Wine> getAlwaysRefresCache( )
-        throws Exception
-    {
-        return cachealwaysrefresh;
-    }
-
-    public Cache<String, Wine> getNeverRefresCache( )
-        throws Exception
-    {
-        return cacheneversecondrefresh;
-    }
-
-    public Cache<String, Wine> getOneSecondRefresCache( )
-        throws Exception
-    {
-        return cacheonesecondrefresh;
-    }
-
-    public Cache<String, Wine> getTwoSecondRefresCache( )
-        throws Exception
-    {
-        return cachetwosecondrefresh;
-    }
-
-    public Class getCacheClass( )
-    {
-        return OsCacheCache.class;
-    }
-}
diff --git 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/test/resources/spring-context.xml
 
b/spring-cache/spring-cache-providers/spring-cache-oscache/src/test/resources/spring-context.xml
deleted file mode 100644
index fa3e30b..0000000
--- 
a/spring-cache/spring-cache-providers/spring-cache-oscache/src/test/resources/spring-context.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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";
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd";>
-
-
-  <bean name="cache#default" 
class="org.apache.archiva.components.cache.oscache.OsCacheCache">
-    <property name="cacheKey" value="default"/>
-  </bean>
-
-  <bean name="cache#oscache" 
class="org.apache.archiva.components.cache.oscache.OsCacheCache">
-    <property name="cacheKey" value="oscache"/>
-  </bean>
-
-  <bean name="cache#neverrefresh" 
class="org.apache.archiva.components.cache.oscache.OsCacheCache">
-    <property name="cacheKey" value="neverrefresh"/>
-    <property name="refreshPeriod" value="-2"/>
-  </bean>
-
-  <bean name="cache#alwaysrefresh" 
class="org.apache.archiva.components.cache.oscache.OsCacheCache">
-    <property name="cacheKey" value="alwaysrefresh"/>
-    <property name="refreshPeriod" value="0"/>
-  </bean>
-
-  <bean name="cache#onesecondrefresh" 
class="org.apache.archiva.components.cache.oscache.OsCacheCache">
-    <property name="cacheKey" value="onesecondrefresh"/>
-    <property name="refreshPeriod" value="1"/>
-  </bean>
-
-  <bean name="cache#twosecondrefresh" 
class="org.apache.archiva.components.cache.oscache.OsCacheCache">
-    <property name="cacheKey" value="onesecondrefresh"/>
-    <property name="refreshPeriod" value="15"/>
-  </bean>
-
-  <bean name="cache#wine" 
class="org.apache.archiva.components.cache.oscache.OsCacheCache">
-  </bean>
-
-</beans>
\ No newline at end of file

Reply via email to