[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Abstract Aspect
|
Putting logging.jar in classpath won't do the weaving
(not yet anyway; just-in-time weaving may change this).
I am assuming that you are using AspectJ1.1.
Currently, you need to compile your application with ajc
and supply logging.jar in -aspectpath option. Something like:
> ajc *.java -aspectpath logging.jar
If you application is already compiled into a jar file,
you need to use -injars option. The following
command will result into creation of woven class files:
> ajc -injars app.jar -aspectpath logging.jar
You may also create a log-enabled application jar file using -outjar
option. The following command will result
in loggedApp.jar containing the woven class files.
> ajc -injars app.jar -aspectpath logging.jar -outjar loggedApp.jar
Hope this helps.
-Ramnivas
--- Du Mason <masondu@xxxxxxxxxxx> wrote:
> Hi everyone,
>
> I've got a question regarding abstract aspects.
>
> I have an abstract logging aspect in a jar file called logging.jar.
> This
> AbstractLoggingAspect logs all entries/exit of all methods defined in
> the
> abstract pointcut allClass()
>
> So i tried using this abstract aspect in a separate project. I put
> the
> logging.jar in the classpath. and made an aspect TestLogging
> extending the
> AbstractLoggingAspect. It doesn't seem it's working correctly. None
> of the
> pointcuts get picked up. So i tried copy the
> AbstractLoggingAspect.java to
> this project, and compiled again. It works perfectly.
>
> So my question is, is there anyway to separate the abstract aspect in
> a jar
> file and still have the project compiles correctly?
>
> Thanks
>
> Mason
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com