]> source.dussan.org Git - archiva.git/commitdiff
Fixing in-IDE test failures.
authorJoakim Erdfelt <joakime@apache.org>
Thu, 24 May 2007 18:27:49 +0000 (18:27 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Thu, 24 May 2007 18:27:49 +0000 (18:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541375 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-policies/pom.xml
archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components-fragment.xml [new file with mode: 0644]
archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components.xml [deleted file]
archiva-base/archiva-policies/src/test/java/org/apache/maven/archiva/policies/AllTests.java [new file with mode: 0644]
archiva-base/archiva-policies/src/test/resources/org/apache/maven/archiva/policies/CachedFailuresPolicyTest.xml [new file with mode: 0644]

index 038e24740cbd12a1932263678d975de150720f4f..bd4d3458157b02ce5ebb791898bdda27661dce1c 100644 (file)
@@ -73,8 +73,9 @@
               <goal>merge-descriptors</goal>
             </goals>
             <configuration>
+              <descriptor>${project.build.directory}/generated-resources/plexus/META-INF/plexus/components.xml</descriptor>
               <descriptors>
-                <descriptor>${basedir}/src/main/resources/META-INF/plexus/components.xml</descriptor>
+                <descriptor>${basedir}/src/main/resources/META-INF/plexus/components-fragment.xml</descriptor>
                 <descriptor>${project.build.directory}/generated-resources/plexus/META-INF/plexus/components.xml</descriptor>
               </descriptors>
             </configuration>
diff --git a/archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components-fragment.xml b/archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components-fragment.xml
new file mode 100644 (file)
index 0000000..66d543f
--- /dev/null
@@ -0,0 +1,24 @@
+<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>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-base/archiva-policies/src/main/resources/META-INF/plexus/components.xml b/archiva-base/archiva-policies/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644 (file)
index 66d543f..0000000
+++ /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>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-base/archiva-policies/src/test/java/org/apache/maven/archiva/policies/AllTests.java b/archiva-base/archiva-policies/src/test/java/org/apache/maven/archiva/policies/AllTests.java
new file mode 100644 (file)
index 0000000..7397731
--- /dev/null
@@ -0,0 +1,44 @@
+package org.apache.maven.archiva.policies;
+
+/*
+ * 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 junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Helper class for IDE testing.
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class AllTests
+{
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite( "Test for org.apache.maven.archiva.policies" );
+        //$JUnit-BEGIN$
+        suite.addTestSuite( ChecksumPolicyTest.class );
+        suite.addTestSuite( CachedFailuresPolicyTest.class );
+        //$JUnit-END$
+        return suite;
+    }
+
+}
diff --git a/archiva-base/archiva-policies/src/test/resources/org/apache/maven/archiva/policies/CachedFailuresPolicyTest.xml b/archiva-base/archiva-policies/src/test/resources/org/apache/maven/archiva/policies/CachedFailuresPolicyTest.xml
new file mode 100644 (file)
index 0000000..a42cdec
--- /dev/null
@@ -0,0 +1,24 @@
+<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>false</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>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>