[jboss-cvs] JBossAS SVN: r79706 - projects/aop/trunk/aop/src/resources/bin.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Oct 18 15:32:04 EDT 2008
Author: flavia.rainone at jboss.com
Date: 2008-10-18 15:32:04 -0400 (Sat, 18 Oct 2008)
New Revision: 79706
Modified:
projects/aop/trunk/aop/src/resources/bin/aopc.sh
Log:
[JBAOP-668] Fixed aop/src/resources/bin/aopc.sh script.
Modified: projects/aop/trunk/aop/src/resources/bin/aopc.sh
===================================================================
--- projects/aop/trunk/aop/src/resources/bin/aopc.sh 2008-10-18 18:20:45 UTC (rev 79705)
+++ projects/aop/trunk/aop/src/resources/bin/aopc.sh 2008-10-18 19:32:04 UTC (rev 79706)
@@ -2,21 +2,21 @@
usage(){
- echo Batch file for running the aop precopiler
+ echo Batch file for running the aop precompiler
echo Usage:
- echo aopc.sh [-aoppath path_to_aop.xml [-aopclasspath path_to_annotated] [-report] [-verbose] dir_or_file+
+ echo aopc.sh [-aoppath path_to_aop.xml] [-aopclasspath path_to_annotated] [-report] [-verbose] dir_or_file+
echo
echo classpath: Classpath of your sourcefiles and all required libraries
echo
- echo path_to_.aop.xml: Path to your *-aop.xml files. Use colon as separator if you have more than one
+ echo path_to_.aop.xml: Path to your *-aop.xml files. Use colon as separator if you have more than one
echo
- echo path_to_annotated Path to jars/directories that have annotated aspects. Use colon as separator if you have more than one.
+ echo path_to_annotated Path to jars/directories that have annotated aspects. Use colon as separator if you have more than one
echo
echo dir_or_file: Directory containing files to be aop precompiled
echo
echo -verbose: Specify if you want verbose output
echo
- echo -report: If specified, classes do not get instrumented. Instead you get an xml file containing the bindings applied.
+ echo -report: If specified, classes do not get instrumented. Instead you get an xml file containing the bindings applied
exit 1
}
@@ -31,69 +31,69 @@
if [ "x$3" = "x" ]; then
usage
fi
-if [ "x$4" = "x" ]; then
+if [ "$1" = "$3" ]; then
usage
fi
-if [ "$2" = "$4" ]; then
- usage
-fi
-USER_CLASSPATH=$1
-
AOPPATH=
AOPCLASSPATH=
-if [ "$2" = "-aoppath" ]; then
- AOPPATH=-Djboss.aop.path=$3
- FILESTART=3
+if [ "$1" = "-aoppath" ]; then
+ AOPPATH=-Djboss.aop.path=$2
+ FILESTART=2
fi
-if [ "$4" = "-aoppath" ]; then
- if [ "x$5" = "x" ]; then
+if [ "$3" = "-aoppath" ]; then
+ if [ "x$4" = "x" ]; then
usage
fi
- AOPPATH=-Djboss.aop.path=$5
- FILESTART=5
+ AOPPATH=-Djboss.aop.path=$4
+ FILESTART=4
fi
-if [ "$2" = "-aopclasspath" ]; then
- AOPCLASSPATH=-Djboss.aop.class.path=$3
- FILESTART=3
+if [ "$1" = "-aopclasspath" ]; then
+ AOPCLASSPATH=-Djboss.aop.class.path=$2
+ FILESTART=2
fi
-if [ "$4" = "-aopclasspath" ]; then
- if [ "x$5" = "x" ]; then
+if [ "$3" = "-aopclasspath" ]; then
+ if [ "x$4" = "x" ]; then
usage
fi
- AOPCLASSPATH=-Djboss.aop.class.path=$5
- FILESTART=5
+ AOPCLASSPATH=-Djboss.aop.class.path=$4
+ FILESTART=4
fi
-AOPC_CLASSPATH=../lib/javassist.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-aop-client.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-reflect.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-mdr.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-logging-log4j.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-logging-spi.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-standalone-aspect-library.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/log4j.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/pluggable-instrumentor.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-aop.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/jboss-common-core.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:../lib/trove.jar
-AOPC_CLASSPATH=$AOPC_CLASSPATH:$USER_CLASSPATH
+CURRENT_DIR=$(dirname $(which $0));
+AOPC_CLASSPATH=$CURRENT_DIR/../lib/javassist.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-aop-client.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-reflect.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-mdr.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-logging-log4j.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-logging-spi.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-standalone-aspect-library.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/log4j.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/pluggable-instrumentor.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-aop.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/jboss-common-core.jar
+AOPC_CLASSPATH=$AOPC_CLASSPATH:$CURRENT_DIR/../lib/trove.jar
+
+echo $AOP_CLASSPATH
+
CTR=0
for param in $*; do
-
+ echo $param
+ echo $CTR
CTR=`expr $CTR + 1`
if [ $CTR -gt $FILESTART ]; then
ARGS_AND_FILES=$ARGS_AND_FILES" "$param
+ AOPC_CLASSPATH=$AOPC_CLASSPATH:$param
fi
done
@@ -102,6 +102,6 @@
AOPC_CLASSPATH=`cygpath --path --windows $AOPC_CLASSPATH`
fi
-
+echo $java -classpath $AOPC_CLASSPATH $AOPPATH $AOPCLASSPATH org.jboss.aop.standalone.Compiler $ARGS_AND_FILES
java -classpath $AOPC_CLASSPATH $AOPPATH $AOPCLASSPATH org.jboss.aop.standalone.Compiler $ARGS_AND_FILES
More information about the jboss-cvs-commits
mailing list