You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2007/05/14 23:55:50 UTC
svn commit: r537994 - in /felix/trunk: http.jetty/pom.xml
http.jetty/src/main/java/org/mortbay/jetty/servlet/OsgiServletHandler.java
http.jetty/src/main/java/org/osgi/ pom.xml
Author: pauls
Date: Mon May 14 14:55:49 2007
New Revision: 537994
URL: http://svn.apache.org/viewvc?view=rev&rev=537994
Log:
Update the http.jetty bundle to the new plugin, make it compile/run against javax.servlet version 2.1, and hook it up to the parent pom.
Removed:
felix/trunk/http.jetty/src/main/java/org/osgi/
Modified:
felix/trunk/http.jetty/pom.xml
felix/trunk/http.jetty/src/main/java/org/mortbay/jetty/servlet/OsgiServletHandler.java
felix/trunk/pom.xml
Modified: felix/trunk/http.jetty/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http.jetty/pom.xml?view=diff&rev=537994&r1=537993&r2=537994
==============================================================================
--- felix/trunk/http.jetty/pom.xml (original)
+++ felix/trunk/http.jetty/pom.xml Mon May 14 14:55:49 2007
@@ -5,7 +5,7 @@
<version>0.9.0-incubator-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <packaging>osgi-bundle</packaging>
+ <packaging>bundle</packaging>
<name>Apache Felix HTTP Service</name>
<artifactId>org.apache.felix.http.jetty</artifactId>
<dependencies>
@@ -22,9 +22,10 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>tomcat</groupId>
- <artifactId>servlet</artifactId>
- <version>4.0.6</version>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>javax.servlet</artifactId>
+ <version>${pom.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>jetty</groupId>
@@ -35,31 +36,24 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.felix.plugins</groupId>
- <artifactId>maven-osgi-plugin</artifactId>
- <version>${pom.version}</version>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
- <ignorePackage>
- com.sun.net.ssl.internal.ssl,
- com.sun.net.ssl,
- org.xml.sax,
- org.xml.sax.helpers,
- javax.xml.parsers,
- javax.security.cert
- </ignorePackage>
- <osgiManifest>
- <bundleName>HTTP Service</bundleName>
- <bundleDescription>An implementation of the OSGi HTTP Service using Jetty.</bundleDescription>
- <bundleActivator>auto-detect</bundleActivator>
- <bundleDocUrl>http://oscar-osgi.sf.net/obr2/${pom.artifactId}/</bundleDocUrl>
- <bundleUrl>http://oscar-osgi.sf.net/obr2/${pom.artifactId}/${pom.artifactId}-${pom.version}.jar</bundleUrl>
- <bundleSource>http://oscar-osgi.sf.net/obr2/${pom.artifactId}/${pom.artifactId}-${pom.version}-src.jar</bundleSource>
- <bundleSymbolicName>${pom.artifactId}</bundleSymbolicName>
- <dynamicImportPackage>javax.net.ssl</dynamicImportPackage>
- <exportPackage>org.osgi.service.http; version=1.1,javax.servlet;javax.servlet.http;version=2.3.0</exportPackage>
- <exportService>org.osgi.service.http.HttpService</exportService>
- </osgiManifest>
+ <instructions>
+ <Bundle-Name>HTTP Service</Bundle-Name>
+ <Bundle-Description>An implementation of the OSGi HTTP Service using Jetty.</Bundle-Description>
+ <Bundle-Activator>${pom.artifactId}.Activator</Bundle-Activator>
+ <Bundle-DocURL>http://oscar-osgi.sf.net/obr2/${pom.artifactId}/</Bundle-DocURL>
+ <Bundle-URL>http://oscar-osgi.sf.net/obr2/${pom.artifactId}/${pom.artifactId}-${pom.version}.jar</Bundle-URL>
+ <Bundle-Source>http://oscar-osgi.sf.net/obr2/${pom.artifactId}/${pom.artifactId}-${pom.version}-src.jar</Bundle-Source>
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <DynamicImport-Package>javax.net.ssl</DynamicImport-Package>
+ <Export-Package>org.osgi.service.http; version=1.1</Export-Package>
+ <Import-Package>!com.sun.net.ssl.internal.ssl,!com.sun.net.ssl,!org.xml.sax,!org.xml.sax.helpers,!javax.xml.parsers,!javax.security.cert,javax.servlet;version=1.1, javax.servlet.http;version=1.1,*</Import-Package>
+ <Private-Package>org.apache.felix.http.jetty, org.mortbay.*</Private-Package>
+ <Export-Service>org.osgi.service.http.HttpService</Export-Service>
+ </instructions>
</configuration>
</plugin>
</plugins>
Modified: felix/trunk/http.jetty/src/main/java/org/mortbay/jetty/servlet/OsgiServletHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/http.jetty/src/main/java/org/mortbay/jetty/servlet/OsgiServletHandler.java?view=diff&rev=537994&r1=537993&r2=537994
==============================================================================
--- felix/trunk/http.jetty/src/main/java/org/mortbay/jetty/servlet/OsgiServletHandler.java (original)
+++ felix/trunk/http.jetty/src/main/java/org/mortbay/jetty/servlet/OsgiServletHandler.java Mon May 14 14:55:49 2007
@@ -92,7 +92,17 @@
else
{
//TODO: any other error/auth handling we should do in here?
- response.flushBuffer();
+
+ // response.flushBuffer() if available
+ try
+ {
+ response.getClass().getDeclaredMethod("flushBuffer", null).invoke(response, null);
+ }
+ catch (Exception ex)
+ {
+ // else ignore
+ ex.printStackTrace();
+ }
}
}
}
Modified: felix/trunk/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/pom.xml?view=diff&rev=537994&r1=537993&r2=537994
==============================================================================
--- felix/trunk/pom.xml (original)
+++ felix/trunk/pom.xml Mon May 14 14:55:49 2007
@@ -138,7 +138,7 @@
<module>eventadmin.bridge.configuration</module>
<module>eventadmin.bridge.useradmin</module>
<module>eventadmin.bridge.wireadmin</module>
-
+ <module>http.jetty</module>
<module>scr</module>
<module>configadmin</module>
<module>metatype</module>
@@ -172,8 +172,6 @@
<module>upnp.sample.tv</module>
<module>upnp.sample.clock</module>
<module>upnp.sample.binaryLight</module>
- <!-- <module>http.jetty</module> -->
-
<!-- <module>tools/mangen</module> -->