Author: rmannibucau
Date: Tue May 8 00:08:37 2012
New Revision: 1335306
URL: http://svn.apache.org/viewvc?rev=1335306&view=rev
Log:
adding a wp+jaxrs webapp
Added:
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/pom.xml
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/assembly/
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/assembly/war.xml
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/resources/
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/resources/META-INF/
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/resources/META-INF/context.xml
openejb/trunk/openejb/tomee/tomee-rs/
openejb/trunk/openejb/tomee/tomee-rs/pom.xml
openejb/trunk/openejb/tomee/tomee-rs/src/
openejb/trunk/openejb/tomee/tomee-rs/src/main/
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomeeJaxRsService.java
openejb/trunk/openejb/tomee/tomee-rs/src/test/
openejb/trunk/openejb/tomee/tomee-rs/src/test/java/
Removed:
openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java
openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomeeJaxRsService.java
Modified:
openejb/trunk/openejb/pom.xml
openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml
openejb/trunk/openejb/server/openejb-cxf-transport/pom.xml
openejb/trunk/openejb/server/openejb-cxf/pom.xml
openejb/trunk/openejb/tomee/pom.xml
openejb/trunk/openejb/tomee/tomee-plus-webapp/pom.xml
openejb/trunk/openejb/tomee/tomee-webservices/pom.xml
Modified: openejb/trunk/openejb/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/pom.xml?rev=1335306&r1=1335305&r2=1335306&view=diff
==============================================================================
--- openejb/trunk/openejb/pom.xml (original)
+++ openejb/trunk/openejb/pom.xml Tue May 8 00:08:37 2012
@@ -1025,6 +1025,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-core</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -1536,193 +1540,6 @@
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle</artifactId>
- <version>${cxf.version}</version>
- <exclusions>
- <exclusion>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-servlet_2.5_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xalan</groupId>
- <artifactId>serializer</artifactId>
- </exclusion>
- <exclusion>
- <groupId>antlr</groupId>
- <artifactId>antlr</artifactId>
- </exclusion>
- <exclusion>
- <groupId>asm</groupId>
- <artifactId>asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>aopalliance</groupId>
- <artifactId>aopalliance</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-continuation</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-io</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-security</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.xmlbeans</groupId>
- <artifactId>xmlbeans</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>stax2-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-servlet_3.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-stax-api_1.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-activation_1.1_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-annotation_1.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-javamail_1.4_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jra</groupId>
- <artifactId>jra</artifactId>
- </exclusion>
- <exclusion>
- <groupId>rhino</groupId>
- <artifactId>js</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- </exclusion>
- <exclusion>
- <groupId>oro</groupId>
- <artifactId>oro</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-xjc</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.xml.soap</groupId>
- <artifactId>saaj-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jaxws_2.2_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-expression</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jms</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </exclusion>
- <exclusion>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opensaml</groupId>
- <artifactId>opensaml</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opensaml</groupId>
- <artifactId>openws</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opensaml</groupId>
- <artifactId>xmltooling</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
Modified: openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml?rev=1335306&r1=1335305&r2=1335306&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml (original)
+++ openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml Tue May 8 00:08:37 2012
@@ -48,7 +48,27 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle</artifactId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ <version>${cxf.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>woodstox-core-asl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-extension-providers</artifactId>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
@@ -66,7 +86,6 @@
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.3</version>
- <scope>test</scope>
</dependency>
</dependencies>
Modified: openejb/trunk/openejb/server/openejb-cxf-transport/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-cxf-transport/pom.xml?rev=1335306&r1=1335305&r2=1335306&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-cxf-transport/pom.xml (original)
+++ openejb/trunk/openejb/server/openejb-cxf-transport/pom.xml Tue May 8
00:08:37 2012
@@ -34,177 +34,8 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle</artifactId>
- <exclusions>
- <exclusion>
- <groupId>antlr</groupId>
- <artifactId>antlr</artifactId>
- </exclusion>
- <exclusion>
- <groupId>asm</groupId>
- <artifactId>asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>aopalliance</groupId>
- <artifactId>aopalliance</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-continuation</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-io</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-security</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.xmlbeans</groupId>
- <artifactId>xmlbeans</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>stax2-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-servlet_3.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-stax-api_1.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-activation_1.1_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-annotation_1.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-javamail_1.4_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jra</groupId>
- <artifactId>jra</artifactId>
- </exclusion>
- <exclusion>
- <groupId>rhino</groupId>
- <artifactId>js</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- </exclusion>
- <exclusion>
- <groupId>oro</groupId>
- <artifactId>oro</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-xjc</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.xml.soap</groupId>
- <artifactId>saaj-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jaxws_2.2_spec</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-expression</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jms</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </exclusion>
- <exclusion>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opensaml</groupId>
- <artifactId>opensaml</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opensaml</groupId>
- <artifactId>openws</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opensaml</groupId>
- <artifactId>xmltooling</artifactId>
- </exclusion>
- </exclusions>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</version>
</dependency>
</dependencies>
</project>
Modified: openejb/trunk/openejb/server/openejb-cxf/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-cxf/pom.xml?rev=1335306&r1=1335305&r2=1335306&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-cxf/pom.xml (original)
+++ openejb/trunk/openejb/server/openejb-cxf/pom.xml Tue May 8 00:08:37 2012
@@ -85,7 +85,34 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle</artifactId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${cxf.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-ws-security</artifactId>
+ <version>${cxf.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.messaging.saaj</groupId>
+ <artifactId>saaj-impl</artifactId>
+ <version>1.3.18</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
Modified: openejb/trunk/openejb/tomee/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/pom.xml?rev=1335306&r1=1335305&r2=1335306&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/pom.xml (original)
+++ openejb/trunk/openejb/tomee/pom.xml Tue May 8 00:08:37 2012
@@ -38,6 +38,8 @@
<module>tomee-plus-webapp</module>
<module>tomee-webservices</module>
<module>tomee-embedded</module>
+ <module>tomee-rs</module>
+ <module>tomee-jaxrs-webapp</module>
<module>apache-tomee</module>
<!-- no need since it is on repo1, reactivate when you'll need another
version
<module>apache-tomcat</module>
Added: openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/pom.xml?rev=1335306&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/pom.xml (added)
+++ openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/pom.xml Tue May 8 00:08:37
2012
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>tomee</artifactId>
+ <groupId>org.apache.openejb</groupId>
+ <version>4.0.0-beta-3-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>tomee-jaxrs-webapp</artifactId>
+ <name>OpenEJB :: TomEE :: JAXRS Webapp</name>
+ <packaging>war</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>tomee-webapp</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-cxf-rs</artifactId>
+ <version>${openejb.version}</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-cxf-transport</artifactId>
+ <version>${openejb.version}</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-rest</artifactId>
+ <version>${openejb.version}</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>tomee-rs</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.2</version>
+ <executions>
+ <execution>
+ <id>war</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/main/assembly/war.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+
+</project>
\ No newline at end of file
Added: openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/assembly/war.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/assembly/war.xml?rev=1335306&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/assembly/war.xml
(added)
+++ openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/assembly/war.xml
Tue May 8 00:08:37 2012
@@ -0,0 +1,101 @@
+<?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.
+-->
+
+<!-- $Rev: 576067 $ $Date: 2007-09-16 03:17:08 -0700 (Sun, 16 Sep 2007) $ -->
+
+<assembly>
+ <id>war</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>target/maven-shared-archive-resources</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}</directory>
+ <includes>
+ <include>README.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/src/main/webapp</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <exclude>org/**</exclude>
+ <exclude>META-INF/LICENSE</exclude>
+ <exclude>META-INF/NOTICE</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/target/classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ <excludes>
+ <exclude>META-INF/LICENSE</exclude>
+ <exclude>META-INF/NOTICE</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+
<directory>${project.build.directory}/${project.artifactId}-${project.version}/</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>**/*.jsp</include>
+ <include>**/*.css</include>
+ <include>**/*.css</include>
+ <include>**/*.png</include>
+ <include>**/*.js</include>
+ <include>**/*.html</include>
+ <include>images/*.gif</include>
+ <include>lib/*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <scope>runtime</scope>
+ <excludes>
+ <!-- provided -->
+ <exclude>org.apache.tomcat:*</exclude>
+
+ <!-- should be in a pom exclusion but it does perfectly the trick -->
+ <exclude>org.springframework:*</exclude>
+
+ <!-- wars and pom -->
+ <exclude>*:war</exclude>
+ <exclude>*:pom</exclude>
+ </excludes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>WEB-INF/lib</outputDirectory>
+ <scope>runtime</scope>
+ <includes>
+ <include>org.apache.openejb:tomee-loader</include>
+ <include>org.codehaus.swizzle:swizzle-stream</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+</assembly>
+
Added:
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/resources/META-INF/context.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/resources/META-INF/context.xml?rev=1335306&view=auto
==============================================================================
---
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/resources/META-INF/context.xml
(added)
+++
openejb/trunk/openejb/tomee/tomee-jaxrs-webapp/src/main/resources/META-INF/context.xml
Tue May 8 00:08:37 2012
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+-->
+<Context>
+ <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.0\.0\.1|0:0:0:0:0:0:0:1(%.*)?|^::1$" deny=""/>
+</Context>
Modified: openejb/trunk/openejb/tomee/tomee-plus-webapp/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-plus-webapp/pom.xml?rev=1335306&r1=1335305&r2=1335306&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-plus-webapp/pom.xml (original)
+++ openejb/trunk/openejb/tomee/tomee-plus-webapp/pom.xml Tue May 8 00:08:37
2012
@@ -46,6 +46,10 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-core</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -155,7 +159,7 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2.2</version>
+ <version>2.2.2</version>
<executions>
<execution>
<id>war</id>
Added: openejb/trunk/openejb/tomee/tomee-rs/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-rs/pom.xml?rev=1335306&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-rs/pom.xml (added)
+++ openejb/trunk/openejb/tomee/tomee-rs/pom.xml Tue May 8 00:08:37 2012
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>tomee</artifactId>
+ <groupId>org.apache.openejb</groupId>
+ <version>4.0.0-beta-3-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>tomee-rs</artifactId>
+ <name>OpenEJB :: TomEE :: RS Web Services</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ <classifier>tomcat</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-rest</artifactId>
+ <version>${openejb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-cxf-rs</artifactId>
+ <version>${openejb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>tomee-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>tomee-loader</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>tomee-catalina</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-server</artifactId>
+ <version>${openejb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-ejbd</artifactId>
+ <version>${openejb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-http</artifactId>
+ <version>${openejb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina</artifactId>
+ <version>${tomcat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Added:
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java?rev=1335306&view=auto
==============================================================================
---
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java
(added)
+++
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java
Tue May 8 00:08:37 2012
@@ -0,0 +1,196 @@
+/*
+ * 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.tomee.webservices;
+
+import org.apache.catalina.Container;
+import org.apache.catalina.Context;
+import org.apache.catalina.Engine;
+import org.apache.catalina.Host;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.Service;
+import org.apache.catalina.Wrapper;
+import org.apache.catalina.connector.Connector;
+import org.apache.catalina.core.StandardServer;
+import org.apache.openejb.server.httpd.HttpListener;
+import org.apache.openejb.server.httpd.util.HttpUtil;
+import org.apache.openejb.server.rest.RsRegistry;
+import org.apache.openejb.server.rest.RsServlet;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
+import org.apache.tomee.catalina.TomEERuntimeException;
+import org.apache.tomee.catalina.TomcatWebAppBuilder;
+import org.apache.tomee.loader.TomcatHelper;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import static org.apache.tomee.catalina.TomcatWebAppBuilder.IGNORE_CONTEXT;
+
+public class TomcatRsRegistry implements RsRegistry {
+ private static final Logger LOGGER =
Logger.getInstance(LogCategory.OPENEJB_STARTUP, TomcatRsRegistry.class);
+
+ private Engine engine;
+ private List<Connector> connectors;
+ private final Map<String, Context> contexts = new TreeMap<String,
Context>();
+ private final Map<String, HttpListener> listeners = new TreeMap<String,
HttpListener>();
+
+ public TomcatRsRegistry() {
+ StandardServer standardServer = TomcatHelper.getServer();
+ for (Service service : standardServer.findServices()) {
+ if (service.getContainer() instanceof Engine) {
+ connectors = Arrays.asList(service.findConnectors());
+ engine = (Engine) service.getContainer();
+ break;
+ }
+ }
+ }
+
+ @Override
+ public AddressInfo createRsHttpListener(String root, HttpListener
listener, ClassLoader classLoader, String completePath, String virtualHost) {
+ String path = completePath;
+ if (path == null) {
+ throw new NullPointerException("contextRoot is null");
+ }
+ if (listener == null) {
+ throw new NullPointerException("listener is null");
+ }
+
+ // parsing could be optimized a bit...
+ String realRoot = root;
+ if (!root.startsWith("/")) {
+ realRoot = "/" + root;
+ }
+ if (realRoot.length() > 1) {
+ int idx = realRoot.substring(1).indexOf('/');
+ if (idx > 0) {
+ realRoot = realRoot.substring(0, idx + 1);
+ }
+ }
+ if (!path.startsWith("/")) {
+ path = "/" + path;
+ }
+ if (!"/".equals(realRoot)) {
+ path = path.substring(realRoot.length(), path.length());
+ }
+ if (!path.startsWith("/")) {
+ path = "/" + path;
+ }
+
+ // find the existing host (we do not auto-create hosts)
+ if (virtualHost == null) virtualHost = engine.getDefaultHost();
+ Container host = engine.findChild(virtualHost);
+ if (host == null) {
+ throw new IllegalArgumentException("Invalid virtual host '" +
virtualHost + "'. Do you have a matching Host entry in the server.xml?");
+ }
+
+ // get the webapp context
+ Context context = (Context) host.findChild(realRoot);
+
+ if (context == null && "/".equals(realRoot)) { // ROOT
+ context = (Context) host.findChild("");
+ }
+
+ if (context == null) {
+ throw new IllegalStateException("Invalid context '" + realRoot +
"'. Cannot find context in host " + host.getName());
+ }
+
+ context.addLifecycleListener(new LifecycleListener() {
+ public void lifecycleEvent(LifecycleEvent event) {
+ Context context = (Context) event.getLifecycle();
+ if (event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
+
context.getServletContext().setAttribute(TomcatWebAppBuilder.IGNORE_CONTEXT,
"true");
+ }
+ if (event.getType().equals(Lifecycle.START_EVENT) ||
event.getType().equals(Lifecycle.BEFORE_START_EVENT) ||
event.getType().equals("configure_start")) {
+ context.setConfigured(true);
+ }
+ }
+ });
+
+
+ Wrapper wrapper = context.createWrapper();
+ final String name = "rest_" + listener.hashCode();
+ wrapper.setName(name);
+ wrapper.setServletClass(RsServlet.class.getName());
+
+ final String mapping = path.replace("/.*", "/*");
+ context.addChild(wrapper);
+ wrapper.addMapping(mapping);
+ context.addServletMapping(mapping, name);
+
+ final String listenerId = wrapper.getName() +
RsServlet.class.getName() + listener.hashCode();
+ wrapper.addInitParameter(HttpListener.class.getName(), listenerId);
+ context.getServletContext().setAttribute(listenerId, listener);
+
+ path = address(connectors, host.getName(), realRoot);
+ final String key = address(connectors, host.getName(), completePath);
+ contexts.put(key, context);
+ listeners.put(key, listener);
+
+ return new AddressInfo(path, key);
+ }
+
+ private static String address(final Collection<Connector> connectors,
final String host, final String path) {
+ List<String> addresses = new ArrayList<String>();
+ for (Connector connector : connectors) {
+ URI address;
+ try {
+ address = new URI(connector.getScheme(), null, host,
connector.getPort(), path, null, null);
+ } catch (Exception e) { // just an URI problem
normally...shouldn't occur
+ LOGGER.error("can't add container for path " + path, e);
+ continue;
+ }
+ addresses.add(address.toString());
+ }
+ return HttpUtil.selectSingleAddress(addresses);
+ }
+
+ @Override
+ public HttpListener removeListener(final String completePath) {
+ String path = completePath;
+ if (path == null) {
+ return listeners.get(path);
+ }
+
+ // assure context root with a leading slash
+ if (!path.startsWith("/") && !path.startsWith("http://") &&
!path.startsWith("https://")) {
+ path = "/" + path;
+ }
+
+ if (TomcatHelper.isTomcat7() && TomcatHelper.isStopping() &&
listeners.containsKey(path)) {
+ return listeners.get(path);
+ }
+
+ Context context = contexts.remove(path);
+ try {
+ context.stop();
+ context.destroy();
+ } catch (Exception e) {
+ throw new TomEERuntimeException(e);
+ }
+ Host host = (Host) context.getParent();
+ host.removeChild(context);
+
+ return listeners.remove(completePath);
+ }
+}
Added:
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomeeJaxRsService.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomeeJaxRsService.java?rev=1335306&view=auto
==============================================================================
---
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomeeJaxRsService.java
(added)
+++
openejb/trunk/openejb/tomee/tomee-rs/src/main/java/org/apache/tomee/webservices/TomeeJaxRsService.java
Tue May 8 00:08:37 2012
@@ -0,0 +1,58 @@
+/**
+ * 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.tomee.webservices;
+
+import org.apache.openejb.assembler.classic.AppInfo;
+import org.apache.openejb.assembler.classic.WebAppInfo;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.server.rest.RESTService;
+import org.apache.openejb.server.rest.RsRegistry;
+import org.apache.openejb.spi.Service;
+import org.apache.tomee.catalina.WebDeploymentListener;
+import org.apache.tomee.catalina.WebDeploymentListeners;
+
+import java.util.Properties;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class TomeeJaxRsService implements Service, WebDeploymentListener {
+
+ @Override
+ public void init(Properties props) throws Exception {
+ final SystemInstance system = SystemInstance.get();
+
+ TomcatRsRegistry tomcatRestHandler = (TomcatRsRegistry)
system.getComponent(RsRegistry.class);
+ if (tomcatRestHandler == null) {
+ tomcatRestHandler = new TomcatRsRegistry();
+ system.setComponent(RsRegistry.class, tomcatRestHandler);
+ }
+
+ system.getComponent(WebDeploymentListeners.class).add(this);
+ }
+
+ @Override
+ public void afterApplicationCreated(AppInfo appInfo, WebAppInfo webApp) {
+ // required for Pojo Web Services because when Assembler creates the
application
+ // the CoreContainerSystem does not contain the WebContext
+ // see also the start method
getContainerSystem().addWebDeployment(webContext);
+ RESTService component =
SystemInstance.get().getComponent(RESTService.class);
+ if (component == null) return;
+ component.afterApplicationCreated(appInfo, webApp);
+ }
+
+}
Modified: openejb/trunk/openejb/tomee/tomee-webservices/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webservices/pom.xml?rev=1335306&r1=1335305&r2=1335306&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webservices/pom.xml (original)
+++ openejb/trunk/openejb/tomee/tomee-webservices/pom.xml Tue May 8 00:08:37
2012
@@ -111,6 +111,11 @@
<version>${tomcat.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>tomee-rs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>