You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/01/31 23:48:12 UTC
svn commit: r1238846 - in /openejb/trunk/openejb/tomee/apache-tomee: pom.xml
src/main/assembly/tomee-plus.xml src/main/assembly/tomee-webprofile.xml
src/main/resources/tomee.sh
Author: rmannibucau
Date: Tue Jan 31 22:48:12 2012
New Revision: 1238846
URL: http://svn.apache.org/viewvc?rev=1238846&view=rev
Log:
TOMEE-132 basic tomee script to use the deployer
Added:
openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.sh
Modified:
openejb/trunk/openejb/tomee/apache-tomee/pom.xml
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-plus.xml
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml
Modified: openejb/trunk/openejb/tomee/apache-tomee/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/pom.xml?rev=1238846&r1=1238845&r2=1238846&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/apache-tomee/pom.xml (original)
+++ openejb/trunk/openejb/tomee/apache-tomee/pom.xml Tue Jan 31 22:48:12 2012
@@ -93,6 +93,20 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>filter-resources</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
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=1238846&r1=1238845&r2=1238846&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 Jan 31 22:48:12 2012
@@ -41,35 +41,43 @@
</excludes>
</fileSet>
<fileSet>
- <directory>${plus.work-dir}/apache-tomcat-${tomcat.version}</directory>
- <outputDirectory>/apache-tomee-plus-${project.version}</outputDirectory>
- <includes>
- <include>**/bin/**/*</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
- <fileSet>
- <directory>${basedir}/target/maven-shared-archive-resources/META-INF/</directory>
+ <directory>${project.basedir}/target/maven-shared-archive-resources/META-INF/</directory>
<outputDirectory>/apache-tomee-plus-${project.version}</outputDirectory>
<includes>
<include>LICENSE</include>
</includes>
</fileSet>
<fileSet>
- <directory>${basedir}/src/main/resources/META-INF/plus/</directory>
+ <directory>${project.basedir}/src/main/resources/META-INF/plus/</directory>
<outputDirectory>/apache-tomee-plus-${project.version}</outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
- <fileSet>
- <directory>${basedir}/src/main/resources/</directory>
+ <fileSet>
+ <directory>${project.basedir}/target/classes</directory>
<outputDirectory>/apache-tomee-plus-${project.version}/bin</outputDirectory>
<includes>
<include>service.*</include>
<include>TomEE.*</include>
</includes>
</fileSet>
+ <fileSet>
+ <directory>${project.basedir}/target/classes</directory>
+ <outputDirectory>/apache-tomee-plus-${project.version}/bin</outputDirectory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>${plus.work-dir}/apache-tomcat-${tomcat.version}</directory>
+ <outputDirectory>/apache-tomee-plus-${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-webprofile.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml?rev=1238846&r1=1238845&r2=1238846&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml (original)
+++ openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml Tue Jan 31 22:48:12 2012
@@ -41,26 +41,42 @@
</excludes>
</fileSet>
<fileSet>
- <directory>${webprofile.work-dir}/apache-tomcat-${tomcat.version}</directory>
+ <directory>${basedir}/target/maven-shared-archive-resources/META-INF/</directory>
<outputDirectory>/apache-tomee-webprofile-${project.version}</outputDirectory>
<includes>
- <include>**/bin/**/*</include>
+ <include>LICENSE</include>
</includes>
- <fileMode>0755</fileMode>
</fileSet>
<fileSet>
- <directory>${basedir}/target/maven-shared-archive-resources/META-INF/</directory>
+ <directory>${basedir}/src/main/resources/META-INF/webprofile/</directory>
<outputDirectory>/apache-tomee-webprofile-${project.version}</outputDirectory>
<includes>
- <include>LICENSE</include>
+ <include>*</include>
</includes>
</fileSet>
<fileSet>
- <directory>${basedir}/src/main/resources/META-INF/webprofile/</directory>
+ <directory>${project.basedir}/target/classes</directory>
+ <outputDirectory>/apache-tomee-webprofile-${project.version}/bin</outputDirectory>
+ <includes>
+ <include>service.*</include>
+ <include>TomEE.*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/target/classes</directory>
+ <outputDirectory>/apache-tomee-webprofile-${project.version}/bin</outputDirectory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>${webprofile.work-dir}/apache-tomcat-${tomcat.version}</directory>
<outputDirectory>/apache-tomee-webprofile-${project.version}</outputDirectory>
<includes>
- <include>*</include>
+ <include>**/bin/**/*</include>
</includes>
+ <fileMode>0755</fileMode>
</fileSet>
</fileSets>
</assembly>
Added: openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.sh
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.sh?rev=1238846&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.sh (added)
+++ openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.sh Tue Jan 31 22:48:12 2012
@@ -0,0 +1,88 @@
+#! /bin/sh
+
+# 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="${openejb.version}"
+port=8080
+
+# DEBUG=
+DEBUG="-Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
+
+# get java
+cygwin=false
+darwin=false
+os400=false
+case "`uname`" in
+ CYGWIN*) cygwin=true;;
+ Darwin*) darwin=true;;
+esac
+
+if $cygwin; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
+ [ -n "$TOMEE_HOME" ] && TOMEE_HOME=`cygpath --unix "$TOMEE_HOME"`
+ [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"`
+ [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+if $cygwin; then
+ JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+ JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
+ TOMEE_HOME=`cygpath --absolute --windows "$TOMEE_HOME"`
+ CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
+ CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+PRG="$0"
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+PRGDIR=`dirname "$PRG"`
+[ -z "$TOMEE_HOME" ] && TOMEE_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
+
+. "$TOMEE_HOME"/bin/setclasspath.sh
+
+if [ -d $JAVA_HOME ]; then
+ JAVA=$JAVA_HOME"/bin/java"
+else
+ JAVA="java"
+fi
+
+CP=""
+for i in $TOMEE_HOME/webapps/tomee/lib/*.jar; do
+ CP="$CP:$i"
+done
+
+# execute the command
+if [ "$1" = "deploy" ] || [ "$1" = "undeploy" ]; then
+ if [ $# -eq 2 ]; then
+ echo "${1}ing $2"
+ $JAVA $DEBUG -Dopenejb.base="$TOMEE_HOME" -cp "\"$CP\"" org.apache.openejb.cli.Bootstrap $1 -s http://localhost:$port/tomee/ejb $2
+ else
+ echo "Usage: <tomee.sh> $1 <path>"
+ fi
+else
+ echo "Usage:"
+ echo " deploy -> <tomee.sh> deploy <path>"
+ echo " undeploy -> <tomee.sh> undeploy <path>"
+fi