[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Ant task: choosing which aspect to weave
|
Hi guys,
thanks for helping. I'm trying the argfile option with ajc, but it
only works when I use the files aspects.aj. When I put the compiled
aspects (aspects.class), the error is: "The directory
..../aspects.class" doesn't exist.
Can't I use the compiled aspects to weave?
Thanks again,
Camila
On Fri, 24 Sep 2004 10:15:02 +0100, Matthew Webster
<matthew_webster@xxxxxxxxxx> wrote:
>
>
> Camila,
>
> I assume your application is packaged as a JAR file or set of classes which
> you specify on the -inpath/injars and your aspects as a JAR file which you
> specify using -aspectpath. The woven application classes end up as class
> files (with a destination optionally specified using -d) or a JAR file
> using -outjar.
>
> If you want to be selective about which aspects to weave with your
> application you will need to put them in separate JAR files. Alternatively
> a better practice is to build your aspect library using abstract aspects.
> When you binary weave you select both the aspects to be woven and their
> scope by compiling the necessary concrete aspects at the same time. The
> concrete aspects are then packaged with the application.
>
> <target name="weave">
> <iajc srcdir="${basedir}/src"
> includes="**/MyConcreteAspect.aj"
> aspectpath="${basedir}aspects.jar"
> injars="${basedir}/application.jar"
> classpath="${aspectjrt}"
> outjar="${basedir}/woven-application.jar"
> verbose="true"
> />
> </target>
>
> 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, matthew_webster@xxxxxxxxxx
> http://w3.hursley.ibm.com/~websterm/
>
> Camila Rocha <camilar@xxxxxxxxx>@eclipse.org on 23/09/2004 15:06:41
>
> Please respond to aspectj-users@xxxxxxxxxxx
>
> Sent by: aspectj-users-admin@xxxxxxxxxxx
>
>
> To: aspectj-users@xxxxxxxxxxx
> cc:
>
>
> Subject: [aspectj-users] Ant task: choosing which aspect to weave
>
> Hello,
>
> Here I am again fighting with Ant.
> The older problem was solved, thanks Adrian and Wes. The jar file is
> created.
> But now I have another problem: I have a jar file with .class aspects,
> but I don't want all of them to be weaved into my code. I want to
> choose which aspects will be weaved.
> Is there a way of doing this, using something like <exclude>? What
> about command-line compiler?
> I've tried, but I am a dummy in Ant, so... It'm in trouble.
>
> Thanks,
>
> --
> Camila Rocha
> www.ic.unicamp.br/~ra022247
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
>
--
Camila Rocha
www.ic.unicamp.br/~ra022247