[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How to remove aspectjrt.jar runtime dependecy while using AspectJ

Since you're logging, I'm presumably that you possibly *are* using thisJoinPoint or thisJoinPointStaticPart?  You don't need all of aspectjrt.jar, but you probably need a good subset of the content of the 'runtime' module ( http://dev.eclipse.org/viewcvs/index.cgi/org.aspectj/modules/runtime/?cvsroot=Technology_Project and follow the src folder). You could extract these types from aspectjrt.jar and just include them directly in the archive of your applet. A dependency analyzer tool might help you further narrow down the exact set of types that your applet actually needs.

regards, adrian.

On 02/03/06, Rajendra Prasad Vissapragada <rajvissa@xxxxxxxxx> wrote:
Hi Andy,
The reason we can't have dependency on aspectjrt.jar
is it will be run in a applet like env. on the client
machine who may have plain JDK installed and on
different OS.

And we don't want to force clients to download
aspectjrt.jar. We want just the logging to be enabled
using aspects.
To be clear, at the compilation time the aspects have
to be injected into the code/class files and that
should be the AspectJ dependecy end.

Is there any way I can do this, even some alternatives
of it will do as long as I don't require aspectjrt.jar


Date: Thu, 2 Mar 2006 12:33:48 +0000
From: "Andy Clement" < andrew.clement@xxxxxxxxx>
Subject: Re: [aspectj-users] How to remove
aspectjrt.jar runtime
        dependecy       while using AspectJ
To: aspectj-users@xxxxxxxxxxx
Content-Type: text/plain; charset="iso-8859-1"

Depending on the features you are using in the aspect,
you may or may
have a hard dependency on aspectjrt.jar - are you
thisJoinPoint/thisJoinPointStaticPart? or cflow? those
are the kind of
things that cause you a dependency on aspectjrt.jar.

Why is it that you cannot have a dependency on
aspectjrt.jar - is it
that it
is too big?  It is true aspectjrt.jar has grown a lot
in AspectJ1.5.0
and it
is likely you only need a small subset (unless you are
using the new
reflection support or using the @AJ syntax
development).  We have been
having thoughts about shipping multiple variants, a
small core one for
environments like J2ME that don't need the extras and
the big one for
wanting to utilise all the capabilities.


On 02/03/06, Rajendra Prasad Vissapragada
< rajvissa@xxxxxxxxx> wrote:
> Hi,
> I have a scenario, where I would like to implement
> logging using aspects(AspectJ). But when we build
> AJC the ajc weaves logging code into the class files
> and also keeps a reference to aspectjrt.jar classes.
> I want aspectj to weave the logging into the code,
> shouldn't require the aspectjrt.jar (although it is
> smaller footprint).
> Plainly speaking it should run under normal JVM.
> Is there any way of doing this?
> Thanks,
> Rajendra

Win a BlackBerry device from O2 with Yahoo!. Enter now. http://www.yahoo.co.uk/blackberry
aspectj-users mailing list

-- Adrian