[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] aspectj ant build issue

Hello,

I have changed the directory structure for our main project and I have
come upon a strange issue.  I would like some advice on next steps for my
debugging effort.  The old code was using a very basic Logging aspect that
was working fine.  However, the advice does not seem to be working any
longer.  So I ran javap on the old and new aspect class files and they are
identical.  Then I ran javap on a class affected by the advice in the old
build and again with the new built class (assuming it should be affected
again since the aspect is identical and the source for the classes are
idental).  The aspect code only shows up in the old build.  So now I'm
confused, I have the exact same aspect in a different tree but it's no
longer working.  The only change was the directory structures so I
attempted to create a super build with everything in one directory for
debugging.  Still, no dice...  

I posted the above to the wrong email group but I got some advice... Use a graphical tool.  So I opened up ajbrowser and had it do the compiling instead.  I used the same classpath, source dir and destination directory as what the ant build was doing.  Lo and behold, it added the aspects where I expected.  So I deleted the classes again and tried to run the ant script again (appears to be the same parameters) and that still doesn't correctly introduce the aspects.  I used verbose true flag and I do see messages like the following which lead me to believe that iajc is being called correctly:

     [iajc] compiling D:\GCC-Build\PVCS-AJC-NEW\src\all\com\hsbc\gcc\tws\valueob
ject\TransferEntryDetailsValue.java
     [iajc] compiling D:\GCC-Build\PVCS-AJC-NEW\src\all\com\hsbc\gcc\tws\valueob
ject\TransferEntryHeaderVO.java
     [iajc] compiling D:\GCC-Build\PVCS-AJC-NEW\src\all\com\hsbc\gcc\tws\valueob
ject\TransferEntryRemarksValue.java
     [iajc] compiling D:\GCC-Build\PVCS-AJC-NEW\src\all\com\hsbc\gcc\tws\valueob
ject\TransferEntrySourceDestValue.java
     [iajc] compiling D:\GCC-Build\PVCS-AJC-NEW\src\all\com\hsbc\gcc\tws\valueob
ject\TransferEntrySourceValue.java
     [iajc] compiling D:\GCC-Build\PVCS-AJC-NEW\src\all\com\hsbc\gcc\tws\valueob
     

     [iajc] DetailsVO), UnwovenClassFile(D:\GCC-Build\PVCS-AJC-NEW\classes\all\c
om\hsbc\gcc\tws\ejb\DollarDepositLocal.class, com.hsbc.gcc.tws.ejb.DollarDeposit
Local), UnwovenClassFile(D:\GCC-Build\PVCS-AJC-NEW\classes\all\com\hsbc\gcc\gpm\
formbean\MiscCodeMaintainenceForm.class, com.hsbc.gcc.gpm.formbean.MiscCodeMaint
ainenceForm), UnwovenClassFile(D:\GCC-Build\PVCS-AJC-NEW\classes\all\com\hsbc\gc
c\tws\ejb\TradeInquiryEJB.class, com.hsbc.gcc.tws.ejb.TradeInquiryEJB), UnwovenC
lassFile(D:\GCC-Build\PVCS-AJC-NEW\classes\all\com\hsbc\gcc\tpm\valueobject\Issu
esFeatureVO.class, com.hsbc.gcc.tpm.valueobject.IssuesFeatureVO)](world=true)

Any suggestions on what I can do next to
determine why the aspect is no longer getting picked up correctly in the ant script?

This is the ant build command that is running:
	<iajc sourceroots="${bprop.build.src.all}"
		destdir="${bprop.build.classes.all}"
		classpath="${bprop.build.classpath.ajc};${bprop.build.classpath.all}"
		debug="on"
		deprecation="off"
		verbose="true"/>

build.src.all = the directory where I now have all the source together (I verified that Logging.aj is there)
build.classes.all= the directory to place the generated classes (This directory is what I am running javap against to determine the above differences)
build.classpath.ajc= where aspectjtools.jar and aspectjrt.jar are
build.classpath.all = Support classpath

I've printed out the above variables to view the contents as well and they are exactly as expected.  Oh yes, and I've cleaned out the new bulid
structure a million times as
well to ensure it was recompiling everything.  I even tried to switch the classpath order "just in case".  Where do I go from here?

Any ideas on what could have gone wrong all of a sudden?  What can I do to continue to debug?  The source files were compared on the aspects and 1 expected aspectized class and they are the same.

Please advise...djsuarez