[jbosscache-commits] JBoss Cache SVN: r4859 - in pojo/trunk: src/main/release and 1 other directories.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Thu Dec 13 23:35:41 EST 2007
Author: jason.greene at jboss.com
Date: 2007-12-13 23:35:40 -0500 (Thu, 13 Dec 2007)
New Revision: 4859
Added:
pojo/trunk/src/main/release/bin/
pojo/trunk/src/main/release/bin/pojo-run
Modified:
pojo/trunk/assembly/all.xml
pojo/trunk/assembly/bin.xml
Log:
Add pojo-run utility
Modified: pojo/trunk/assembly/all.xml
===================================================================
--- pojo/trunk/assembly/all.xml 2007-12-14 03:53:27 UTC (rev 4858)
+++ pojo/trunk/assembly/all.xml 2007-12-14 04:35:40 UTC (rev 4859)
@@ -47,8 +47,7 @@
<directory>src/main/release</directory>
<outputDirectory/>
<includes>
- <include>**/*.txt</include>
- <include>**/*.xml</include>
+ <include>**/*</include>
</includes>
</fileSet>
Modified: pojo/trunk/assembly/bin.xml
===================================================================
--- pojo/trunk/assembly/bin.xml 2007-12-14 03:53:27 UTC (rev 4858)
+++ pojo/trunk/assembly/bin.xml 2007-12-14 04:35:40 UTC (rev 4859)
@@ -28,8 +28,7 @@
<directory>src/main/release</directory>
<outputDirectory/>
<includes>
- <include>**/*.txt</include>
- <include>**/*.xml</include>
+ <include>**/*</include>
</includes>
</fileSet>
Added: pojo/trunk/src/main/release/bin/pojo-run
===================================================================
--- pojo/trunk/src/main/release/bin/pojo-run (rev 0)
+++ pojo/trunk/src/main/release/bin/pojo-run 2007-12-14 04:35:40 UTC (rev 4859)
@@ -0,0 +1,75 @@
+#!/bin/sh
+DIRNAME=`dirname $0`
+POJO_HOME=`cd $DIRNAME/..; pwd`
+
+if [ $# -lt 1 ]; then
+ echo Utility which executes the JVM with properties needed by POJO Cache for load-time instrumentation.
+ echo
+ echo Usage:
+ echo "pojo-run [-classpath <classpath>] <main-class> [arguments...] "
+ echo " classpath: Classpath of your sourcefiles and all required libraries"
+ echo " main-class: Normal Java main class"
+ echo
+ echo Example:
+ echo " pojo-run -classpath myclasses org.foo.Main"
+ exit 1
+fi
+
+cygwin=false;
+case "`uname`" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+esac
+
+AOP_FILE="pojocache-aop.xml"
+AOP_PATH="$POJO_HOME/$AOP_FILE"
+
+if [ ! -f "$AOP_PATH" ]; then
+ AOP_PATH="$POJO_HOME/etc/META-INF/$AOP_FILE"
+
+ if [ ! -f "$AOP_PATH" ]; then
+ echo "Could not locate pojocache-aop.xml in $POJO_HOME or $POJO_HOME/etc/META-INF"
+ exit 1
+ fi
+fi
+
+POJO_CLASSPATH=.:$POJO_HOME/jbosscache-pojo.jar
+
+for i in $POJO_HOME/lib/*.jar
+do
+ POJO_CLASSPATH="$POJO_CLASSPATH:${i}"
+done
+
+while [ $# -ge 1 ]; do
+ case $1 in
+ "-classpath") POJO_CLASSPATH="$POJO_CLASSPATH:$2"; shift;;
+ *) args="$args \"$1\""; echo $1;;
+ esac
+ shift
+done
+
+
+#Check for cygwin and convert path if necessary
+if $cygwin; then
+ POJO_CLASSPATH=`cygpath --path --windows $POJO_CLASSPATH`
+fi
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+ if [ "x$JAVA_HOME" != "x" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+ else
+ JAVA="java"
+ fi
+fi
+
+#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
+
+# Execute the JVM
+eval "$JAVA" $JAVA_OPTS \
+ -javaagent:"$POJO_HOME/lib/jboss-aop.jar" \
+ -Djboss.aop.path="$AOP_PATH" \
+ -classpath "$POJO_CLASSPATH" \
+ "$args"
Property changes on: pojo/trunk/src/main/release/bin/pojo-run
___________________________________________________________________
Name: svn:executable
+ *
More information about the jbosscache-commits
mailing list