diff options
author | Brett Porter <brett@apache.org> | 2010-12-23 00:19:22 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2010-12-23 00:19:22 +0000 |
commit | cdcc0f4ded26ea46705db23021c509b218b3efbc (patch) | |
tree | 9b3c79b5f1d1bfcf7c8ec63f694178addbf46741 /archiva-modules | |
parent | 10559538664d00bf2097bff2a6705e17b7dcc32b (diff) | |
download | archiva-cdcc0f4ded26ea46705db23021c509b218b3efbc.tar.gz archiva-cdcc0f4ded26ea46705db23021c509b218b3efbc.zip |
move cache configuration into Spring context file
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1052117 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
3 files changed, 22 insertions, 44 deletions
diff --git a/archiva-modules/archiva-base/archiva-policies/pom.xml b/archiva-modules/archiva-base/archiva-policies/pom.xml index f9e44d9ca..5331d51f9 100644 --- a/archiva-modules/archiva-base/archiva-policies/pom.xml +++ b/archiva-modules/archiva-base/archiva-policies/pom.xml @@ -18,7 +18,8 @@ ~ 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"> +<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> @@ -68,24 +69,11 @@ <executions> <execution> <id>descriptor</id> - <phase>generate-resources</phase> + <phase>generate-resources</phase> <goals> <goal>generate-metadata</goal> </goals> </execution> - <execution> - <id>merge</id> - <phase>generate-resources</phase> - <goals> - <goal>merge-metadata</goal> - </goals> - <configuration> - <descriptors> - <descriptor>${basedir}/src/main/resources/META-INF/plexus/components-fragment.xml</descriptor> - <descriptor>${project.build.outputDirectory}/META-INF/plexus/components.xml</descriptor> - </descriptors> - </configuration> - </execution> </executions> </plugin> </plugins> diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components-fragment.xml b/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components-fragment.xml deleted file mode 100644 index b66220612..000000000 --- a/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components-fragment.xml +++ /dev/null @@ -1,24 +0,0 @@ -<component-set> - <components> - <component> - <role>org.codehaus.plexus.cache.Cache</role> - <role-hint>url-failures-cache</role-hint> - <implementation>org.codehaus.plexus.cache.ehcache.EhcacheCache</implementation> - <description>URL Failure Cache</description> - <configuration> - <disk-expiry-thread-interval-seconds>600</disk-expiry-thread-interval-seconds> - <disk-persistent>true</disk-persistent> - <disk-store-path>${java.io.tmpdir}/archiva/urlcache</disk-store-path> - <eternal>false</eternal> - <max-elements-in-memory>1000</max-elements-in-memory> - <memory-eviction-policy>LRU</memory-eviction-policy> - <name>url-failures-cache</name> - <overflow-to-disk>false</overflow-to-disk> - <!-- 45 minutes = 2700 seconds --> - <time-to-idle-seconds>2700</time-to-idle-seconds> - <!-- 30 minutes = 1800 seconds --> - <time-to-live-seconds>1800</time-to-live-seconds> - </configuration> - </component> - </components> -</component-set> diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml index 75a5d41c0..082069ef7 100644 --- a/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml @@ -18,15 +18,29 @@ ~ 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 + 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-2.5.xsd"> <bean id="urlFailureCache" - class="org.apache.maven.archiva.policies.urlcache.DefaultUrlFailureCache"> + class="org.apache.maven.archiva.policies.urlcache.DefaultUrlFailureCache" lazy-init="true"> <!-- collaborators and configuration for this bean go here --> - <constructor-arg ref="cache#url-failures-cache" - type="org.codehaus.plexus.cache.Cache" /> + <constructor-arg ref="url-failures-cache" + type="org.codehaus.plexus.cache.Cache"/> </bean> + <bean id="url-failures-cache" class="org.codehaus.plexus.cache.ehcache.EhcacheCache" lazy-init="true" + destroy-method="dispose"> + <property name="diskExpiryThreadIntervalSeconds" value="600"/> + <property name="diskPersistent" value="true"/> + <property name="diskStorePath" value="${java.io.tmpdir}/archiva/urlcache"/> + <property name="maxElementsInMemory" value="1000"/> + <property name="memoryEvictionPolicy" value="LRU"/> + <property name="name" value="url-failures-cache"/> + <property name="overflowToDisk" value="false"/> + <!-- 45 minutes = 2700 seconds --> + <property name="timeToIdleSeconds" value="2700"/> + <!-- 30 minutes = 1800 seconds --> + <property name="timeToLiveSeconds" value="1800"/> + </bean> </beans>
\ No newline at end of file |