Community
Participate
Working Groups
The following file builds inside the weaver module without adding additional dependencies. This allows it to be included in aspectjweaver.jar, to support command line weaving without requiring all of ajdt.core (i.e., you can get a 1.5 megabyte jar to do the work instead of a 4.5 megabyte jar). Much of the code in this file is copied in from other packages, to avoid dragging in duplicate code. It would be better refactored into a common module, like util, so that ajdt core and weaver could both use the same code. I also created some standalone tests and modified the binary weaving tests for declare parents to allow using this command line weaver as well as ajc (all of which pass). I will attach a zip of the two test cases. If there's interest in integrating this contribution, I'd be glad to learn more about the AspectJ test harness and integrate these into it.
Created attachment 28494 [details] the command line weaver implementation
Created attachment 28495 [details] patch to org.aspectj.ajdt.core to allow an additional test of declare parents using the jar weaver
Created attachment 28496 [details] zip of 2 test cases: I compared the output of ajc and the command line weaver for various combinations of running these please contact me if you are interested in integrating this contribution and want a better explanation of these tests
I'd like to get this in for 1.5.0...
will also need packaging in bin, testing cross-platform, adding to docs etc....
Adrian moved it to 1.5.1 - I should probably add some comments as to why. After going through the patch - we need to sort out the duplication of option parsing before it goes in and rework the test stuff quite a bit (possibly enhancing the harness to support it) (Ron eluded to some of this in his original comments when it was raised). Given that, and the doc/packaging required, I'd rather we look at it for 1.5.1 and do it properly - hope thats OK Ron.
I have an updated version of the patch that works with 1.5.1a and more recent dev builds and adds a few more of the ajc features. If you let me know when you are ready to work on this, I can upload the latest at the time. Naturally, the best way to integrate command line weaving would be to refactor out common parsing functionality so there's shared code in a shared module instead of duplicated code.
depends on the table driven option parsing feature. We dont want to duplicate option parsing here.
unsetting the target field which is currently set for something already released