Java AspectJ iajc编译器在子批注上失败

Java AspectJ iajc编译器在子批注上失败,java,ant,aspectj,Java,Ant,Aspectj,我将Ant1.9.3与aspectjtools 1.8.5结合使用。当我尝试使用iajc编译器编译项目时,失败消息为 [aspectj:iajc] error at @NamedQueries({ [aspectj:iajc] ^^^^^^^^^^^ [aspectj:iajc] /path/to/file/Speech.java:14:0::0 Speech.NamedQueries is not an annotation type [aspectj:iajc] warning at /p

我将Ant1.9.3与aspectjtools 1.8.5结合使用。当我尝试使用iajc编译器编译项目时,失败消息为

[aspectj:iajc] error at @NamedQueries({
[aspectj:iajc]  ^^^^^^^^^^^
[aspectj:iajc] /path/to/file/Speech.java:14:0::0 Speech.NamedQueries is not an annotation type
[aspectj:iajc] warning at /path/to/file/PermissionCheckerAspect.java:23::0 advice defined in package.PermissionCheckerAspect has not been applied [Xlint:adviceDidNotMatch]
[aspectj:iajc] MessageHolder:  (10732 info)  (2 warning)  (1 error) 
[aspectj:iajc] [error   0]: error at @NamedQueries({
[aspectj:iajc]  ^^^^^^^^^^^
[aspectj:iajc] /path/to/file/Speech.java:14:0::0 Speech.NamedQueries is not an annotation type
我的ant目标配置类似于以下代码段

<target name="compile.aspectj" depends="copy-libs">
    <aspectj:iajc source="1.8" destDir="war/WEB-INF/classes">
        <sourceroots>
            <pathelement location="src"/>
        </sourceroots>
        <classpath refid="project.class.path"/>
    </aspectj:iajc>
</target>
@Aspect
public class PermissionCheckerAspect {
    private static final Logger log = LoggerFactory.getLogger(PermissionCheckerAspect.class);
    public PermissionCheckerAspect() {
        info("Instantiating PermissionChecker aspect");
    }

    @Around("execution(public * *(..)) && within(package.LicenseRequired)")
    public Object around(ProceedingJoinPoint joinPoint) {
        try {
            info("Proceeding...");
            Object proceed = joinPoint.proceed();
            info("Proceeded successfully");
            return proceed;
        } catch (Throwable throwable) {
            throw new RuntimeException(throwable);
        }
    }

}