I think you need to put your input aspects on the aspectpath rather than on the sourceroots:
http://www.eclipse.org/aspectj/doc/next/devguide/antTasks-iajc.html then they will be discovered, you shouldn't need to ship .aj files in source form. > I also assume i can't package up the .class generated files from the source .aj file, and have that applied to arbitrary projects. Yes you can, provided the pointcuts are suitable, the compiled aspect is a reusable compiled entity. cheers, Andy On 11 May 2013 10:42, Dave Brosius <dbros...@mebigfatguy.com> wrote: > 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? > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > >
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users