You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by da...@apache.org on 2007/08/19 17:04:02 UTC

svn commit: r567412 [1/2] - in /cocoon/whiteboard/osgi: ./ blocks/ cocoon-osgi-main/ cocoon-osgi-main/src/ cocoon-osgi-main/src/main/ cocoon-osgi-main/src/main/resources/ commons/ commons/avalon-framework/ commons/excalibur-sourceresolve/ core/ core/co...

Author: danielf
Date: Sun Aug 19 08:03:59 2007
New Revision: 567412

URL: http://svn.apache.org/viewvc?view=rev&rev=567412
Log:
Initial version of Cocoon OSGi containing
* bundle wrappers for Avalon framework and Excalibur sourceresolve
* bundle wrappers and Spring-OSGi configurations for cocoon-servlet-service-impl
* two simple servlet service test bundles based on demo servlets from cocoon-servlet-service-sample
* OSGi URL service for the servlet service protocol
* activator that corresponds to the DispatcherServlet, but uses the OSGi http service instead
* assembly module that creates a directory structure with all jars and configuration files needed to run the framework
Only parts of the servlet service framework works this far. No inter servlet service communication yet

Added:
    cocoon/whiteboard/osgi/
    cocoon/whiteboard/osgi/README.txt   (with props)
    cocoon/whiteboard/osgi/blocks/
    cocoon/whiteboard/osgi/cocoon-osgi-main/
    cocoon/whiteboard/osgi/cocoon-osgi-main/assembly.xml   (with props)
    cocoon/whiteboard/osgi/cocoon-osgi-main/pom.xml   (with props)
    cocoon/whiteboard/osgi/cocoon-osgi-main/src/
    cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/
    cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/
    cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/config.properties   (with props)
    cocoon/whiteboard/osgi/commons/
    cocoon/whiteboard/osgi/commons/avalon-framework/
    cocoon/whiteboard/osgi/commons/avalon-framework/pom.xml   (with props)
    cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/
    cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/pom.xml   (with props)
    cocoon/whiteboard/osgi/core/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/pom.xml   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/DemoServlet.java   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/servlet-service-demo1.xml   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/pom.xml   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/DemoServlet.java   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/servlet-service-demo2.xml   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/pom.xml   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/Activator.java   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletConnection.java   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletProtocol.java   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-listener.xml   (with props)
    cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-protocol.xml   (with props)
    cocoon/whiteboard/osgi/pom.xml   (with props)

Added: cocoon/whiteboard/osgi/README.txt
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/README.txt?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/README.txt (added)
+++ cocoon/whiteboard/osgi/README.txt Sun Aug 19 08:03:59 2007
@@ -0,0 +1,97 @@
+Cocoon OSGi
+===========
+
+
+Status
+------
+
+This far only parts of the servlet service framework works under OSGi.
+
+Installation
+-----------
+
+* Checkout and build Cocoon trunk.
+
+* Download
+    javax.servlet-2.4.0.jar,
+    javax.servlet.jsp-2.0.0.jar,
+    org.apache.commons.logging-1.0.4.jar,
+    org.eclipse.equinox.http.jetty-1.0.0.jar,
+    org.eclipse.equinox.http.servlet-1.0.0.jar,
+    org.mortbay.jetty-5.1.11.jar
+  from Eclipse Equinox
+  http://download.eclipse.org/eclipse/equinox/drops/R-3.3-200706251500/index.php.
+  Install them in your local Maven repository with the commands that
+  Maven describe, when the builds fail. I haven't found the artifacts
+  in any repository.
+
+* Build:
+  $ mvn clean install
+
+* Create the Cocoon OSGi run time environment:
+  $ cd cocoon-osgi-main
+  $ mvn clean assembly:directory
+
+Run
+---
+
+* Start the framework
+  $ cd target/cocoon-osgi-main-main
+  $ java -jar bin/felix.jar
+
+If everything goes right you should get the message "Welcome to
+Felix." and a number of log messages about started services. Write
+"help" in the Felix console window to see what commands there are. "ps"
+is used for listing the bundles. All bundles should be in active
+state.
+
+* The cocoon-* bundles needs to be updated manually to be started. The
+  spring-osgi-extender is supposed to recognize them automatically but
+  don't. Probably it should be started at a lower start level than the
+  cocoon bundles. Find the cocoon bundle number with
+
+  -> ps
+
+  and update them manually, e.g.
+
+  -> update 2
+  -> update 3
+  -> update 4
+
+* Check that the demo servlet service bundles provides servlet
+  services with
+
+  -> services
+
+  and use services with
+
+  -> services -u
+
+  more detailed info about the services from a bundle can be gotten by
+  using the "services" command with the bundle number as argument.
+
+* Point your browser to the servlet services:
+
+  http://localhost:8080/test2
+
+  and
+
+  http://localhost:8080/test1/test1
+
+  The first gives the text "Demo2" and the second "Demo1.1 null". The
+  rest of the URIs served by the demo1 servlet service doesn't work
+  yet.
+
+* Stop the frame work with
+
+  -> shutdown
+
+Observe that the felix framework persists it state in a cache
+directory named ".felix" that is created in the current directory. If
+you start Felix again it will use the bundles from the cache rather
+than the bundles from the bundle directory. To update to the current
+version the update command must be given for the bundle number in the
+console.
+
+Remove the .felix directory to make sure that you have a clean state.
+ 

Propchange: cocoon/whiteboard/osgi/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/osgi/cocoon-osgi-main/assembly.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/cocoon-osgi-main/assembly.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/cocoon-osgi-main/assembly.xml (added)
+++ cocoon/whiteboard/osgi/cocoon-osgi-main/assembly.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,56 @@
+<?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.
+-->
+
+<assembly>
+  <id>main</id>
+
+  <formats>
+    <format>dir</format>
+  </formats>
+
+  <includeBaseDirectory>false</includeBaseDirectory>
+
+  <files>
+    <file>
+      <source>src/main/resources/config.properties</source>
+      <outputDirectory>conf</outputDirectory>
+    </file>
+  </files>
+
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>bin</outputDirectory>
+      <!-- It seem like Felix only starts correctly when the jar is named felix.jar -->
+      <outputFileNameMapping>felix.jar</outputFileNameMapping>
+      <includes>
+        <include>org.apache.felix:org.apache.felix.main</include>
+      </includes>
+    </dependencySet>
+
+    <dependencySet>
+      <outputDirectory>bundle</outputDirectory>
+      <excludes>
+        <exclude>org.apache.felix:org.apache.felix.main</exclude>
+        <exclude>org.apache.cocoon:cocoon-osgi-main</exclude>
+      </excludes>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>

Propchange: cocoon/whiteboard/osgi/cocoon-osgi-main/assembly.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/cocoon-osgi-main/assembly.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/cocoon-osgi-main/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/cocoon-osgi-main/pom.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/cocoon-osgi-main/pom.xml (added)
+++ cocoon/whiteboard/osgi/cocoon-osgi-main/pom.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,314 @@
+<?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$
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.cocoon</groupId>
+    <artifactId>cocoon-osgi-modules</artifactId>
+    <version>1-SNAPSHOT</version>
+  </parent>
+  <artifactId>cocoon-osgi-main</artifactId>
+  <name>Cocoon OSGi Main</name>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <descriptor>assembly.xml</descriptor>
+        </configuration>
+      </plugin>
+    </plugins>
+    <finalName>cocoon-osgi-main</finalName>
+  </build>
+
+  <dependencies>
+
+    <!-- main -->
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.main</artifactId>
+      <version>1.0.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+      <version>0.9.0-20070713.230317-1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>javax.servlet</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.foundation</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <!-- bundles -->
+
+    <!-- Felix Commons -->
+    <dependency>
+      <groupId>org.apache.felix.commons</groupId>
+      <artifactId>org.apache.felix.commons.aopalliance</artifactId>
+      <version>1.0.0-0001-20070316.210408-1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>aopalliance</groupId>
+          <artifactId>aopalliance</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.felix.commons</groupId>
+      <artifactId>org.apache.felix.commons.avalon-framework</artifactId>
+      <version>4.3.1-0001-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.felix.commons</groupId>
+      <artifactId>org.apache.felix.commons.commons-collections</artifactId>
+      <version>3.2.0-0001-20070316.210408-1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-collections</groupId>
+          <artifactId>commons-collections</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <!-- Depends on more than it should e.g.logkit
+    <dependency>
+      <groupId>org.apache.felix.commons</groupId>
+      <artifactId>org.apache.felix.commons.commons-logging</artifactId>
+      <version>1.1.0-0001-SNAPSHOT</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    -->
+
+    <dependency>
+      <groupId>org.apache.felix.commons</groupId>
+      <artifactId>org.apache.felix.commons.excalibur-sourceresolve</artifactId>
+      <version>2.2.3-0001-SNAPSHOT</version>
+    </dependency>
+
+    <!-- Depends on more than it should e.g.javax.mail
+    <dependency>
+      <groupId>org.apache.felix.commons</groupId>
+      <artifactId>org.apache.felix.commons.log4j</artifactId>
+      <version>1.2.12-0001-SNAPSHOT</version>
+      <exclusions>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    -->
+
+    <!-- Needs 2.4
+    <dependency>
+      <groupId>org.apache.felix.commons</groupId>
+      <artifactId>org.apache.felix.commons.servlet-api</artifactId>
+      <version>2.3.0-0001-SNAPSHOT</version>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    -->
+
+    <!-- Spring -->
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-aop</artifactId>
+      <version>2.0.5-osgi-m2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-beans</artifactId>
+      <version>2.0.5-osgi-m2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>2.0.5-osgi-m2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-core</artifactId>
+      <version>2.0.5-osgi-m2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-web</artifactId>
+      <version>2.0.5-osgi-m2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-core</artifactId>
+      <version>1.0-m2</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.aopalliance</groupId>
+          <artifactId>aopalliance</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-extender</artifactId>
+      <version>1.0-m2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-io</artifactId>
+      <version>1.0-m2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>backport-util-concurrent</artifactId>
+      <!-- Would be better with -SNAPSHOT, but we need to know the jar name in config.properties -->
+      <version>3.0-20070801.084708-154</version>
+    </dependency>
+    <!-- Package version numbers doesn't work with the Jetty bundle
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>commons-logging.osgi</artifactId>
+      <version>1.1-20070508.010416-230</version>
+    </dependency>
+    -->
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>log4j.osgi</artifactId>
+      <!-- Would be better with -SNAPSHOT, but we need to know the jar name in config.properties -->
+      <version>1.2.13-20070801.084708-251</version>
+    </dependency>
+
+    <!-- Equinox (These has to be downloaded manually from http://download.eclipse.org/eclipse/equinox/) -->
+    <!-- The Felix http service doesn't support Servlet 2.4 -->
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>javax.servlet</artifactId>
+      <version>2.4.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>javax.servlet.jsp</artifactId>
+      <version>2.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>org.apache.commons.logging</artifactId>
+      <version>1.0.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>org.eclipse.equinox.http.jetty</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>org.eclipse.equinox.http.servlet</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>org.mortbay.jetty</artifactId>
+      <version>5.1.11</version>
+    </dependency>
+
+    <!-- Cocoon -->
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-servlet-service-impl-osgi</artifactId>
+      <version>1.0.0-RC1-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-servlet-service-demo1-osgi</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-servlet-service-demo2-osgi</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+  <repositories>
+    <repository>
+      <id>spring-ext</id>
+      <name>Spring External Dependencies Repository</name>
+      <url>
+        http://static.springframework.org/maven2
+      </url>
+    </repository>
+    <repository>
+      <snapshots>
+         <enabled>true</enabled>
+      </snapshots>
+      <id>spring-ext-snapshot</id>
+      <name>Spring External Dependencies Repository</name>
+      <url>
+        http://static.springframework.org/maven2-snapshots
+      </url>
+    </repository>
+    <repository>
+      <snapshots>
+         <enabled>true</enabled>
+      </snapshots>
+      <id>apache-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>
+        http://people.apache.org/maven-snapshot-repository
+      </url>
+    </repository>
+  </repositories>
+
+</project>

Propchange: cocoon/whiteboard/osgi/cocoon-osgi-main/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/cocoon-osgi-main/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/config.properties
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/config.properties?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/config.properties (added)
+++ cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/config.properties Sun Aug 19 08:03:59 2007
@@ -0,0 +1,338 @@
+# 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.
+
+#
+# Framework config properties.
+#
+org.osgi.framework.system.packages=org.osgi.framework; version=1.3.0, \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.0.0, \
+ org.osgi.service.url; version=1.0.0, \
+ ${jre-${java.specification.version}}
+
+#org.osgi.framework.bootdelegation=sun.*,com.sun.*
+#Put the bundle cache in the current dir, so that it is easier to delete
+felix.cache.dir=.felix
+felix.cache.profile=cocoon
+felix.auto.start.1= \
+ file:bundle/backport-util-concurrent-3.0-20070801.084708-154.jar \
+ file:bundle/cocoon-servlet-service-demo1-osgi-1.0.0-SNAPSHOT.jar \
+ file:bundle/cocoon-servlet-service-demo2-osgi-1.0.0-SNAPSHOT.jar \
+ file:bundle/cocoon-servlet-service-impl-osgi-1.0.0-RC1-SNAPSHOT.jar \
+ file:bundle/javax.servlet-2.4.0.jar \
+ file:bundle/javax.servlet.jsp-2.0.0.jar \
+ file:bundle/log4j.osgi-1.2.13-20070801.084708-251.jar \
+ file:bundle/org.apache.commons.logging-1.0.4.jar \
+ file:bundle/org.apache.felix.bundlerepository-1.0.0.jar \
+ file:bundle/org.apache.felix.commons.aopalliance-1.0.0-0001-20070316.210408-1.jar \
+ file:bundle/org.apache.felix.commons.avalon-framework-4.3.1-0001-SNAPSHOT.jar \
+ file:bundle/org.apache.felix.commons.commons-collections-3.2.0-0001-20070316.210408-1.jar \
+ file:bundle/org.apache.felix.commons.excalibur-sourceresolve-2.2.3-0001-SNAPSHOT.jar \
+ file:bundle/org.apache.felix.shell-1.0.0.jar \
+ file:bundle/org.apache.felix.shell.tui-1.0.0.jar \
+ file:bundle/org.eclipse.equinox.http.jetty-1.0.0.jar \
+ file:bundle/org.eclipse.equinox.http.servlet-1.0.0.jar \
+ file:bundle/org.mortbay.jetty-5.1.11.jar \
+ file:bundle/org.osgi.compendium-0.9.0-20070713.230317-1.jar \
+ file:bundle/spring-aop-2.0.5-osgi-m2.jar \
+ file:bundle/spring-beans-2.0.5-osgi-m2.jar \
+ file:bundle/spring-context-2.0.5-osgi-m2.jar \
+ file:bundle/spring-core-2.0.5-osgi-m2.jar \
+ file:bundle/spring-osgi-core-1.0-m2.jar \
+ file:bundle/spring-osgi-extender-1.0-m2.jar \
+ file:bundle/spring-osgi-io-1.0-m2.jar \
+ file:bundle/spring-web-2.0.5-osgi-m2.jar
+felix.startlevel.framework=1
+felix.startlevel.bundle=1
+#framework.service.urlhandlers=false
+
+#
+# Bundle config properties.
+#
+org.osgi.service.http.port=8080
+obr.shell.telnet=on
+#obr.repository.url=http://bundles.osgi.org/obr/browse?_xml=1&cmd=repository
+
+
+#
+# Java platform package export properties.
+#
+jre-1.3= \
+ javax.accessibility; \
+ javax.accessibility.resources; \
+ javax.naming; \
+ javax.naming.directory; \
+ javax.naming.event; \
+ javax.naming.ldap; \
+ javax.naming.spi; \
+ javax.rmi; \
+ javax.rmi.CORBA; \
+ javax.sound.midi; \
+ javax.sound.midi.spi; \
+ javax.sound.sampled; \
+ javax.sound.sampled.spi; \
+ javax.swing; \
+ javax.swing.border; \
+ javax.swing.colorchooser; \
+ javax.swing.event; \
+ javax.swing.filechooser; \
+ javax.swing.plaf; \
+ javax.swing.plaf.basic; \
+ javax.swing.plaf.basic.resources; \
+ javax.swing.plaf.metal; \
+ javax.swing.plaf.metal.resources; \
+ javax.swing.plaf.multi; \
+ javax.swing.table; \
+ javax.swing.text; \
+ javax.swing.text.html; \
+ javax.swing.text.html.parser; \
+ javax.swing.text.rtf; \
+ javax.swing.tree; \
+ javax.swing.undo; \
+ javax.transaction; \
+ org.omg.CORBA; \
+ org.omg.CORBA_2_3; \
+ org.omg.CORBA_2_3.portable; \
+ org.omg.CORBA.DynAnyPackage; \
+ org.omg.CORBA.ORBPackage; \
+ org.omg.CORBA.portable; \
+ org.omg.CORBA.TypeCodePackage; \
+ org.omg.CosNaming; \
+ org.omg.CosNaming.NamingContextPackage; \
+ org.omg.SendingContext; \
+ org.omg.stub.java.rmi; \
+ version="1.3.0"
+
+# Added javax.net.ssl and javax.security.cert as Jetty 5 needs it
+jre-1.4= \
+ javax.accessibility; \
+ javax.imageio; \
+ javax.imageio.event; \
+ javax.imageio.metadata; \
+ javax.imageio.plugins.jpeg; \
+ javax.imageio.spi; \
+ javax.imageio.stream; \
+ javax.naming; \
+ javax.naming.directory; \
+ javax.naming.event; \
+ javax.naming.ldap; \
+ javax.naming.spi; \
+ javax.print; \
+ javax.print.attribute; \
+ javax.print.attribute.standard; \
+ javax.print.event; \
+ javax.rmi; \
+ javax.rmi.CORBA; \
+ javax.security.auth; \
+ javax.security.auth.callback; \
+ javax.security.auth.kerberos; \
+ javax.security.auth.login; \
+ javax.security.auth.spi; \
+ javax.security.auth.x500; \
+ javax.sound.midi; \
+ javax.sound.midi.spi; \
+ javax.sound.sampled; \
+ javax.sound.sampled.spi; \
+ javax.sql; \
+ javax.swing; \
+ javax.swing.border; \
+ javax.swing.colorchooser; \
+ javax.swing.event; \
+ javax.swing.filechooser; \
+ javax.swing.plaf; \
+ javax.swing.plaf.basic; \
+ javax.swing.plaf.metal; \
+ javax.swing.plaf.multi; \
+ javax.swing.table; \
+ javax.swing.text; \
+ javax.swing.text.html; \
+ javax.swing.text.html.parser; \
+ javax.swing.text.rtf; \
+ javax.swing.tree; \
+ javax.swing.undo; \
+ javax.transaction; \
+ javax.transaction.xa; \
+ javax.xml.parsers; \
+ javax.xml.transform; \
+ javax.xml.transform.dom; \
+ javax.xml.transform.sax; \
+ javax.xml.transform.stream; \
+ org.ietf.jgss; \
+ org.omg.CORBA; \
+ org.omg.CORBA_2_3; \
+ org.omg.CORBA_2_3.portable; \
+ org.omg.CORBA.DynAnyPackage; \
+ org.omg.CORBA.ORBPackage; \
+ org.omg.CORBA.portable; \
+ org.omg.CORBA.TypeCodePackage; \
+ org.omg.CosNaming; \
+ org.omg.CosNaming.NamingContextExtPackage; \
+ org.omg.CosNaming.NamingContextPackage; \
+ org.omg.Dynamic; \
+ org.omg.DynamicAny; \
+ org.omg.DynamicAny.DynAnyFactoryPackage; \
+ org.omg.DynamicAny.DynAnyPackage; \
+ org.omg.IOP; \
+ org.omg.IOP.CodecFactoryPackage; \
+ org.omg.IOP.CodecPackage; \
+ org.omg.Messaging; \
+ org.omg.PortableInterceptor; \
+ org.omg.PortableInterceptor.ORBInitInfoPackage; \
+ org.omg.PortableServer; \
+ org.omg.PortableServer.CurrentPackage; \
+ org.omg.PortableServer.POAManagerPackage; \
+ org.omg.PortableServer.POAPackage; \
+ org.omg.PortableServer.portable; \
+ org.omg.PortableServer.ServantLocatorPackage; \
+ org.omg.SendingContext; \
+ org.omg.stub.java.rmi; \
+ org.w3c.dom; \
+ org.w3c.dom.css; \
+ org.w3c.dom.events; \
+ org.w3c.dom.html; \
+ org.w3c.dom.stylesheets; \
+ org.w3c.dom.traversal; \
+ org.w3c.dom.views; \
+ org.xml.sax; \
+ org.xml.sax.ext; \
+ org.xml.sax.helpers; \
+ javax.net.ssl; \
+ javax.security.cert; \
+ version="1.4.0"
+
+# Added javax.net.ssl and javax.security.cert as Jetty 5 needs it
+jre-1.5= \
+ javax.accessibility; \
+ javax.activity; \
+ javax.imageio; \
+ javax.imageio.event; \
+ javax.imageio.metadata; \
+ javax.imageio.plugins.bmp; \
+ javax.imageio.plugins.jpeg; \
+ javax.imageio.spi; \
+ javax.imageio.stream; \
+ javax.management; \
+ javax.management.loading; \
+ javax.management.modelmbean; \
+ javax.management.monitor; \
+ javax.management.openmbean; \
+ javax.management.relation; \
+ javax.management.remote; \
+ javax.management.remote.rmi; \
+ javax.management.timer; \
+ javax.naming; \
+ javax.naming.directory; \
+ javax.naming.event; \
+ javax.naming.ldap; \
+ javax.naming.spi; \
+ javax.print; \
+ javax.print.attribute; \
+ javax.print.attribute.standard; \
+ javax.print.event; \
+ javax.rmi; \
+ javax.rmi.CORBA; \
+ javax.rmi.ssl; \
+ javax.security.auth; \
+ javax.security.auth.callback; \
+ javax.security.auth.kerberos; \
+ javax.security.auth.login; \
+ javax.security.auth.spi; \
+ javax.security.auth.x500; \
+ javax.security.sasl; \
+ javax.sound.midi; \
+ javax.sound.midi.spi; \
+ javax.sound.sampled; \
+ javax.sound.sampled.spi; \
+ javax.sql; \
+ javax.sql.rowset; \
+ javax.sql.rowset.serial; \
+ javax.sql.rowset.spi; \
+ javax.swing; \
+ javax.swing.border; \
+ javax.swing.colorchooser; \
+ javax.swing.event; \
+ javax.swing.filechooser; \
+ javax.swing.plaf; \
+ javax.swing.plaf.basic; \
+ javax.swing.plaf.metal; \
+ javax.swing.plaf.multi; \
+ javax.swing.plaf.synth; \
+ javax.swing.table; \
+ javax.swing.text; \
+ javax.swing.text.html; \
+ javax.swing.text.html.parser; \
+ javax.swing.text.rtf; \
+ javax.swing.tree; \
+ javax.swing.undo; \
+ javax.transaction; \
+ javax.transaction.xa; \
+ javax.xml; \
+ javax.xml.datatype; \
+ javax.xml.namespace; \
+ javax.xml.parsers; \
+ javax.xml.transform; \
+ javax.xml.transform.dom; \
+ javax.xml.transform.sax; \
+ javax.xml.transform.stream; \
+ javax.xml.validation; \
+ javax.xml.xpath; \
+ org.ietf.jgss; \
+ org.omg.CORBA; \
+ org.omg.CORBA_2_3; \
+ org.omg.CORBA_2_3.portable; \
+ org.omg.CORBA.DynAnyPackage; \
+ org.omg.CORBA.ORBPackage; \
+ org.omg.CORBA.portable; \
+ org.omg.CORBA.TypeCodePackage; \
+ org.omg.CosNaming; \
+ org.omg.CosNaming.NamingContextExtPackage; \
+ org.omg.CosNaming.NamingContextPackage; \
+ org.omg.Dynamic; \
+ org.omg.DynamicAny; \
+ org.omg.DynamicAny.DynAnyFactoryPackage; \
+ org.omg.DynamicAny.DynAnyPackage; \
+ org.omg.IOP; \
+ org.omg.IOP.CodecFactoryPackage; \
+ org.omg.IOP.CodecPackage; \
+ org.omg.Messaging; \
+ org.omg.PortableInterceptor; \
+ org.omg.PortableInterceptor.ORBInitInfoPackage; \
+ org.omg.PortableServer; \
+ org.omg.PortableServer.CurrentPackage; \
+ org.omg.PortableServer.POAManagerPackage; \
+ org.omg.PortableServer.POAPackage; \
+ org.omg.PortableServer.portable; \
+ org.omg.PortableServer.ServantLocatorPackage; \
+ org.omg.SendingContext; \
+ org.omg.stub.java.rmi; \
+ org.omg.stub.javax.management.remote.rmi; \
+ org.w3c.dom; \
+ org.w3c.dom.bootstrap; \
+ org.w3c.dom.css; \
+ org.w3c.dom.events; \
+ org.w3c.dom.html; \
+ org.w3c.dom.ls; \
+ org.w3c.dom.ranges; \
+ org.w3c.dom.stylesheets; \
+ org.w3c.dom.traversal; \
+ org.w3c.dom.views; \
+ org.xml.sax; \
+ org.xml.sax.ext; \
+ org.xml.sax.helpers; \
+ javax.net.ssl; \
+ javax.security.cert; \
+ version="1.5.0"

Propchange: cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/config.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/cocoon-osgi-main/src/main/resources/config.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/commons/avalon-framework/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/commons/avalon-framework/pom.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/commons/avalon-framework/pom.xml (added)
+++ cocoon/whiteboard/osgi/commons/avalon-framework/pom.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,97 @@
+<?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. 
+-->
+<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>
+    <parent>
+        <groupId>org.apache.felix.commons</groupId>
+        <artifactId>build</artifactId>
+        <version>0.9.0-incubator-SNAPSHOT</version>
+    </parent>
+    <properties>
+        <pkgArtifactId>avalon-framework</pkgArtifactId>
+        <pkgVersion>4.3.1</pkgVersion>
+        <pomVersion>0001</pomVersion>
+        <osgiVersion>${pkgVersion}</osgiVersion>
+    </properties>
+    <groupId>org.apache.felix.commons</groupId>
+    <artifactId>${pom.groupId}.${pkgArtifactId}</artifactId>
+    <version>${osgiVersion}-${pomVersion}-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>${pkgArtifactId} bundle</name>
+    <description>
+        This bundle simply wraps ${pkgArtifactId}-api-${pkgVersion}.jar
+        and ${pkgArtifactId}-impl-${pkgVersion}.jar.
+    </description>
+    <organization>
+        <name>Apache Felix Project</name>
+        <url>http://felix.apache.org/</url>
+    </organization>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.avalon.framework</groupId>
+            <artifactId>${pkgArtifactId}-api</artifactId>
+            <version>${pkgVersion}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.framework</groupId>
+            <artifactId>${pkgArtifactId}-impl</artifactId>
+            <version>${pkgVersion}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.0.0</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>
+                            ${pom.artifactId}
+                        </Bundle-SymbolicName>
+                        <Export-Package>!META-INF.maven.org.apache.avalon.framework.avalon-framework-api,!META-INF.maven.org.apache.avalon.framework.avalon-framework-impl,*;version=${pkgVersion}</Export-Package>
+                        <DynamicImport-Package>org.apache.commons.logging,org.apache.log,org.apache.log.format,org.apache.log.util,org.apache.log4j</DynamicImport-Package>
+                        <Include-Resource>
+                            @${pkgArtifactId}-api-${pkgVersion}.jar!/META-INF/LICENSE.txt
+                        </Include-Resource>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <id>apache-snapshot</id>
+            <name>Apache Snapshot Repository</name>
+            <url>
+                http://people.apache.org/maven-snapshot-repository
+            </url>
+        </repository>
+    </repositories>
+</project>

Propchange: cocoon/whiteboard/osgi/commons/avalon-framework/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/commons/avalon-framework/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/pom.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/pom.xml (added)
+++ cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/pom.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,90 @@
+<?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. 
+-->
+<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>
+    <parent>
+        <groupId>org.apache.felix.commons</groupId>
+        <artifactId>build</artifactId>
+        <version>0.9.0-incubator-SNAPSHOT</version>
+    </parent>
+    <properties>
+        <pkgArtifactId>excalibur-sourceresolve</pkgArtifactId>
+        <pkgVersion>2.2.3</pkgVersion>
+        <pomVersion>0001</pomVersion>
+        <osgiVersion>${pkgVersion}</osgiVersion>
+    </properties>
+    <groupId>org.apache.felix.commons</groupId>
+    <artifactId>${pom.groupId}.${pkgArtifactId}</artifactId>
+    <version>${osgiVersion}-${pomVersion}-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>${pkgArtifactId} bundle</name>
+    <description>
+        This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
+    </description>
+    <organization>
+        <name>Apache Felix Project</name>
+        <url>http://felix.apache.org/</url>
+    </organization>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.excalibur.components</groupId>
+            <artifactId>${pkgArtifactId}</artifactId>
+            <version>${pkgVersion}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.0.0</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>
+                            ${pom.artifactId}
+                        </Bundle-SymbolicName>
+                        <Export-Package>!META-INF.services,!META-INF.maven.org.apache.excalibur.components.excalibur-sourceresolve,*;version=${pkgVersion}</Export-Package>
+                        <Include-Resource>
+                            @${pkgArtifactId}-${pkgVersion}.jar!/META-INF/LICENSE.txt,@${pkgArtifactId}-${pkgVersion}.jar!/META-INF/services/*
+                        </Include-Resource>
+                        <DynamicImport-Package>org.apache.commons.httpclient,org.apache.commons.httpclient.methods,org.apache.commons.httpclient.protocol,org.apache.commons.httpclient.util,org.apache.commons.vfs,sun.net,sun.net.ftp</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <id>apache-snapshot</id>
+            <name>Apache Snapshot Repository</name>
+            <url>
+                http://people.apache.org/maven-snapshot-repository
+            </url>
+        </repository>
+    </repositories>
+</project>

Propchange: cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/commons/excalibur-sourceresolve/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/pom.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/pom.xml (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/pom.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,83 @@
+<?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. 
+-->
+<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>
+  <parent>
+    <groupId>org.apache.cocoon</groupId>
+    <artifactId>cocoon-osgi-modules</artifactId>
+    <version>1-SNAPSHOT</version>
+  </parent>
+  <properties>
+    <pkgArtifactId>cocoon-servlet-service-demo1-osgi</pkgArtifactId>
+    <pkgVersion>1.0.0-SNAPSHOT</pkgVersion>
+  </properties>
+  <groupId>org.apache.cocoon</groupId>
+  <artifactId>${pkgArtifactId}</artifactId>
+  <version>${pkgVersion}</version>
+  <packaging>bundle</packaging>
+  <name>${pkgArtifactId} bundle</name>
+  <description>
+    This bundle publishes a test servlet service
+  </description>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-servlet-service-impl-osgi</artifactId>
+      <version>1.0.0-RC1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-servlet-service-demo2-osgi</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>javax.servlet</artifactId>
+      <version>2.4.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>org.apache.commons.logging</artifactId>
+      <version>1.0.4</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>1.0.0</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>
+              ${pom.artifactId}
+            </Bundle-SymbolicName>
+            <Private-Package>org.apache.cocoon.servletservice.demo1</Private-Package>
+            <Import-Package>org.apache.cocoon.servletservice,org.apache.cocoon.servletservice.spring,org.aopalliance.aop,org.springframework.aop,org.springframework.aop.framework,*</Import-Package>
+            <Include-Resource>src/main/resources/</Include-Resource>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/DemoServlet.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/DemoServlet.java?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/DemoServlet.java (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/DemoServlet.java Sun Aug 19 08:03:59 2007
@@ -0,0 +1,104 @@
+/*
+ * 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.cocoon.servletservice.demo1;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.net.URLConnection;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @version $Id$
+ */
+public class DemoServlet extends HttpServlet {
+
+    private final Log logger = LogFactory.getLog(DemoServlet.class);
+
+    /* (non-Javadoc)
+     * @see javax.servlet.GenericServlet#init(javax.servlet.ServletConfig)
+     */
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        this.logger.info("ServletConfig: " + config);
+    }
+
+    /* (non-Javadoc)
+     * @see javax.servlet.GenericServlet#destroy()
+     */
+    public void destroy() {
+        this.logger.info("Destroy");
+        super.destroy();
+    }
+
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        String path = request.getPathInfo();
+        
+        if ("/test1".equals(path)) {
+            response.setContentType("text/plain");
+            String attr = this.getInitParameter("foo");
+            PrintWriter writer = response.getWriter();
+            writer.println("Demo1.1 " + attr);
+            writer.close();
+        } else if ("/test2".equals(path)) {
+            RequestDispatcher demo2 = this.getServletContext().getNamedDispatcher("demo2");
+            demo2.forward(request, response);
+        } else if ("/test3".equals(path)) {
+            URL url = new URL("servlet:/test1");
+            URLConnection connection = url.openConnection();
+            InputStream is = connection.getInputStream();
+            
+            response.setContentType("text/plain");
+            OutputStream os = response.getOutputStream();
+            
+            copy(is, os);
+            is.close();
+            os.close();
+        } else if ("/test4".equals(path)) {
+            URL url = new URL("servlet:demo2:/any");
+            URLConnection connection = url.openConnection();
+            InputStream is = connection.getInputStream();
+
+            response.setContentType("text/plain");
+            OutputStream os = response.getOutputStream();
+            
+            copy(is, os);
+            is.close();
+            os.close();
+        } else {
+            throw new ServletException("Unknown path " + path);
+        }
+    }
+    
+    private static void copy(InputStream is, OutputStream os) throws IOException {
+        int bytesRead = 0;
+        byte buffer[] = new byte[512];
+        while ((bytesRead = is.read(buffer)) != -1)
+            os.write(buffer, 0, bytesRead);
+    }
+}

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/DemoServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/java/org/apache/cocoon/servletservice/demo1/DemoServlet.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/servlet-service-demo1.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/servlet-service-demo1.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/servlet-service-demo1.xml (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/servlet-service-demo1.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,56 @@
+<?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.
+-->
+<!--+
+    | Publish a demo servlet service
+    |
+    | @version $Id$
+    +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:osgi="http://www.springframework.org/schema/osgi"
+       xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
+                           http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+  <osgi:reference id="org.apache.cocoon.servletservice.demo2.servlet"
+                  bean-name="org.apache.cocoon.servletservice.demo2.servlet"
+                  interface="javax.servlet.Servlet"/>
+
+  <osgi:service ref="org.apache.cocoon.servletservice.demo1.servlet"
+                interface="javax.servlet.Servlet">
+    <osgi:service-properties>
+      <prop key="mountPath">/test1</prop>
+    </osgi:service-properties>
+  </osgi:service>
+
+  <bean id="org.apache.cocoon.servletservice.demo1.servlet"
+        class="org.apache.cocoon.servletservice.demo1.DemoServlet">
+    <servlet:context mount-path="/test1">
+      <servlet:init-params>
+        <entry key="foo" value="baz"/>
+      </servlet:init-params>
+      <servlet:connections>
+        <entry key="demo2" value-ref="org.apache.cocoon.servletservice.demo2.servlet"/>
+      </servlet:connections>
+    </servlet:context>
+  </bean>
+
+</beans>
\ No newline at end of file

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/servlet-service-demo1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo1-osgi/src/main/resources/META-INF/spring/servlet-service-demo1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/pom.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/pom.xml (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/pom.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,73 @@
+<?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. 
+-->
+<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>
+  <parent>
+    <groupId>org.apache.cocoon</groupId>
+    <artifactId>cocoon-osgi-modules</artifactId>
+    <version>1-SNAPSHOT</version>
+  </parent>
+  <properties>
+    <pkgArtifactId>cocoon-servlet-service-demo2-osgi</pkgArtifactId>
+    <pkgVersion>1.0.0-SNAPSHOT</pkgVersion>
+  </properties>
+  <groupId>org.apache.cocoon</groupId>
+  <artifactId>${pkgArtifactId}</artifactId>
+  <version>${pkgVersion}</version>
+  <packaging>bundle</packaging>
+  <name>${pkgArtifactId} bundle</name>
+  <description>
+    This bundle publishes a test servlet service
+  </description>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-servlet-service-impl-osgi</artifactId>
+      <version>1.0.0-RC1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse</groupId>
+      <artifactId>javax.servlet</artifactId>
+      <version>2.4.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>1.0.0</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>
+              ${pom.artifactId}
+            </Bundle-SymbolicName>
+            <Private-Package>org.apache.cocoon.servletservice.demo2</Private-Package>
+            <Import-Package>org.apache.cocoon.servletservice,org.apache.cocoon.servletservice.spring,org.aopalliance.aop,org.springframework.aop,org.springframework.aop.framework,*</Import-Package>
+            <Include-Resource>src/main/resources/</Include-Resource>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/DemoServlet.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/DemoServlet.java?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/DemoServlet.java (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/DemoServlet.java Sun Aug 19 08:03:59 2007
@@ -0,0 +1,39 @@
+/*
+ * 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.cocoon.servletservice.demo2;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @version $Id$
+ */
+public class DemoServlet extends HttpServlet {
+
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        response.setContentType("text/plain");
+        PrintWriter writer = response.getWriter();
+        writer.println("Demo2");
+        writer.close();
+    }
+
+}

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/DemoServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/java/org/apache/cocoon/servletservice/demo2/DemoServlet.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/servlet-service-demo2.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/servlet-service-demo2.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/servlet-service-demo2.xml (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/servlet-service-demo2.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,45 @@
+<?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.
+-->
+<!--+
+    | Publish a demo servlet service
+    |
+    | @version $Id$
+    +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:osgi="http://www.springframework.org/schema/osgi"
+       xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
+                           http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+  <osgi:service ref="org.apache.cocoon.servletservice.demo2.servlet"
+                interface="javax.servlet.Servlet">
+    <osgi:service-properties>
+      <prop key="mountPath">/test2</prop>
+    </osgi:service-properties>
+  </osgi:service>
+
+  <bean id="org.apache.cocoon.servletservice.demo2.servlet"
+        class="org.apache.cocoon.servletservice.demo2.DemoServlet">
+    <servlet:context mount-path="/test2"/>
+  </bean>  
+
+</beans>
\ No newline at end of file

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/servlet-service-demo2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-demo2-osgi/src/main/resources/META-INF/spring/servlet-service-demo2.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/pom.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/pom.xml (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/pom.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,96 @@
+<?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. 
+-->
+<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>
+  <parent>
+    <groupId>org.apache.cocoon</groupId>
+    <artifactId>cocoon-osgi-modules</artifactId>
+    <version>1-SNAPSHOT</version>
+  </parent>
+  <properties>
+    <pkgArtifactId>cocoon-servlet-service-impl</pkgArtifactId>
+    <pkgVersion>1.0.0-RC1-SNAPSHOT</pkgVersion>
+    <osgiVersion>${pkgVersion}</osgiVersion>
+  </properties>
+  <groupId>org.apache.cocoon</groupId>
+  <artifactId>${pkgArtifactId}-osgi</artifactId>
+  <version>${osgiVersion}</version>
+  <packaging>bundle</packaging>
+  <name>${pkgArtifactId} bundle</name>
+  <description>
+    This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
+  </description>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>${pkgArtifactId}</artifactId>
+      <version>${pkgVersion}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>1.1.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-core</artifactId>
+      <version>1.0-m2</version>
+      <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.aopalliance</groupId>
+          <artifactId>aopalliance</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>1.0.0</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>
+              ${pom.artifactId}
+            </Bundle-SymbolicName>
+            <Export-Package>org.apache.cocoon.callstack;version=${pkgVersion},org.apache.cocoon.callstack.environment;version=${pkgVersion},org.apache.cocoon.servletservice;version=${pkgVersion},org.apache.cocoon.servletservice.spring;version=${pkgVersion},org.apache.cocoon.servletservice.util;version=${pkgVersion}</Export-Package>
+            <Private-Package>org.apache.cocoon.servletservice.osgi</Private-Package>
+            <Include-Resource>
+              src/main/resources/,@${pkgArtifactId}-${pkgVersion}.jar!/META-INF/*,@${pkgArtifactId}-${pkgVersion}.jar!/META-INF/cocoon/spring/*,@${pkgArtifactId}-${pkgVersion}.jar!/org/apache/cocoon/servletservice/schema/cocoon-servlet-1.0.xsd
+            </Include-Resource>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/Activator.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/Activator.java?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/Activator.java (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/Activator.java Sun Aug 19 08:03:59 2007
@@ -0,0 +1,119 @@
+/*
+ * Copyright 1999-2005 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.
+ */
+package org.apache.cocoon.servletservice.osgi;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.http.NamespaceException;
+import org.springframework.osgi.context.BundleContextAware;
+
+/**
+ * @version $Id$
+ */
+public class Activator implements BundleContextAware {
+
+    /** By default we use the logger for this class. */
+    private final Log log = LogFactory.getLog(getClass());
+
+    private HttpService httpService;
+    private HashMap servlets = new HashMap();
+    private BundleContext context;
+
+	public void setBundleContext(BundleContext context) {
+		this.context = context;
+	}
+
+	public void setHttpService(HttpService httpService) throws ServletException, NamespaceException {
+        this.httpService = httpService;
+        this.log.info("Getting HttpService");
+        Iterator entries = this.servlets.entrySet().iterator();
+        while (entries.hasNext()) {
+            Entry e = (Entry) entries.next();
+            this.registerServlet((String) e.getKey(), (Servlet) e.getValue());
+        }
+    }
+
+    public void setServlet(Servlet servlet, Dictionary properties)
+            throws ServletException, NamespaceException {
+        this.log.info("setServlet");
+        Enumeration keys = properties.keys();
+        while (keys.hasMoreElements()) {
+        	String key = (String) keys.nextElement();
+        	this.log.info("property " + key + ":" + properties.get(key));
+        }
+        String path = (String) properties.get("mountPath");
+        if (path != null) {
+            this.servlets.put(path, servlet);
+            // If there are servlets that already are registered when this class
+            // is activated, this method will be called before the activate method.
+            if (this.context != null)
+                this.registerServlet(path, servlet);
+        }
+    }
+
+    public void unsetServlet(Servlet servlet, Dictionary properties) {
+        String path = (String) properties.get("mountPath");
+        if (path != null) {
+            this.servlets.remove(path);
+            this.unregisterServlet(path);
+        }
+    }
+
+    private void registerServlet(String path, final Servlet servlet)
+        throws ServletException, NamespaceException {
+        
+        // Create a context that resolves resources in the bundle context where
+        // the servlet origins from
+        HttpContext httpContext = new HttpContext() {
+            private Bundle bundle = Activator.this.context.getBundle();
+            public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException {
+                return true;
+            }
+
+            public URL getResource(String name) {
+                return this.bundle.getEntry(name);
+            }
+
+            public String getMimeType(String name) {
+                return null;
+            }
+        };
+        this.httpService.registerServlet(path, servlet, null, httpContext);
+        this.log.info("Register Servlet at " + path);    
+    }
+
+    private void unregisterServlet(String path) {
+        this.httpService.unregister(path);
+        this.log.info("Unregister Servlet at " + path);
+    }
+}

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletConnection.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletConnection.java?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletConnection.java (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletConnection.java Sun Aug 19 08:03:59 2007
@@ -0,0 +1,159 @@
+/*
+ * 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.cocoon.servletservice.osgi;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import javax.servlet.ServletException;
+
+/**
+ * Implementation of a {@link URLConnection} that gets its content by
+ * invoking the ServletService. 
+ *
+ * @version $Id$
+ */
+public class ServletConnection extends URLConnection {
+    
+    org.apache.cocoon.servletservice.ServletConnection delegate;
+
+    /**
+     * @param url
+     * @throws MalformedURLException 
+     */
+    public ServletConnection(URL url) throws MalformedURLException {
+        super(url);
+        this.delegate = new org.apache.cocoon.servletservice.ServletConnection(url.toExternalForm());
+    }
+
+    /* (non-Javadoc)
+     * @see java.net.URLConnection#connect()
+     */
+    public void connect() throws IOException {
+        try {
+            this.delegate.connect();
+        } catch (ServletException e) {
+            // TODO Better handling of cascading exception
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    /**
+     * @param obj
+     * @return
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj) {
+        return delegate.equals(obj);
+    }
+
+    /**
+     * @return
+     * @see org.apache.cocoon.servletservice.ServletConnection#getContentType()
+     */
+    public String getContentType() {
+        return delegate.getContentType();
+    }
+
+    /**
+     * @param arg0
+     * @return
+     * @see org.apache.cocoon.servletservice.ServletConnection#getHeaderField(java.lang.String)
+     */
+    public String getHeaderField(String arg0) {
+        return delegate.getHeaderField(arg0);
+    }
+
+    /**
+     * @param arg0
+     * @param arg1
+     * @return
+     * @see org.apache.cocoon.servletservice.ServletConnection#getHeaderFieldDate(java.lang.String, long)
+     */
+    public long getHeaderFieldDate(String arg0, long arg1) {
+        return delegate.getHeaderFieldDate(arg0, arg1);
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     * @see org.apache.cocoon.servletservice.ServletConnection#getInputStream()
+     */
+    public InputStream getInputStream() throws IOException {
+        try {
+            return delegate.getInputStream();
+        } catch (ServletException e) {
+            // TODO Better handling of cascading exception
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    /**
+     * @return
+     * @see org.apache.cocoon.servletservice.ServletConnection#getLastModified()
+     */
+    public long getLastModified() {
+        return delegate.getLastModified();
+    }
+
+    /**
+     * @return
+     * @throws IllegalStateException
+     * @see org.apache.cocoon.servletservice.ServletConnection#getOutputStream()
+     */
+    public OutputStream getOutputStream() throws IllegalStateException {
+        return delegate.getOutputStream();
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     * @see org.apache.cocoon.servletservice.ServletConnection#getResponseCode()
+     */
+    public int getResponseCode() throws IOException {
+        return delegate.getResponseCode();
+    }
+
+    /**
+     * @return
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode() {
+        return delegate.hashCode();
+    }
+
+    /**
+     * @param ifmodifiedsince
+     * @see org.apache.cocoon.servletservice.ServletConnection#setIfModifiedSince(long)
+     */
+    public void setIfModifiedSince(long ifmodifiedsince) {
+        delegate.setIfModifiedSince(ifmodifiedsince);
+    }
+
+    /**
+     * @return
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+        return delegate.toString();
+    }
+
+}

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletConnection.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletProtocol.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletProtocol.java?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletProtocol.java (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletProtocol.java Sun Aug 19 08:03:59 2007
@@ -0,0 +1,39 @@
+/*
+ * 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.cocoon.servletservice.osgi;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.osgi.service.url.AbstractURLStreamHandlerService;
+
+/**
+ * Factory for servlet protocol
+ * 
+ * @version $Id$
+ */
+public class ServletProtocol extends AbstractURLStreamHandlerService {
+
+    /* (non-Javadoc)
+     * @see org.osgi.service.url.AbstractURLStreamHandlerService#openConnection(java.net.URL)
+     */
+    public URLConnection openConnection(URL url) throws IOException {
+        return new ServletConnection(url);
+    }
+
+}

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletProtocol.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/java/org/apache/cocoon/servletservice/osgi/ServletProtocol.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-listener.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-listener.xml?view=auto&rev=567412
==============================================================================
--- cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-listener.xml (added)
+++ cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-listener.xml Sun Aug 19 08:03:59 2007
@@ -0,0 +1,40 @@
+<?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.
+-->
+<!--+
+    | Listen for servlet services and register them into the HttpService
+    |
+    | @version $Id$
+    +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:osgi="http://www.springframework.org/schema/osgi"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+  <bean id="servletListener" class="org.apache.cocoon.servletservice.osgi.Activator">
+    <property name="httpService" ref="httpService"/>
+  </bean>
+
+  <osgi:reference id="httpService" interface="org.osgi.service.http.HttpService"/>
+
+  <osgi:reference id="servletService" interface="javax.servlet.Servlet" cardinality="0..n">
+    <osgi:listener bind-method="setServlet" unbind-method="unsetServlet" ref="servletListener"/>
+  </osgi:reference>
+</beans>
\ No newline at end of file

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-listener.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/core/cocoon-servlet-service-impl-osgi/src/main/resources/META-INF/spring/servlet-listener.xml
------------------------------------------------------------------------------
    svn:keywords = Id