You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gk...@apache.org on 2007/08/18 19:24:30 UTC
svn commit: r567300 - in /cocoon/trunk: ./ blocks/ blocks/cocoon-welcome/
blocks/cocoon-welcome/src/ blocks/cocoon-welcome/src/main/
blocks/cocoon-welcome/src/main/resources/
blocks/cocoon-welcome/src/main/resources/COB-INF/
blocks/cocoon-welcome/src/m...
Author: gkossakowski
Date: Sat Aug 18 10:24:27 2007
New Revision: 567300
URL: http://svn.apache.org/viewvc?view=rev&rev=567300
Log:
COCOON-2120:
* Move welcome page and samples handling from cocoon-webapp to cocoon-welcome module.
* Configure Cocoon blocks dispatcher (ServletDispatcher) to handle all requests. It's not experimental anymore.
Added:
cocoon/trunk/blocks/cocoon-welcome/ (with props)
cocoon/trunk/blocks/cocoon-welcome/pom.xml (with props)
cocoon/trunk/blocks/cocoon-welcome/rcl.properties (with props)
cocoon/trunk/blocks/cocoon-welcome/src/
cocoon/trunk/blocks/cocoon-welcome/src/main/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/not-found.xml
- copied unchanged from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/not-found.xml
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/README.txt (with props)
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/icons/
- copied from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/icons/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/images/
- copied from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/images/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/logos/
- copied from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/logos/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/scripts/
- copied from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/scripts/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/styles/
- copied from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/styles/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/internal/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/internal/README.txt (with props)
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/
- copied from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/samples/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/sitemap.xmap
- copied, changed from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/stylesheets/
- copied from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/stylesheets/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/welcome.xml
- copied unchanged from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xml
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/welcome.xslt
- copied unchanged from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xslt
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/spring/
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/spring/servlet-service.xml (with props)
Removed:
cocoon/trunk/core/cocoon-webapp/src/main/webapp/not-found.xml
cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/icons/
cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/images/
cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/logos/
cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/scripts/
cocoon/trunk/core/cocoon-webapp/src/main/webapp/resources/styles/
cocoon/trunk/core/cocoon-webapp/src/main/webapp/samples/
cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap
cocoon/trunk/core/cocoon-webapp/src/main/webapp/stylesheets/
cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xml
cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xslt
Modified:
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/group2samples.xsl
cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/sitemap.xmap
cocoon/trunk/blocks/pom.xml
cocoon/trunk/core/cocoon-webapp/pom.xml
cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/web.xml
cocoon/trunk/pom.xml
Propchange: cocoon/trunk/blocks/cocoon-welcome/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Aug 18 10:24:27 2007
@@ -0,0 +1 @@
+target
Added: cocoon/trunk/blocks/cocoon-welcome/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/pom.xml?view=auto&rev=567300
==============================================================================
--- cocoon/trunk/blocks/cocoon-welcome/pom.xml (added)
+++ cocoon/trunk/blocks/cocoon-welcome/pom.xml Sat Aug 18 10:24:27 2007
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <parent>
+ <artifactId>cocoon-blocks-modules</artifactId>
+ <groupId>org.apache.cocoon</groupId>
+ <version>5-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-welcome</artifactId>
+ <name>cocoon-welcome</name>
+ <version>1.0.0-M1-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-maven-plugin</artifactId>
+ <version>1.0.0-M1</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>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-core</artifactId>
+ <version>2.2.0-RC2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-servlet-service-components</artifactId>
+ <version>1.0.0-RC1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-template-impl</artifactId>
+ <version>1.0.0-RC2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-welcome/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-welcome/rcl.properties
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/rcl.properties?view=auto&rev=567300
==============================================================================
--- cocoon/trunk/blocks/cocoon-welcome/rcl.properties (added)
+++ cocoon/trunk/blocks/cocoon-welcome/rcl.properties Sat Aug 18 10:24:27 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.org.cocoon-welcome.block%classes-dir=./target/classes
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-welcome/rcl.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/README.txt
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/README.txt?view=auto&rev=567300
==============================================================================
--- cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/README.txt (added)
+++ cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/README.txt Sat Aug 18 10:24:27 2007
@@ -0,0 +1,7 @@
+This is a dummy file provided to avoid Maven archetype plugin's limitation.
+
+Archetype plugin does not create empty directory structure:
+"At this point one can only specify individual files to be created but not empty directories."
+(http://maven.apache.org/plugins/maven-archetype-plugin/examples/archetype.html)
+
+You can safely remove this file at any time.
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/external/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/internal/README.txt
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/internal/README.txt?view=auto&rev=567300
==============================================================================
--- cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/internal/README.txt (added)
+++ cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/internal/README.txt Sat Aug 18 10:24:27 2007
@@ -0,0 +1,7 @@
+This is a dummy file provided to avoid Maven archetype plugin's limitation.
+
+Archetype plugin does not create empty directory structure:
+"At this point one can only specify individual files to be created but not empty directories."
+(http://maven.apache.org/plugins/maven-archetype-plugin/examples/archetype.html)
+
+You can safely remove this file at any time.
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/resource/internal/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/group2samples.xsl
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/group2samples.xsl?view=diff&rev=567300&r1=566045&r2=567300
==============================================================================
--- cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/group2samples.xsl (original)
+++ cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/group2samples.xsl Sat Aug 18 10:24:27 2007
@@ -40,7 +40,7 @@
</xsl:template>
<xsl:template match="sample">
- <sample href="../blocks/{../../../../@name}/" name="{@name}">
+ <sample href="../{../../../../@name}/" name="{@name}">
<xsl:copy-of select="*|text()"/>
</sample>
</xsl:template>
Modified: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/sitemap.xmap?view=diff&rev=567300&r1=566045&r2=567300
==============================================================================
--- cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/samples/sitemap.xmap Sat Aug 18 10:24:27 2007
@@ -30,7 +30,7 @@
<map:parameter name="xmlFiles" value="\.xsamples$"/>
</map:generate>
<map:transform src="group2samples.xsl"/>
- <map:transform src="context://stylesheets/simple-samples2html.xsl">
+ <map:transform src="../stylesheets/simple-samples2html.xsl">
<map:parameter name="contextPath" value="{request:contextPath}"/>
</map:transform>
<map:serialize type="html"/>
Copied: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/sitemap.xmap (from r566045, cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=567300&p1=cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap&r1=566045&p2=cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/sitemap.xmap&r2=567300
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-welcome/src/main/resources/COB-INF/sitemap.xmap Sat Aug 18 10:24:27 2007
@@ -177,22 +177,22 @@
<!-- images -->
<map:match pattern="images/*.gif">
- <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
+ <map:read src="resource/external/images/{1}.gif" mime-type="image/gif"/>
</map:match>
<!-- CSS stylesheets -->
<map:match pattern="styles/*.css">
- <map:read src="resources/styles/{1}.css" mime-type="text/css"/>
+ <map:read src="resource/external/styles/{1}.css" mime-type="text/css"/>
</map:match>
<!-- JavaScript scripts -->
<map:match pattern="scripts/*.js">
- <map:read src="resources/scripts/{1}.js" mime-type="text/javascript"/>
+ <map:read src="resource/external/scripts/{1}.js" mime-type="text/javascript"/>
</map:match>
<!-- favicon -->
<map:match pattern="**favicon.ico">
- <map:read mime-type="image/x-icon" src="resources/icons/cocoon.ico"/>
+ <map:read mime-type="image/x-icon" src="resource/external/icons/cocoon.ico"/>
</map:match>
<!--+
@@ -280,7 +280,12 @@
</map:otherwise>
</map:select>
</map:match>
-
+
+
+ <!-- FIXME: It's a simple work-around -->
+ <map:match pattern="blocks/**">
+ <map:redirect-to uri="{1}/" global="true"/>
+ </map:match>
<!--+
| Mount everything else by calling the sitemap.xmap file located
| in the requested folder.
Added: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/spring/servlet-service.xml?view=auto&rev=567300
==============================================================================
--- cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/spring/servlet-service.xml (added)
+++ cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/spring/servlet-service.xml Sat Aug 18 10:24:27 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.org.cocoon-welcome.block" class="org.apache.cocoon.sitemap.SitemapServlet">
+ <servlet:context mount-path="/" context-path="blockcontext:/cocoon-welcome/"/>
+ </bean>
+
+</beans>
Propchange: cocoon/trunk/blocks/cocoon-welcome/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/blocks/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/pom.xml?view=diff&rev=567300&r1=567299&r2=567300
==============================================================================
--- cocoon/trunk/blocks/pom.xml (original)
+++ cocoon/trunk/blocks/pom.xml Sat Aug 18 10:24:27 2007
@@ -106,6 +106,7 @@
<module>cocoon-samples-style/cocoon-samples-style-default</module>
<module>cocoon-batik/cocoon-batik-impl</module>
<module>cocoon-batik/cocoon-batik-sample</module>
+ <module>cocoon-welcome</module>
</modules>
<profiles>
@@ -193,4 +194,4 @@
<url>https://svn.apache.org/repos/asf/cocoon/tags/cocoon-2/cocoon-blocks-modules</url>
</scm>
-</project>
+</project>
\ No newline at end of file
Modified: cocoon/trunk/core/cocoon-webapp/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-webapp/pom.xml?view=diff&rev=567300&r1=567299&r2=567300
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/pom.xml (original)
+++ cocoon/trunk/core/cocoon-webapp/pom.xml Sat Aug 18 10:24:27 2007
@@ -93,6 +93,11 @@
<dependency>
<groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-welcome</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-servlet-service-sample</artifactId>
</dependency>
</dependencies>
Modified: cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/web.xml?view=diff&rev=567300&r1=567299&r2=567300
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/web.xml Sat Aug 18 10:24:27 2007
@@ -144,7 +144,7 @@
to change this parameter.
-->
<servlet-mapping>
- <servlet-name>Cocoon</servlet-name>
+ <servlet-name>DispatcherServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
@@ -163,14 +163,6 @@
<servlet-mapping>
<servlet-name>Cocoon</servlet-name>
<url-pattern>*.html</url-pattern>
- </servlet-mapping>
-
- <!--
- Mount the experimental blocks dispatcher.
- -->
- <servlet-mapping>
- <servlet-name>DispatcherServlet</servlet-name>
- <url-pattern>/blocks/*</url-pattern>
</servlet-mapping>
<!-- various MIME type mappings ====================================== -->
Modified: cocoon/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/pom.xml?view=diff&rev=567300&r1=567299&r2=567300
==============================================================================
--- cocoon/trunk/pom.xml (original)
+++ cocoon/trunk/pom.xml Sat Aug 18 10:24:27 2007
@@ -2907,6 +2907,11 @@
</dependency>
<dependency>
<groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-welcome</artifactId>
+ <version>1.0.0-M1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-xml-api</artifactId>
<version>1.0.0-RC2-SNAPSHOT</version>
</dependency>