From: ehilsdal Date: Tue, 9 Sep 2003 18:26:18 +0000 (+0000) Subject: added in building architecture for turoial exercises X-Git-Tag: V1_1_1~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ab504b46ba5585a43018026976a44a5ccefcfe7c;p=aspectj.git added in building architecture for turoial exercises --- diff --git a/docs/teaching/exercises/README.txt b/docs/teaching/exercises/README.txt new file mode 100755 index 000000000..d06249316 --- /dev/null +++ b/docs/teaching/exercises/README.txt @@ -0,0 +1,92 @@ +AspectJ Figures Exercises +------------------------------ + +THIS FILE IS OUT-OF-DATE !!! (2003-3-17) + +These exercises are designed to be used with AspectJ 1.0.6. + +THEY MUST NOT BE DISTRIBUTED ELECTRONICALLY WITHOUT THINKING FIRST!!! +There may be licence issues with just sticking the junit jar in there +that I don't understand. + +To build distribution zips, use ant -f build.xml. This will create + + EV-exercises.zip -- the contents of these exercises, minus AspectJ + EV-answers.zip -- some answers to these exercises. + EV-setup.zip -- the exercises bundled with AspectJ + EV-allcontent.zip -- the exercises bundled with the answers + + +If you don't want to be bothered with specifying where AspectJ is, +feel free to just do ant -f build.xml answers.zip. By default it will +build both exercises and answers. + +------------------------------ +Required environment + +In order to actually do the exercises, the three very important files +to have are: + + EV-exercises.zip + aspectj-tools-1.0.6.jar + + +It is almost certainly a good idea to hope that Java is already +installed on the students' systems, but to provide two installers +(windows and linux) anyway. + + http://java.sun.com + +You may want to also include the rest of the AspectJ installers as +well, but that might be a bit of a distraction + + http://aspectj.org/dl + +These require junit.jar. I've included a copy in with the two zip +files, but they might want to be refreshed every now and again. + + http://junit.org + + +------------------------------ +Printing + +It would be really nice to have an automated solution to generate the +documents, but no such luck. + +* index.html should print out with useful page breaks. It should be + separated into four chunks if possible. + +* answers in four chunks. + +* quick reference sheets. + +Remember to have a one-sided copy of everything as a separate +clean-copy. + + +------------------------------ +Distribution + + /j2sdk-1_4_1_01-linux-i586.bin + /j2sdk-1_4_1_01-windows-i586.exe + /exercises.zip containing: + aj-EV/src/figures.zip + aj-EV/src/aspectj-tools-1.0.6.jar + aj-EV/src/aspectj-docs-1.0.6.jar + aj-EV/ + aj-EV/aspectj/ + aj-EV/aspectj/ + aj-EV/setpaths + aj-EV/setpaths.bat + +/bin/ajc, are edited to make sure that JAVA_HOME is used, as the +defaults will almost certainly be wrong. setpaths scripts do what +they look like they do. All six of these scripts are stored in +scripts under CVS. + +---- Instructors + +Since the only difference is the answers, just overwrite the +extraction directory with answers.zip. + diff --git a/docs/teaching/exercises/build.xml b/docs/teaching/exercises/build.xml index faf523754..7793b4d19 100755 --- a/docs/teaching/exercises/build.xml +++ b/docs/teaching/exercises/build.xml @@ -1,115 +1,119 @@ - + + + - Build the exercises we do at various conferences + Build a CD image containing AspectJ exercises. - - + - - + + + + + + + + + + + + + + - + + + + + + - - - - - + + + + + + + - - - + + - + + + + + + - - - + + - + - - - + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + - + - diff --git a/docs/teaching/exercises/index.html b/docs/teaching/exercises/index.html index 0e381b3c3..d1ec1b4fd 100644 --- a/docs/teaching/exercises/index.html +++ b/docs/teaching/exercises/index.html @@ -4,7 +4,7 @@ -

AspectJ Exercises

+

Advanced Aspect-Oriented Programming with AspectJ

Organization

diff --git a/docs/teaching/exercises/install.txt b/docs/teaching/exercises/install.txt new file mode 100755 index 000000000..ccb2b9e71 --- /dev/null +++ b/docs/teaching/exercises/install.txt @@ -0,0 +1,63 @@ +0. Install + + Now get the directory "aj-@aj.event@/". Just copy the + "aj-@aj.event@/" directory from the provided CD. + + If you're running a Windows machine, we recommend you copy into + "c:\". If you're running your favorite Unix (we've had success under + Linux and MacOS X), we recommend you install into "~\". + +1. Configure + + Our installation is fairly well self-contained, but it does need to know + where Java lives. To do this you must set the environment variable named + JAVA_HOME. This variable should point to something like + + c:\apps\jdk1.3.1_04 + /usr/java + /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home + + depending on your system. You may either do this globally, or you may + edit the appropriate setpaths script: + + setpaths.bat (under Windows) + setpaths.sh (if you run bash/sh/ksh, like most Linux setups) + setpaths.csh (if you run csh, like most MacOS X setups) + + Also, if you installed into a directory other than "c:\" or "~/", then you + need to change the EXTRACTION environment variable in the setpaths script. + +2. Test + + Open a new command shell and change to the "aj-@aj.event@/" directory. + + We have provided a "setpaths" script to set permissions and various paths + variables, so run this script: + + > setpaths.bat (under Windows) + > source setpaths.sh (if you run bash/sh/ksh, like most Linux setups) + > source setpaths.csh (if you run csh, like most MacOS X setups) + + You must remember to run this script every time you open a new command + shell. + + Now, compile the core system with ajc: + + > ajc -argfile guibase.lst + + This should compile the figures application (source code in the figures + directory) as well as a single unit test (source code in the tests + directory). + + See if the compile was successful by running the gui figures app you just + compiled: + + > java figures.gui.Main + + And, after quitting out of the gui figures app, run the unit test: + + > java tests.Test + .... + Time: 0.076 + + OK (4 tests) diff --git a/docs/teaching/exercises/junit.jar b/docs/teaching/exercises/junit.jar new file mode 100755 index 000000000..674d71e89 Binary files /dev/null and b/docs/teaching/exercises/junit.jar differ diff --git a/docs/teaching/exercises/scripts/ajbrowser b/docs/teaching/exercises/scripts/ajbrowser new file mode 100755 index 000000000..2f804efda --- /dev/null +++ b/docs/teaching/exercises/scripts/ajbrowser @@ -0,0 +1,3 @@ +#!/bin/sh + +"$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjtools.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH" -Xmx64M org.aspectj.tools.ajbrowser.Main "$@" diff --git a/docs/teaching/exercises/scripts/ajbrowser.bat b/docs/teaching/exercises/scripts/ajbrowser.bat new file mode 100755 index 000000000..dd717ccae --- /dev/null +++ b/docs/teaching/exercises/scripts/ajbrowser.bat @@ -0,0 +1,9 @@ +@echo off +if exist "%JAVA_HOME%\bin\java.exe" goto haveJava +if exist "%JAVA_HOME%\bin\java.bat" goto haveJava +if exist "%JAVA_HOME%\bin\java" goto haveJava +echo java does not exist as %JAVA_HOME%\bin\java +echo please fix the JAVA_HOME environment variable + +:haveJava +"%JAVA_HOME%\bin\java" -classpath "%ASPECTJ_HOME%\lib\aspectjtools.jar;%JAVA_HOME%\lib\tools.jar;%CLASSPATH%" -Xmx64M org.aspectj.tools.ajbrowser.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/docs/teaching/exercises/scripts/ajc b/docs/teaching/exercises/scripts/ajc new file mode 100755 index 000000000..f8f45ee35 --- /dev/null +++ b/docs/teaching/exercises/scripts/ajc @@ -0,0 +1,3 @@ +#!/bin/sh + +"$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjtools.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH" -Xmx64M org.aspectj.tools.ajc.Main "$@" diff --git a/docs/teaching/exercises/scripts/ajc.bat b/docs/teaching/exercises/scripts/ajc.bat new file mode 100755 index 000000000..ca51b07be --- /dev/null +++ b/docs/teaching/exercises/scripts/ajc.bat @@ -0,0 +1,9 @@ +@echo off +if exist "%JAVA_HOME%\bin\java.exe" goto haveJava +if exist "%JAVA_HOME%\bin\java.bat" goto haveJava +if exist "%JAVA_HOME%\bin\java" goto haveJava +echo java does not exist as %JAVA_HOME%\bin\java +echo please fix the JAVA_HOME environment variable + +:haveJava +"%JAVA_HOME%\bin\java" -classpath "%ASPECTJ_HOME%\lib\aspectjtools.jar;%JAVA_HOME%\lib\tools.jar;%CLASSPATH%" -Xmx64M org.aspectj.tools.ajc.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/docs/teaching/exercises/scripts/setpaths.bat b/docs/teaching/exercises/scripts/setpaths.bat new file mode 100755 index 000000000..c750e1d10 --- /dev/null +++ b/docs/teaching/exercises/scripts/setpaths.bat @@ -0,0 +1,15 @@ +@echo off + +rem Change this to be the full path for this directory +set EXTRACTION=c:\aj-@aj.event@ + +if exist "%JAVA_HOME%\bin\java.exe" goto haveJava +if exist "%JAVA_HOME%\bin\java.bat" goto haveJava +if exist "%JAVA_HOME%\bin\java" goto haveJava +echo java does not exist as %JAVA_HOME%\bin\java +echo please fix the JAVA_HOME environment variable + +:haveJava +set ASPECTJ_HOME=%EXTRACTION%\aspectj +set PATH=%ASPECTJ_HOME%\bin;%PATH% +set CLASSPATH=.;%ASPECTJ_HOME%\lib\aspectjrt.jar;%EXTRACTION%\junit.jar diff --git a/docs/teaching/exercises/scripts/setpaths.csh b/docs/teaching/exercises/scripts/setpaths.csh new file mode 100755 index 000000000..88482de8b --- /dev/null +++ b/docs/teaching/exercises/scripts/setpaths.csh @@ -0,0 +1,11 @@ +# this file should be sourced, NOT executed + +# Change this to be the full path for this directory +set EXTRACTION=$HOME/aj-@aj.event@ + +set ASPECTJ_HOME=$EXTRACTION/aspectj +set PATH=$ASPECTJ_HOME/bin:$PATH +set CLASSPATH=.:$ASPECTJ_HOME/lib/aspectjrt.jar:$EXTRACTION/junit.jar + +chmod a+x $ASPECTJ_HOME/bin/ajc +chmod a+x $ASPECTJ_HOME/bin/ajbrowser diff --git a/docs/teaching/exercises/scripts/setpaths.sh b/docs/teaching/exercises/scripts/setpaths.sh new file mode 100755 index 000000000..f54f3dfaf --- /dev/null +++ b/docs/teaching/exercises/scripts/setpaths.sh @@ -0,0 +1,18 @@ +# this file should be sourced, NOT executed + +# Change this to be the full path for this directory +EXTRACTION=$HOME/aj-@aj.event@ + +if [ "$JAVA_HOME" = "" ] +then + echo Please remember to manually set $JAVA_HOME to + echo the location of your java installation +fi + +export ASPECTJ_HOME=$EXTRACTION/aspectj +export PATH=$ASPECTJ_HOME/bin:$PATH +export CLASSPATH=.:$ASPECTJ_HOME/lib/aspectjrt.jar:$EXTRACTION/junit.jar + +chmod a+x $ASPECTJ_HOME/bin/ajc +chmod a+x $ASPECTJ_HOME/bin/ajbrowser +