1
我想用javac编译一组java文件到.class文件,然后使用iajc编译和编织所有方面。我的ant build.xml看起来像这样。将.aj文件编织到现有的javac编译源
的编译部分:
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${target} -->
<javac srcdir="${src}" destdir="${target}" debug="true">
<classpath refid="project.class.path" />
</javac>
</target>
的iajc部分:
<target name="aspects">
<mkdir dir="dist"/>
<iajc source="1.6" target="${asptarget}">
<inpath>
<pathelement location="${target}"/>
</inpath>
<sourceroots>
<fileset dir="${src}">
<include name="**/*.aj"/>
</fileset>
</sourceroots>
<classpath>
<pathelement location="${aspectj.home}/lib/aspectjrt.jar"/>
</classpath>
</iajc>
</target>
由错误信息来看,我没有得到这个正确的。源根错误! 如何使用aspectj编译.aj文件,然后编译类文件和编译的.aj文件?有可能没有重新编译所有原始的Java源代码?
你能帮助我,这个问题吗?http://stackoverflow.com/questions/38930247/when-run-ant-script-aspectj-not-import-aspect-source-folder-out-side-java-class – uma