Community
Participate
Working Groups
To utilise the binary weaving capability of aspectj, it is currently necessary to jar up the class files that you want to weave into and pass the jar in on the -injars option to the compiler. This can be awkward and makes ANT scripts and IDE integration more difficult that it needs to be. It would be nice to replace the -injars option with a -inpath option that could cope with either jar files or directories (having a format very like 'classpath'). I'll attach the implementation to this bug report in a second :)
Created attachment 6711 [details] Patch for ajbrowser module.
Created attachment 6712 [details] Supercedes the previous patch - this contains all the patches in one attachment. There are several changes across aspectj, this zip contains the patches for the various modules *plus* some testdata for the new ajde testcase.
Will -inpath also include .properties and .xml and .dtd files? That is something a bit awkward as well, that my aspected jar cannot have any non-java files in it.
I want to clear this defect off my list, so lets pull together all the strands.... Comments from Wes on 15th Decemeber 2003: ================= Outstanding -inpath tasks mostly done: - Documentation - devguide updated - added to changes.html - ant doc updated - Verified (but not tested) the ANT task enhancements - Upgraded the harness for inpath testing For tests, the compiler's files attribute now interprets - source files as unflagged args - zip/jar files as injars, and - readable directories as inpath We still should test the ant support, provide a flag for all injars entries to be put on the inpath, and do more harness tests than the one in ajcHarnessTests.xml. Oh, and test inpath. Are resources supposed to be copied from inpath directories? Wes =====================
Just trying to page this back into my brain. The code to look at when examining the resource copying policy applied to inpath starts in: BcelWeaver.addJarFile()
Bug fixed. To confirm how it works. With the changes I have just committed - resources are not being copied across. They are not copied for 'javac' so they are not being copied for 'ajc'. If you need to copy them across in something like a build system, you have the choice between: - In ANT, follow the call to the AJC task with a call to the COPY task. - Package up your directories into jars and pass them in jar form to ajc on inpath - that will copy them through to the output.