Author: thorsten
Date: Mon Nov 5 03:22:14 2007
New Revision: 591961
URL: http://svn.apache.org/viewvc?rev=591961&view=rev
Log:
Port of the properties-generator aka ModuleGenerator to a cocoon2.2 block
Added:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/pom.xml
(with props)
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/rcl.properties
(with props)
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/generation/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/generation/ModuleGenerator.java
- copied, changed from r590635,
forrest/trunk/plugins/org.apache.forrest.plugin.output.inputModule/src/java/org/apache/forrest/generation/ModuleGenerator.java
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/COB-INF/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/COB-INF/sitemap.xmap
(with props)
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/properties-generator-context.xml
(with props)
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
(with props)
Added: forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/pom.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/pom.xml?rev=591961&view=auto
==============================================================================
--- forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/pom.xml
(added)
+++ forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/pom.xml Mon
Nov 5 03:22:14 2007
@@ -0,0 +1,102 @@
+<?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.
+-->
+<!--+
+ | @version $Id: pom.xml 540441 2007-05-22 06:18:44Z reinhard $
+ +-->
+<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>
+ <packaging>jar</packaging>
+
+ <name>propertiesGenerator</name>
+ <groupId>org.apache.forrest</groupId>
+ <artifactId>propertiesGenerator</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-core</artifactId>
+ <version>2.2.0-RC3-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-servlet-service-components</artifactId>
+ <version>1.0.0-RC2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-maven-plugin</artifactId>
+ <version>1.0.0-RC1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>rcl</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>rcl</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.3</version>
+ <configuration>
+ <connectors>
+ <connector
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8888</port>
+ <maxIdleTime>30000</maxIdleTime>
+ </connector>
+ </connectors>
+
<webAppSourceDirectory>${project.build.directory}/rcl/webapp</webAppSourceDirectory>
+ <contextPath>/</contextPath>
+ <systemProperties>
+ <systemProperty>
+ <name>org.apache.cocoon.mode</name>
+ <value>dev</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Propchange:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/rcl.properties
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/rcl.properties?rev=591961&view=auto
==============================================================================
---
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/rcl.properties
(added)
+++
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/rcl.properties
Mon Nov 5 03:22:14 2007
@@ -0,0 +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.
+#
+org.apache.forrest.propertiesGenerator.block%classes-dir=./target/classes
\ No newline at end of file
Propchange:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/rcl.properties
------------------------------------------------------------------------------
svn:eol-style = native
Copied:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/generation/ModuleGenerator.java
(from r590635,
forrest/trunk/plugins/org.apache.forrest.plugin.output.inputModule/src/java/org/apache/forrest/generation/ModuleGenerator.java)
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/generation/ModuleGenerator.java?p2=forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/generation/ModuleGenerator.java&p1=forrest/trunk/plugins/org.apache.forrest.plugin.output.inputModule/src/java/org/apache/forrest/generation/ModuleGenerator.java&r1=590635&r2=591961&rev=591961&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.output.inputModule/src/java/org/apache/forrest/generation/ModuleGenerator.java
(original)
+++
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/generation/ModuleGenerator.java
Mon Nov 5 03:22:14 2007
@@ -1,19 +1,19 @@
/*
- * 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.
- */
+* 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.
+*/
package org.apache.forrest.generation;
import java.io.IOException;
@@ -27,7 +27,6 @@
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.components.modules.input.InputModule;
@@ -38,8 +37,7 @@
import org.apache.excalibur.source.impl.validity.NOPValidity;
import org.xml.sax.SAXException;
-public class ModuleGenerator extends AbstractGenerator implements Serviceable,
- CacheableProcessingComponent {
+public class ModuleGenerator extends AbstractGenerator implements
CacheableProcessingComponent {
private ServiceSelector selector;
private Iterator iterator;
@@ -131,7 +129,7 @@
}
}
- public void service(ServiceManager manager) throws ServiceException {
+ public void setManager(ServiceManager manager) throws ServiceException {
this.selector = (ServiceSelector) manager.lookup(InputModule.ROLE
+ "Selector");
}
Added:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/COB-INF/sitemap.xmap
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/COB-INF/sitemap.xmap?rev=591961&view=auto
==============================================================================
---
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/COB-INF/sitemap.xmap
(added)
+++
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/COB-INF/sitemap.xmap
Mon Nov 5 03:22:14 2007
@@ -0,0 +1,33 @@
+<?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.
+-->
+<map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0
http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
+ xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:pipelines>
+ <map:pipeline>
+ <map:match pattern="module.*.properties">
+ <map:generate type="module">
+ <map:parameter name="input-module" value="{1}"/>
+ </map:generate>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+
+</map:sitemap>
\ No newline at end of file
Propchange:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Added:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/properties-generator-context.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/properties-generator-context.xml?rev=591961&view=auto
==============================================================================
---
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/properties-generator-context.xml
(added)
+++
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/properties-generator-context.xml
Mon Nov 5 03:22:14 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
+ "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
+<!--
+ 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>
+ <bean id="dispatcher"
+ name="org.apache.cocoon.generation.Generator/module"
+ class="org.apache.forrest.generation.ModuleGenerator">
+ <property name="manager"
ref="org.apache.avalon.framework.service.ServiceManager"/>
+ </bean>
+</beans>
Propchange:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/properties-generator-context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/servlet-service.xml?rev=591961&view=auto
==============================================================================
---
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
(added)
+++
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
Mon Nov 5 03:22:14 2007
@@ -0,0 +1,33 @@
+<?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
+ und
+-->
+<!--+
+ | @version $Id: servlet-service.xml 523714 2007-03-29 13:54:20Z
gkossakowski $
+ +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cocoon.apache.org/schema/servlet
http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+ <bean id="org.apache.forrest.propertiesGenerator.block"
class="org.apache.cocoon.sitemap.SitemapServlet">
+ <servlet:context mount-path="/propertiesGenerator"
context-path="blockcontext:/propertiesGenerator/"/>
+ </bean>
+
+</beans>
Propchange:
forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
------------------------------------------------------------------------------
svn:eol-style = native