]> source.dussan.org Git - archiva.git/commitdiff
move the module to a more usual place
authorOlivier Lamy <olamy@apache.org>
Mon, 2 Jul 2012 07:38:31 +0000 (07:38 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 2 Jul 2012 07:38:31 +0000 (07:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1356094 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-testutil/pom.xml [new file with mode: 0644]
archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaBlockJUnit4ClassRunner.java [new file with mode: 0644]
archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaSpringJUnit4ClassRunner.java [new file with mode: 0644]
archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ListGenerator.java [new file with mode: 0644]
archiva-modules/archiva-base/pom.xml
archiva-testutil/pom.xml [deleted file]
archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaBlockJUnit4ClassRunner.java [deleted file]
archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaSpringJUnit4ClassRunner.java [deleted file]
archiva-testutil/src/main/java/org/apache/archiva/test/ListGenerator.java [deleted file]
pom.xml

diff --git a/archiva-modules/archiva-base/archiva-testutil/pom.xml b/archiva-modules/archiva-base/archiva-testutil/pom.xml
new file mode 100644 (file)
index 0000000..829385f
--- /dev/null
@@ -0,0 +1,51 @@
+<?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.
+  -->
+
+<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</artifactId>
+    <version>1.4-M3-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>archiva-testutil</artifactId>
+  <name>Archiva :: Test Utility</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>xmlunit</groupId>
+      <artifactId>xmlunit</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>  
+</project>
diff --git a/archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaBlockJUnit4ClassRunner.java b/archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaBlockJUnit4ClassRunner.java
new file mode 100644 (file)
index 0000000..4a6a2bb
--- /dev/null
@@ -0,0 +1,43 @@
+package org.apache.archiva.test;
+
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * 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.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+
+import java.util.List;
+
+/**
+ * @author Eric
+ */
+public class ArchivaBlockJUnit4ClassRunner
+    extends BlockJUnit4ClassRunner
+{
+
+    public ArchivaBlockJUnit4ClassRunner( Class<?> klass )
+        throws InitializationError
+    {
+        super( klass );
+    }
+
+    @Override
+    protected List<FrameworkMethod> computeTestMethods()
+    {
+        return ListGenerator.getShuffleList( super.computeTestMethods() );
+    }
+}
diff --git a/archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaSpringJUnit4ClassRunner.java b/archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaSpringJUnit4ClassRunner.java
new file mode 100644 (file)
index 0000000..7dbdebe
--- /dev/null
@@ -0,0 +1,45 @@
+package org.apache.archiva.test;
+
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * 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.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.List;
+
+/**
+ * @author Eric
+ */
+public class ArchivaSpringJUnit4ClassRunner
+    extends SpringJUnit4ClassRunner
+{
+
+    public ArchivaSpringJUnit4ClassRunner( Class<?> clazz )
+        throws InitializationError
+    {
+        super( clazz );
+    }
+
+    @Override
+    protected List<FrameworkMethod> computeTestMethods()
+    {
+        return ListGenerator.getShuffleList( super.computeTestMethods() );
+    }
+
+
+}
diff --git a/archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ListGenerator.java b/archiva-modules/archiva-base/archiva-testutil/src/main/java/org/apache/archiva/test/ListGenerator.java
new file mode 100644 (file)
index 0000000..69ee4e7
--- /dev/null
@@ -0,0 +1,77 @@
+package org.apache.archiva.test;
+
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * 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.junit.runners.model.FrameworkMethod;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * @author Eric
+ */
+public class ListGenerator
+{
+    private static int MAXROUND = 1;
+
+    private ListGenerator()
+    {
+    }
+
+    static List<FrameworkMethod> getShuffleList( List<FrameworkMethod> computeTestMethods )
+    {
+        String javaSpecVersion = System.getProperty( "java.specification.version" );
+        // 1.6 1.5 version not shuffled to allow build
+        if ( javaSpecVersion.equals( "1.6" ) || javaSpecVersion.equals( "1.5" ) )
+        {
+            return computeTestMethods;
+        }
+        if ( computeTestMethods == null )
+        {
+            return null;
+        }
+        List<FrameworkMethod> generated = new ArrayList<FrameworkMethod>( computeTestMethods );
+
+        Collections.sort( generated, new FrameworkMethodComparator() );
+
+        // 1.7 and more generated shuffled list
+        // double test method to have more change of failure
+        /*for ( int i = 0; i < MAXROUND; i++ )
+        {
+            Collections.shuffle( computeTestMethods );
+            generated.addAll( computeTestMethods );
+        }*/
+        //generated.add( computeTestMethods.get( 0 ) );
+
+        //Collections.shuffle( computeTestMethods );
+        //generated.addAll( computeTestMethods );
+
+        return generated;
+    }
+
+    private static class FrameworkMethodComparator
+        implements Comparator<FrameworkMethod>
+    {
+        public int compare( FrameworkMethod frameworkMethod, FrameworkMethod frameworkMethod1 )
+        {
+            return frameworkMethod.getName().compareTo( frameworkMethod1.getName() );
+        }
+    }
+
+}
index 1431d932a69aae3dbf1fb37118265cdba23d8bcd..981d47d79cf98e1e5a48adc9f9af8442436c0d1f 100644 (file)
@@ -29,6 +29,7 @@
   <packaging>pom</packaging>
 
   <modules>
+    <module>archiva-testutil</module>
     <module>archiva-common</module>
     <module>archiva-model</module>
     <module>archiva-configuration</module>
diff --git a/archiva-testutil/pom.xml b/archiva-testutil/pom.xml
deleted file mode 100644 (file)
index 829385f..0000000
+++ /dev/null
@@ -1,51 +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.
-  -->
-
-<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</artifactId>
-    <version>1.4-M3-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>archiva-testutil</artifactId>
-  <name>Archiva :: Test Utility</name>
-  <dependencies>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>xmlunit</groupId>
-      <artifactId>xmlunit</artifactId>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>  
-</project>
diff --git a/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaBlockJUnit4ClassRunner.java b/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaBlockJUnit4ClassRunner.java
deleted file mode 100644 (file)
index 4a6a2bb..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.archiva.test;
-
-/*
- * Copyright 2012 The Apache Software Foundation.
- *
- * 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.junit.runners.BlockJUnit4ClassRunner;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.InitializationError;
-
-import java.util.List;
-
-/**
- * @author Eric
- */
-public class ArchivaBlockJUnit4ClassRunner
-    extends BlockJUnit4ClassRunner
-{
-
-    public ArchivaBlockJUnit4ClassRunner( Class<?> klass )
-        throws InitializationError
-    {
-        super( klass );
-    }
-
-    @Override
-    protected List<FrameworkMethod> computeTestMethods()
-    {
-        return ListGenerator.getShuffleList( super.computeTestMethods() );
-    }
-}
diff --git a/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaSpringJUnit4ClassRunner.java b/archiva-testutil/src/main/java/org/apache/archiva/test/ArchivaSpringJUnit4ClassRunner.java
deleted file mode 100644 (file)
index 7dbdebe..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.apache.archiva.test;
-
-/*
- * Copyright 2012 The Apache Software Foundation.
- *
- * 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.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.InitializationError;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-import java.util.List;
-
-/**
- * @author Eric
- */
-public class ArchivaSpringJUnit4ClassRunner
-    extends SpringJUnit4ClassRunner
-{
-
-    public ArchivaSpringJUnit4ClassRunner( Class<?> clazz )
-        throws InitializationError
-    {
-        super( clazz );
-    }
-
-    @Override
-    protected List<FrameworkMethod> computeTestMethods()
-    {
-        return ListGenerator.getShuffleList( super.computeTestMethods() );
-    }
-
-
-}
diff --git a/archiva-testutil/src/main/java/org/apache/archiva/test/ListGenerator.java b/archiva-testutil/src/main/java/org/apache/archiva/test/ListGenerator.java
deleted file mode 100644 (file)
index 69ee4e7..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.apache.archiva.test;
-
-/*
- * Copyright 2012 The Apache Software Foundation.
- *
- * 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.junit.runners.model.FrameworkMethod;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * @author Eric
- */
-public class ListGenerator
-{
-    private static int MAXROUND = 1;
-
-    private ListGenerator()
-    {
-    }
-
-    static List<FrameworkMethod> getShuffleList( List<FrameworkMethod> computeTestMethods )
-    {
-        String javaSpecVersion = System.getProperty( "java.specification.version" );
-        // 1.6 1.5 version not shuffled to allow build
-        if ( javaSpecVersion.equals( "1.6" ) || javaSpecVersion.equals( "1.5" ) )
-        {
-            return computeTestMethods;
-        }
-        if ( computeTestMethods == null )
-        {
-            return null;
-        }
-        List<FrameworkMethod> generated = new ArrayList<FrameworkMethod>( computeTestMethods );
-
-        Collections.sort( generated, new FrameworkMethodComparator() );
-
-        // 1.7 and more generated shuffled list
-        // double test method to have more change of failure
-        /*for ( int i = 0; i < MAXROUND; i++ )
-        {
-            Collections.shuffle( computeTestMethods );
-            generated.addAll( computeTestMethods );
-        }*/
-        //generated.add( computeTestMethods.get( 0 ) );
-
-        //Collections.shuffle( computeTestMethods );
-        //generated.addAll( computeTestMethods );
-
-        return generated;
-    }
-
-    private static class FrameworkMethodComparator
-        implements Comparator<FrameworkMethod>
-    {
-        public int compare( FrameworkMethod frameworkMethod, FrameworkMethod frameworkMethod1 )
-        {
-            return frameworkMethod.getName().compareTo( frameworkMethod1.getName() );
-        }
-    }
-
-}
diff --git a/pom.xml b/pom.xml
index 7fc1ee41ddbb2ce26ae3cfd28596c99648aa20fb..8ecff37fa2782575d88e440372c16e3d4c1a1af4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,6 @@
   <url>http://archiva.apache.org</url>
 
   <modules>
-    <module>archiva-testutil</module>
     <module>archiva-cli</module>
     <module>archiva-modules</module>
     <module>archiva-docs</module>