AspectJ + WTK 2.1 + Ant

  • Wastel79


    at the moment I am writting an Aspect with AspectJ for usage in a WTK 2.1 project. I have to use Proguard or another obfuscator for the jad-file and at the moment I have the problem, that I don't know where to start in writting such an Ant file. I searched for hours for information to this problem, but I couldn't find any. Especially I don't know if it is possible to develope an Aspect in AspectJ for a WTK 2.1 project, on which I have to run an obfuscator and that all together done by Ant. The next problem is, that I read in the web, that the build-files for WTK 2.1 project changed very strongly and till now I couldn't find any information. I find some information to the Antenna project, which seems to be very easy in usage, but in my opinion in my case, when I want to use an Aspect, using Antenna is not possible, cause for Aspects I have to use the ajc compiler instead of the standard javac compiler (every java-programm could be compiled using ajc).
    In my opinion it should be possible and the steps to do are the following:
    1. run the ajc-compiler on the Aspect-files and the project on which I wanna try to apply the aspect. This process results in.class-files, which includes the aspect-functionality.
    2. from the .class file create the jar file together with the jad.
    3. run the obfuscator on the "normal" jar-file to reduce size and solve some problems with names.

    What do you think on that? Is it possible? Can you give me some advices where to start and what to do first?

    Thanks tons in advance.