JBoss.org Community Documentation
To run the aop precompiler from the command line you need all the aop jars on your classpath, and the class files you are instrumenting must have everything they would need to run in the java classpath, including themselves, or the precompiler will not be able to run.
The
jboss.aop.path
optional system property points to XML files that contain your
pointcut, advice bindings, and metadata definitions that the precompiler will use to instrument
the .class files. The property can have one or files it points to delimited by the operating
systems specific classpath delimiter (';' on windows, ':' on unix). Files or Directories can be specified.
If it is a directory, JBoss AOP will take all
aop.xml
files from that directory.
The
jboss.aop.class.path
optional system property points to all JARs or directories that
may have classes that are annotated as
@Aspect
(See Chapter "Annotated Bindings").
JBoss AOP will browse all classes in this path to see if they are annotated.
The property can have one or files it points to delimited by the operating
systems specific classpath delimiter (';' on windows, ':' on unix).
It is invoked as:
$java -classpath ... [-Djboss.aop.path=...] [-Djboss.aop.class.path=...] \ org.jboss.aop.standalone.Compiler <class files or directories>
In the /bin folder of the distribution we have provided batch/script files to make this easier. It includes all the aop libs for you, so you just have to worry about your files. The usage:
$ aopc <classpath> [-aoppath ...] [-aopclasspath ...] [-report] [-verbose] \ <class files or directories>+
classpath
- path to your classes and any jars your code depends on
The other parameters are the same as above.