Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] how to use a pointcut defined in a .jar file?

Feilong,

You can do this by including the jar with its pointcuts in your aspectpath (using the -aspectpath option to ajc). Alternatively, you could compile your aspects (or classes) that have pointcut definitions using the -noweave option, jar them up, and then use ajc -injars to include the jar with the pointcuts. E.g.,

ajc LogDef.aj
jar cf logdef.jar LogDef.class
ajc -aspectpath logdef.jar TestLogDef.aj

or

ajc -noweave LogDef.aj
jar cf logdef.jar LogDef.class
ajc -injars logdef.jar TestLogDef.aj

See http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/devguide/ajc-ref.html for more details on the ajc command line options. 

Eclipse IDE support provides a dialog to enter the same options as do the ant tasks.

Ron

Ron Bodkin
Chief Technology Officer
New Aspects of Security
m: (415) 509-2895

> ------------Original Message-------------
> From: "feilong chen" <cfeifei@xxxxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Mon, Jul-21-2003 11:05 AM
> Subject: [aspectj-users] how to use a pointcut defined in a .jar file?
> 
> 
> Hi,
> 
> Suppose I define a set of pointcuts in a .jar file. How can I use one of 
> them and add my own advice to it?
> 
> I try to import the .jar file, but it did not work.
> 
> Thanks in advance!
> 
> Feilong
> 
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
> http://join.msn.com/?page=features/junkmail
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 


Back to the top