Skip to main content

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

You say you changed the directory structure, does this mean package
names changed as well?
Does this perhaps invalidate some pointcut definitions?

Frank

-----Original Message-----
From: aspectj-users-admin@xxxxxxxxxxx
[mailto:aspectj-users-admin@xxxxxxxxxxx] On Behalf Of
David.Suarez@xxxxxxxxxxx
Sent: Friday, January 23, 2004 12:39 PM
To: aspectj-users@xxxxxxxxxxx
Cc: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] aspectj ant build issue



Looks like it's not my ant script specificly that is causing the issue.
I have done the same again, this time calling the ajc compiler directly.
I copied the classpath from AJC Tools-Options-Classpath and set it in my
environment.  I am using the output path from ajc as the destination
directory.  That left me with the following command-line:

F:\j2sdk1.4.1_02\bin\java -Xmx128M org.aspectj.tools.ajc.Main
-sourceroots D:\GCC-Build\PVCS-AJC-NEW\src\all -d
D:\GCC-Build\PVCS-AJC-NEW\classes\all

Using the command-line directly, the aspect weaving did not occur
either.

I'm sure I am missing something because it was working previously.  Have
no clue what though.  Does the above give anyone ideas on what can be
wrong or how I can go about debugging further?  I think I'm out of
ideas...

Thanks for the help.

Regards...djsuarez




davidsuarez@xxxxxxxxxxxxx@eclipse.org on 23 Jan 2004 11:55

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:    aspectj-users-admin@xxxxxxxxxxx




To:    aspectj-users@xxxxxxxxxxx
Subject:    [aspectj-users] aspectj ant build issue


************************************************************************
****

 This message originated from the Internet.  Its originator may or  may
not be who they claim to be and the information contained in  the
message and any attachments may or may not be accurate.
************************************************************************
****


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

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users









************************************************************************
 This E-mail is confidential. It may also be legally privileged. If you
are not the addressee you may not copy, forward, disclose or use any
part of it. If you have received this message in error, please delete
it and all copies from your system and notify the sender immediately  by
return E-mail.

 Internet communications cannot be guaranteed to be timely, secure,
error or virus-free. The sender does not accept liability for any
errors or omissions.
************************************************************************
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top