Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] jaring aspects to be applied later

Greetings i have some aspects that i want to make available as a jar, to be applied to arbitrary projects in the future.

When i stick the .aj file in a jar, and use it from ant as

    <target name="aspects">
        <aspectj:iajc outJar="${build.dir}/${final.name}_aj.jar" source="1.6" showWeaveInfo="true">
            <sourceRoots>
                <pathelement location="/path/to/jar/myaspects.jar"/>
            </sourceRoots>
            <inpath>
                 <pathelement location="${build.dir}/${final.name}.jar"/>
            </inpath>
            <classpath>
                <pathelement location="aspectjrt.jar"/>
                <path refid="my.classpath"/>
            </classpath>
        </aspectj:iajc>
    </target>


No aspects are found to apply

if the sourceRoots specifies a directory path, it works fine.


How is one supposed to do this? I'd prefer to not have to ship .aj file by themselves.
I also assume i can't package up the .class generated files from the source .aj file, and have that applied to arbitrary projects.

What am i do wrong?

Back to the top