|RE: [aspectj-users] Configure IAJC Ant task to ignore already weaved-in.class files|
I’d recommend structuring your build so that you keep the unwoven classes in one place and the woven ones elsewhere. That way you can always reweave the unwoven version. On the other hand, I thought AspectJ is supposed to reweave classes properly, i.e., unweave and then reweave, as many times as you want. Isn’t this a weaver bug?
aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Alec Lebedev
I am getting the following JVM exception when running the classes that have been weaved-in with the IAJC Ant target multiple times.
“java.lang.ClassFormatError: Repetitive field name/signature in class file com/mycompany/MyClass”
The reason why sometimes I end up running IAJC against the same compiled code multiple times is that I don’t know if the code has changed since the last time IAJC was run. The only way I was able to solve the problem is by recompiling all my classes before running IAJC Ant target, which is very time-consuming.
Is there a way to configure IAJC Ant task to only weave an aspect in a .class file if this aspect has not been weaved in the file before?