You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2011/07/05 12:42:03 UTC

svn commit: r1142971 - in /cocoon/cocoon3/trunk/cocoon-optional: ./ src/main/java/org/apache/cocoon/generation/ src/main/java/org/apache/cocoon/optional/pipeline/components/sax/directory/ src/main/resources/META-INF/cocoon/spring-optional/ src/test/jav...

Author: reinhard
Date: Tue Jul  5 10:42:03 2011
New Revision: 1142971

URL: http://svn.apache.org/viewvc?rev=1142971&view=rev
Log:
move directory generator into a package with a more specific name (we should avoid having package names that are not unique across modules)
remove the RAT plugin and add license information to all test resources (the current test resources for the directory generator wouldn't need a license file but maybe that's different for other test resources in the future)

Added:
    cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/directory/
      - copied from r1142595, cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/generation/
    cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGenerator.java
      - copied, changed from r1142601, cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java
    cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/directory/
      - copied from r1142595, cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/generation/
    cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/
      - copied from r1142595, cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/generation/
Removed:
    cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java
    cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/generation/
    cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/generation/
Modified:
    cocoon/cocoon3/trunk/cocoon-optional/pom.xml
    cocoon/cocoon3/trunk/cocoon-optional/src/main/resources/META-INF/cocoon/spring-optional/cocoon-optional-generators.xml
    cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGeneratorTestCase.java
    cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.txt
    cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.xml
    cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test2.txt

Modified: cocoon/cocoon3/trunk/cocoon-optional/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/pom.xml?rev=1142971&r1=1142970&r2=1142971&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/pom.xml (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/pom.xml Tue Jul  5 10:42:03 2011
@@ -145,18 +145,4 @@
       <artifactId>slf4j-nop</artifactId>
     </dependency>
   </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rat-maven-plugin</artifactId>
-        <configuration>
-          <excludes>
-            <exclude>src/test/resources/**/test*.*</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>

Copied: cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGenerator.java (from r1142601, cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java)
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGenerator.java?p2=cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGenerator.java&p1=cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java&r1=1142601&r2=1142971&rev=1142971&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGenerator.java Tue Jul  5 10:42:03 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.generation;
+package org.apache.cocoon.optional.pipeline.components.sax.directory;
 
 import java.io.File;
 import java.net.URL;
@@ -42,8 +42,7 @@ import org.apache.regexp.RESyntaxExcepti
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
 
-public class DirectoryGenerator extends AbstractSAXGenerator
-implements CachingPipelineComponent {
+public class DirectoryGenerator extends AbstractSAXGenerator implements CachingPipelineComponent {
 
     private static final Log LOG = LogFactory.getLog(DirectoryGenerator.class);
 

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/main/resources/META-INF/cocoon/spring-optional/cocoon-optional-generators.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/main/resources/META-INF/cocoon/spring-optional/cocoon-optional-generators.xml?rev=1142971&r1=1142970&r2=1142971&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/main/resources/META-INF/cocoon/spring-optional/cocoon-optional-generators.xml (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/main/resources/META-INF/cocoon/spring-optional/cocoon-optional-generators.xml Tue Jul  5 10:42:03 2011
@@ -21,6 +21,6 @@
 <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-2.5.xsd">
 
-  <bean name="generator:dir" class="org.apache.cocoon.generation.DirectoryGenerator" scope="prototype" />
-  
+  <bean name="generator:dir" class="org.apache.cocoon.optional.pipeline.components.sax.directory.DirectoryGenerator" scope="prototype" />
+
 </beans>

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGeneratorTestCase.java?rev=1142971&r1=1142595&r2=1142971&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGeneratorTestCase.java (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/directory/DirectoryGeneratorTestCase.java Tue Jul  5 10:42:03 2011
@@ -14,12 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.generation;
+package org.apache.cocoon.optional.pipeline.components.sax.directory;
 
 import static org.custommonkey.xmlunit.XMLAssert.assertNodeTestPasses;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.net.URL;
 
 import org.apache.cocoon.pipeline.NonCachingPipeline;
 import org.apache.cocoon.pipeline.Pipeline;
@@ -34,7 +35,8 @@ public final class DirectoryGeneratorTes
     @Test
     public void testPipelineWithDirectoryGGenerator() throws Exception {
         Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
-        pipeline.addComponent(new DirectoryGenerator((new File(this.getClass().getResource("test.txt").getFile())).getParentFile()));
+        URL testResource = this.getClass().getResource("test.txt");
+        pipeline.addComponent(new DirectoryGenerator((new File(testResource.toURI())).getParentFile()));
         pipeline.addComponent(new XMLSerializer());
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.txt
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.txt?rev=1142971&r1=1142595&r2=1142971&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.txt (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.txt Tue Jul  5 10:42:03 2011
@@ -1 +1,17 @@
+/*
+ * 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.
+ */
 test
\ No newline at end of file

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.xml?rev=1142971&r1=1142595&r2=1142971&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.xml (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test.xml Tue Jul  5 10:42:03 2011
@@ -1,2 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+ -->
 <test/>
\ No newline at end of file

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test2.txt
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test2.txt?rev=1142971&r1=1142595&r2=1142971&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test2.txt (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/resources/org/apache/cocoon/optional/pipeline/components/sax/directory/test2.txt Tue Jul  5 10:42:03 2011
@@ -1 +1,17 @@
+/*
+ * 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.
+ */
 test
\ No newline at end of file