Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Building Aspect jar file for load time weaving using Inter-type declarations


Michael,

Using classpath is the right approach. Unfortunately we don't make it easy to build aspects for LTW that use ITDs ;-). The trick is to ignore the warning (it should not be an error by default) by supplying a custom Xlint.properties file (http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html):

        typeNotExposedToWeaver = ignore

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/



Michael Dempfle <mdempfle@xxxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx

09/08/2006 13:48

Please respond to
aspectj-users@xxxxxxxxxxx

To
aspectj-users@xxxxxxxxxxx
cc
Subject
[aspectj-users] Building Aspect jar file for load time weaving        using Inter-type declarations





Hi,

I have tried the example for Inter-type declaration (at the very bottom):
http://www.eclipse.org/aspectj/doc/released/progguide/language-interType.html

I compile everything and it works fine if I use something like that for
building:
<target name="compilePoint">
               <iajc argfiles="point.lst"
                   outjar="PointAOP.jar"
                   inpath="Point.jar">
                   <classpath>
                       <pathelement path="../lib/aspectjrt.jar"/>
                       <pathelement path="../lib/ejb.jar"/>
                       <pathelement path="../lib/perfload.jar"/>
                   </classpath>
               </iajc>
   </target>

But I want to build a jar file only for load-time-weaving - if I try the
same
without the inpath="Point.jar" I get errors like

    [iajc] error at private boolean Point.assertX(int x) {
    [iajc]
D:\projects\perfload\example\ltw\src\PointAssertions.aj:3:0::0 Point
cannot be resolved to a type
   ...

It there a way to get the jar-file for load-time-weaving? copyInjars is
Deprecated/ignored
inpathDirCopyFilter seems to be a filter for unwoven classes only!
and adding the Point.jar to the classpath does only give the error

[iajc] D:\projects\perfload\example\ltw\src\PointAssertions.aj:6:0::0 this
affected type is not exposed to the weaver: Point
[Xlint:typeNotExposedToWeaver]

Thanks,
Michael

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top