Author: rmannibucau
Date: Tue May 8 08:09:54 2012
New Revision: 1335374
URL: http://svn.apache.org/viewvc?rev=1335374&view=rev
Log:
making apache-tomee-jaxrs
Added:
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-jaxrs.xml
Modified:
openejb/trunk/openejb/examples/polling-parent/polling-client/pom.xml
openejb/trunk/openejb/examples/polling-parent/polling-web/pom.xml
openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml
openejb/trunk/openejb/tomee/apache-tomee/pom.xml
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-plus.xml
openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java
Modified: openejb/trunk/openejb/examples/polling-parent/polling-client/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/polling-parent/polling-client/pom.xml?rev=1335374&r1=1335373&r2=1335374&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/polling-parent/polling-client/pom.xml
(original)
+++ openejb/trunk/openejb/examples/polling-parent/polling-client/pom.xml Tue
May 8 08:09:54 2012
@@ -79,7 +79,7 @@
<includePluginDependencies>true</includePluginDependencies>
<mainClass>jug.client.Client</mainClass>
<arguments>
- <argument>http://localhost:8080/polling-web-1.0/</argument>
+
<argument>http://localhost:8080/polling-web-${project.version}/</argument>
</arguments>
</configuration>
<dependencies>
Modified: openejb/trunk/openejb/examples/polling-parent/polling-web/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/polling-parent/polling-web/pom.xml?rev=1335374&r1=1335373&r2=1335374&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/polling-parent/polling-web/pom.xml (original)
+++ openejb/trunk/openejb/examples/polling-parent/polling-web/pom.xml Tue May
8 08:09:54 2012
@@ -81,7 +81,7 @@
<artifactId>tomee-maven-plugin</artifactId>
<version>4.0.0-beta-3-SNAPSHOT</version>
<configuration>
- <tomeeClassifier>plus</tomeeClassifier>
+ <tomeeClassifier>jaxrs</tomeeClassifier>
</configuration>
</plugin>
</plugins>
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=1335374&r1=1335373&r2=1335374&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml (original)
+++ openejb/trunk/openejb/server/openejb-cxf-rs/pom.xml Tue May 8 08:09:54 2012
@@ -63,6 +63,14 @@
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>serializer</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -70,6 +78,7 @@
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${cxf.version}</version>
</dependency>
+ <!--
<dependency>
<groupId>xalan</groupId>
<artifactId>serializer</artifactId>
@@ -82,6 +91,7 @@
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
</dependency>
+ -->
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
Modified: openejb/trunk/openejb/tomee/apache-tomee/pom.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/pom.xml?rev=1335374&r1=1335373&r2=1335374&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/apache-tomee/pom.xml (original)
+++ openejb/trunk/openejb/tomee/apache-tomee/pom.xml Tue May 8 08:09:54 2012
@@ -129,6 +129,24 @@
</configuration>
</execution>
<execution>
+ <id>copy-tomcat-for-jaxrs</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>apache-tomcat</artifactId>
+ <version>${tomcat.bundle.version}</version>
+ <type>zip</type>
+ <outputDirectory>${jaxrs.work-dir}</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
<id>copy-tomcat-for-plus</id>
<phase>prepare-package</phase>
<goals>
@@ -205,6 +223,33 @@
</configuration>
</execution>
<execution>
+ <id>execute-jaxrs-installer</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>new commands.SetupCommand(this).execute()</source>
+ <properties>
+ <tomee.workdir>${jaxrs.work-dir}</tomee.workdir>
+ <tomee.webapp>tomee-jaxrs-webapp</tomee.webapp>
+ </properties>
+ <classpath>
+ <element>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>0.9.94</version>
+ </element>
+ <element>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.7.1</version>
+ <type>jar</type>
+ </element>
+ </classpath>
+ </configuration>
+ </execution>
+ <execution>
<id>execute-plus-installer</id>
<phase>prepare-package</phase>
<goals>
@@ -254,6 +299,21 @@
</goals>
</execution>
<execution>
+ <id>jaxrs</id>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/tomee-jaxrs.xml</descriptor>
+ </descriptors>
+ <attach>false</attach>
+ <appendAssemblyId>false</appendAssemblyId>
+ <finalName>apache-tomee-jaxrs-${project.version}</finalName>
+ </configuration>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ <execution>
<id>plus</id>
<phase>package</phase>
<configuration>
@@ -295,6 +355,16 @@
<classifier>webprofile</classifier>
</artifact>
<artifact>
+
<file>${project.build.directory}/apache-tomee-jaxrs-${project.version}.zip</file>
+ <type>zip</type>
+ <classifier>jaxrs</classifier>
+ </artifact>
+ <artifact>
+
<file>${project.build.directory}/apache-tomee-jaxrs-${project.version}.tar.gz</file>
+ <type>tar.gz</type>
+ <classifier>jaxrs</classifier>
+ </artifact>
+ <artifact>
<file>${project.build.directory}/apache-tomee-plus-${project.version}.zip</file>
<type>zip</type>
<classifier>plus</classifier>
@@ -322,6 +392,7 @@
<webprofile.work-dir>${project.build.directory}/webprofile-work-dir</webprofile.work-dir>
<plus.work-dir>${project.build.directory}/plus-work-dir</plus.work-dir>
+ <jaxrs.work-dir>${project.build.directory}/jaxrs-work-dir</jaxrs.work-dir>
</properties>
</project>
Added:
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-jaxrs.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-jaxrs.xml?rev=1335374&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-jaxrs.xml
(added)
+++ openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-jaxrs.xml
Tue May 8 08:09:54 2012
@@ -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.
+-->
+
+<!-- $Rev: 576067 $ $Date: 2007-09-16 03:17:08 -0700 (Sun, 16 Sep 2007) $ -->
+
+<assembly>
+ <id>tomee-jaxrs</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${jaxrs.work-dir}/apache-tomcat-${tomcat.version}</directory>
+ <outputDirectory>/apache-tomee-jaxrs-${project.version}</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>LICENSE</exclude>
+ <exclude>NOTICE</exclude>
+ <exclude>**/bin/**/*</exclude>
+ <exclude>**/lib/tomcat-annotations-api*.jar</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+
<directory>${project.basedir}/target/maven-shared-archive-resources/META-INF/</directory>
+ <outputDirectory>/apache-tomee-jaxrs-${project.version}</outputDirectory>
+ <includes>
+ <include>LICENSE</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+
<directory>${project.basedir}/src/main/resources/META-INF/jaxrs/</directory>
+ <outputDirectory>/apache-tomee-jaxrs-${project.version}</outputDirectory>
+ <includes>
+ <include>*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/target/classes</directory>
+
<outputDirectory>/apache-tomee-jaxrs-${project.version}/bin</outputDirectory>
+ <includes>
+ <include>service.*</include>
+ <include>TomEE.*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/target/classes</directory>
+
<outputDirectory>/apache-tomee-jaxrs-${project.version}/bin</outputDirectory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>${jaxrs.work-dir}/apache-tomcat-${tomcat.version}</directory>
+ <outputDirectory>/apache-tomee-jaxrs-${project.version}</outputDirectory>
+ <includes>
+ <include>**/bin/**/*</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ </fileSets>
+</assembly>
+
Modified:
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-plus.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-plus.xml?rev=1335374&r1=1335373&r2=1335374&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-plus.xml
(original)
+++ openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-plus.xml
Tue May 8 08:09:54 2012
@@ -20,7 +20,7 @@
<!-- $Rev: 576067 $ $Date: 2007-09-16 03:17:08 -0700 (Sun, 16 Sep 2007) $ -->
<assembly>
- <id>tomee-webprofile</id>
+ <id>tomee-plus</id>
<formats>
<format>tar.gz</format>
<format>zip</format>
Modified:
openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java?rev=1335374&r1=1335373&r2=1335374&view=diff
==============================================================================
---
openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java
(original)
+++
openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java
Tue May 8 08:09:54 2012
@@ -17,6 +17,7 @@
package org.apache.tomee.catalina;
+import java.net.URLClassLoader;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.loader.WebappClassLoader;
import org.apache.catalina.loader.WebappLoader;
@@ -53,7 +54,7 @@ public class TomEEWebappLoader extends W
@Override protected void startInternal() throws LifecycleException {
super.startInternal();
- final ClassLoader webappCl = super.getClassLoader();
+ final WebappClassLoader webappCl = (WebappClassLoader)
super.getClassLoader();
tomEEClassLoader = new TomEEClassLoader(appPath, appClassLoader,
webappCl);
try {
DirContextURLStreamHandler.bind(tomEEClassLoader,
getContainer().getResources());
@@ -63,13 +64,13 @@ public class TomEEWebappLoader extends W
}
}
- public static class TomEEClassLoader extends ClassLoader {
+ public static class TomEEClassLoader extends URLClassLoader {
private ClassLoader app;
- private ClassLoader webapp;
+ private WebappClassLoader webapp;
private String appPath;
- public TomEEClassLoader(final String appId, final ClassLoader appCl,
final ClassLoader webappCl) {
- super(webappCl); // in fact this classloader = webappclassloader
since we add nothing to this
+ public TomEEClassLoader(final String appId, final ClassLoader appCl,
final WebappClassLoader webappCl) {
+ super(webappCl.getURLs(), webappCl); // in fact this classloader =
webappclassloader since we add nothing to this
this.appPath = appId;
this.app = appCl; // only used to manage resources since
webapp.getParent() should be app
this.webapp = webappCl;
@@ -89,7 +90,7 @@ public class TomEEWebappLoader extends W
final Map<String, URL> urls = new HashMap<String, URL>();
- if (webapp instanceof WebappClassLoader && ((WebappClassLoader)
webapp).isStarted() || webapp.getParent() == null) { // we set a parent so if
it is null webapp was detroyed
+ if (webapp.isStarted() || webapp.getParent() == null) { // we set
a parent so if it is null webapp was detroyed
add(urls, app.getResources(name));
add(urls, webapp.getResources(name));
return new ArrayEnumeration(clear(urls.values()));