diff options
Diffstat (limited to 'docs/sandbox/scripts/snippets.sh')
-rw-r--r-- | docs/sandbox/scripts/snippets.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/sandbox/scripts/snippets.sh b/docs/sandbox/scripts/snippets.sh new file mode 100644 index 000000000..76c60ca94 --- /dev/null +++ b/docs/sandbox/scripts/snippets.sh @@ -0,0 +1,21 @@ +#!/bin/sh
+# shell script snippets for AspectJ
+
+
+# @author Wes Isberg
+# START-SAMPLE scripts-weaveLibraries
+ASPECTJ_HOME="${ASPECTJ_HOME:-c:/aspectj-1.1.0}"
+ajc="$ASPECTJ_HOME/bin/ajc"
+
+# make system.jar by weaving aspects.jar into lib.jar and app.jar
+$ajc -classpath "$ASPECTJ_HOME/lib/aspectjrt.jar" \
+ -aspectpath aspects.jar" \
+ -injars "app.jar;lib.jar" \
+ -outjar system.jar
+
+# XXX copy any resources from input jars to output jars
+
+# run it
+java -classpath "aspects.jar;system.jar" com.company.app.Main
+
+# END-SAMPLE scripts-weaveLibraries
|