Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How to get iajc to output like javac

Dwight,

I am sorry for the late answer but I haven't seen your e-mail before. I am not sure if the way iajc is implemented presents us with information such as the number of compiled files, as you wanted. However, I believe you can perform that task easily, through the definition of a message holder class that intercepts the weaving result, counts the number of processed files and prints that information after the compilation process.

An example I have created, based on the message handler provided by the AspectJ compiler team can be found in https://svn.ci.iscte.pt/zenida/zas-pas/trunk/src_util/pt/iscte/ci/ZasMessageHolder.java (look for the method handleMessage()).

In the iajc task you need to make a simple change to include that message handler:

<iajc ... messageholderclass="<the fully qualified name of your message holder class>" ...>
    ...
</iajc>

In order to make this work, do not forget to define the iajc task, provided in

<target name="define-aspectj" if="aspect_persistence" >
<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
        <classpath>
            <pathelement location="${aspectj.lib}/aspectjtools.jar" />
        </classpath>
    </taskdef>
</target>

with the classpath for the place where you have defined your message holder. E.g.,

<target name="define-aspectj" if="aspect_persistence" >
<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
        <classpath>
            <!-- The change in the previous file -->
            <pathelement path="${compile.dir}" />
            <pathelement location="${aspectj.lib}/aspectjtools.jar" />
        </classpath>
    </taskdef>
</target>

(You may even look for my ant file for the project resulting from my M.Sc. in https://svn.ci.iscte.pt/zenida/zas-pas/trunk/build.xml).

Let me know later if this helps you, please.

Kind regards,

Paulo Zenida


Citando Matt Chapman <mpchapman@xxxxxxxxx>:

Dwight,

There are several bugs open for iajc:

https://bugs.eclipse.org/bugs/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=AspectJ&content=iajc

but none seem to cover this issue exactly, so you might like to open a new
one.
Why is knowing the number of classes compiled important to you?

Regards,

Matt.

On 16/01/07, Dwight Carter <decarte@xxxxxxxxxx> wrote:


Paulo,

Here is my ant script for one of my projects:


Here is the output when aspect_persistence is defined (thus using iajc)


Here is the output when aspect_persistence is not defined (thus using
javac)


Please notice that when using javac, it contains the line:
   [javac] Compiling 1077 source files to
C:\IBMcc\c02148_QuestR1_drop_a\QuestR1_Persistence\QuestPersistence\bin

We tried specifying verbose="true", but that gives us LOTS of output.  We
just want the line telling us how many files it is compiling.

Thanks for your help,

Dwight Carter
Senior Information Technology Specialist
IBM Global Business Services
877-650-4043


*Paulo Alexandre Corigo Zenida <paulo.zenida@xxxxxxxx>*
Sent by: aspectj-users-bounces@xxxxxxxxxxx

01/16/2007 04:18 AM  Please respond to
aspectj-users@xxxxxxxxxxx

 To
aspectj-users@xxxxxxxxxxx  cc

Subject
Re: [aspectj-users] How to get iajc to output like javac






Hello,

Could you post your ant task compiling with iajc? Are you using any of
the properties showWeaveInfo, debugLevel or verbose?

Kind regards,

Paulo Zenida


Citando Dwight Carter <decarte@xxxxxxxxxx>:

Hi,

I've just started using aspectj 1.5.3.  Today I worked with the fellow
that manages our ant scripts.  We were able to successfully compile, but
he noticed that iajc acted differently than javac.

The ant log shows a line like [javac] plus a message indicating how many
classes were compiled, etc.  When we replaced javac with iajc, no such
message was in the log.

How do we get iajc to output this summary line in the log like javac?

Thanks,
Dwight



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


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


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







----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




Back to the top