Fabian,

>After some tests I dropped the solution of binary weaving and decided to 
do
>load-time weaving which works fine for me now ;-) Using load-time weaving 
I
>don't have to think about the packaging of my application.
That's great; it's good to see another compelling use case for LTW.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal) 
Email: Matthew Webster/UK/IBM @ IBMGB, [EMAIL PROTECTED]
http://w3.hursley.ibm.com/~websterm/



Fabian Christ <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
28/11/2006 09:16
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: [aspectj-users] Writing only weaved classes to destdir -    not 
everything from inpath






Hi Matthew,

sorry for my late answer here but I just retrieved your mail.

You suggest to weave each JAR one by one and that's what I did in the end 
but
this isn't the best solution because I'm weaving several JARs which aren't
changed by any aspect. My problem is that I don't know exactly which JARs 
might
be affected by my aspect. So that I don't miss anything I weave all JARs 
and
redeploy those JARs.

But a better solution would be only to redeploy JARs which really changed 
or to
have a way to decide if a JAR might be affected before I weave. I was 
searching
for a way to minimize the overhead of weaving everything or a way to get 
the
information which JARs really changed.

After some tests I dropped the solution of binary weaving and decided to 
do
load-time weaving which works fine for me now ;-) Using load-time weaving 
I
don't have to think about the packaging of my application.

Thanks for your help,
Fabian

Matthew Webster schrieb:
> 
> Fabian,
> 
> The recommended approach to binary weaving is to maintain the original
> modularity of the application i.e. weave each JAR file separately and
> (optionally) give each one a modified name. This will avoid difficulties
> deploying and configuring the application.The definition of a
> cross-cutting concern and the packaging of the affected application
> should be orthogonal.
> 
> Matthew Webster
> AOSD Project
> Java Technology Centre, MP146
> IBM Hursley Park, Winchester,  SO21 2JN, England
> Telephone: +44 196 2816139 (external) 246139 (internal)
> Email: Matthew Webster/UK/IBM @ IBMGB, [EMAIL PROTECTED]
> http://w3.hursley.ibm.com/~websterm/
> 
> 
> *Fabian Christ <[EMAIL PROTECTED]>*
> Sent by: [EMAIL PROTECTED]
> 
> 06/10/2006 07:58
> Please respond to
> [email protected]
> 
> 
> 
> To
>                [email protected]
> cc
> 
> Subject
>                Re: [aspectj-users] Writing only weaved classes to 
destdir - not 
>  everything >from inpath
> 
> 
> 
> 
> 
> 
> 
> 
> Hi,
> 
> thanks for your prompt help.
> 
> As I see there is no direct way to get only the affected classes. So I
> have to
> think about a workaround here.
> 
> A .class scanner might be one solution. Or you take the weaveInfo string 
and
> extract the class information from it to copy only affected files. This
> could be
> done in a self written Ant task...
> 
> regards,
> Fabian
> 
> Wes schrieb:
>> Per "inpathDirCopyFilter" documentation:
>>
>>   ajc itself copies all resources from input jar/zip
>>   files on the inpath
>>
>> So "inpathDirCopyFilter" can't be used to prevent ajc
>>>from writing all files, including those not affected.
>>
>> It would be easy enough to write a .class scanner to
>> detect whether a .class file was affected by an aspect.
>> Perhaps the solution is to write that scanner.
>>
>> It used to be that you could suppress the output of
>> unchanged classes by changing the weaver method
>> dumpUnchanged(..) (or some such) to do nothing, but I'm
>> not sure if that's still true.
>>
>> Wes
>>
>>> ------------Original Message------------
>>> From: Stalsy <[EMAIL PROTECTED]>
>>> To: [email protected]
>>> Date: Thu, Oct-5-2006 8:25 AM
>>> Subject: Re: [aspectj-users] Writing only weaved classes to destdir -
> not everything from inpath
>>>
>>> Hi,
>>>
>>> You can specify the attribute "inpathDirCopyFilter" of "iajc" element
>>> described at
>>> http://www.eclipse.org/aspectj/doc/next/devguide/antTasks-iajc.html.
>>> Simply insert in inpathDirCopyFilter the name (or pattern) of files
>>> that
>>> you want exclude. For the complete description see link above.
>>>
>>> regards
>>>
>>> Fabian Christ ha scritto:
>>>> Hi,
>>>>
>>>> I've question regarding the following situation: I want to weave
>>> several binary
>>>> classes which are distributed over several JARs. All JARs which might
>>> contain
>>>> classes that should be weaved are on the "inpath". My problem is not
>>> to write
>>>> the aspect but how to get the weaved class files after compiling.
>>>>
>>>> When I weave the classes with the "iajc" Ant task the compiler gets
>>> everything
>>>> from "inpath", unpacks JARs and writes it to "destdir". But I don't
>>> want
>>>> everything in destdir but only the weaved classes - the class files
>>> which really
>>>> changed.
>>>>
>>>> I get an output of all weaved classes when adding the "showWeaveInfo"
>>> parameter
>>>> but this is insufficient.
>>>>
>>>> Is there any way to write only the weaved files into destdir?
>>>>
>>>> Thanks,
>>>> Fabian
>>>>
>>>> _______________________________________________
>>>> aspectj-users mailing list
>>>> [email protected]
>>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>>
>>>>
>>>>
>>>> 
>>>
>>> --
>>> Stalsy
>>>
>>>   HomePage   --:. http://www.stalsy.it
>>>   Blog       --:. http://blog.stalsy.com
>>>   Public Key --:. http://www.stalsy.it/key.php
>>>   E-Mail     --:. [EMAIL PROTECTED]
>>>   ICQ        --:. 302346155
>>>   MSN        --:. [EMAIL PROTECTED]
>>>
>>>
>>> _______________________________________________
>>> aspectj-users mailing list
>>> [email protected]
>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>
>> _______________________________________________
>> aspectj-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to