Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] ajc 1.6.6 -> 1.6.7+ behavior changes ?

Hi Andy.

I have looked into this a little more and noticed that the build within Eclipse Luna with AJDT works nicely, but fails with AspectJ Maven Plugin and on the command line via ajc.bat. So this might be a clue what it going wrong if you can answer one question: What does ADJT differently in comparison to Ajc with regards to build order or other relevant factors?

I have also noticed that if I remove the three Aspect files
  - GlyphCreation.aj
  - GlyphReplication.aj
  - VirtualSpaceReplication.aj
from zvtm-cluster, the module compiles fine. This is because these aspects rely on ObjIdIntroduction.aj being woven first as they expect the introduced methods to be present in the target classes from module zvtm-core.

I also tried to replicate a minimal sample with a Java project and an AspectJ project having the Java project on its inpath. The AspectJ project has three aspects which rely on each other's methods being present. It does not show any errors during compilation from either Eclipse or command line though. So probably you need to analyse the real project. To me it definitely looks like a bug.

Regards
-- 
Alexander Kriegisch
http://scrum-master.de


Andy Clement schrieb am 08.04.2015 22:20:

> If there is one ajc, yep. I'm afraid I haven't had a chance to dig further into this yet.
> 
> cheers
> 
> Andy
> 
> 
> On 6 April 2015 at 12:34, Romain Primet <romain.primet@xxxxxxxxx <mailto:romain.primet@xxxxxxxxx> > wrote:
>> 
>> > For a particular compilation we collect up all the aspects we know about. We then apply all the aspects affecting the type structure (inter type declarations, declare parents), then later we apply the advice.
>> 
>> > If you are describing a two step process where a compile step is relying on something done via ITD in a later compile step, that is a bit dodgy, but it might work due to reweaving. Since when the ITDs are applied in that second compile we revert all classes back to their pre-weaving state and apply the new aspects alongside the old aspects - effectively we are discarding whatever the initial compile did.
>> 
>>  Given that there is only one invocation of ajc in the build process, I guess I'm in the former case ?
>> 
>> Cheers
>> 
>> Romain


Back to the top