[
https://jira.codehaus.org/browse/MCOMPILER-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jackie Noi updated MCOMPILER-208:
---------------------------------
Affects Version/s: 3.2
> plexus-compiler-aspectj does not compile aspects using Java5 language features
> ------------------------------------------------------------------------------
>
> Key: MCOMPILER-208
> URL: https://jira.codehaus.org/browse/MCOMPILER-208
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.1, 3.2
> Environment: org.codehaus.plexus:plexus-compiler-aspectj:2.2
> Reporter: Jackie Noi
>
> When compiling Java5 Aspects I am getting the messages
> "annotation type patterns are only supported at Java 5 compliance level or
> above" or
> "the @within pointcut expression is only supported at Java 5 compliance level
> or above"
> which results in my aspects not being compiled. The values set for <source>
> and <target> have no influence on that behavior.
> I debugged the plexus-compiler-aspectj plugin and realized that the aspectj
> compiler internally decides whether or not to support Java5 language
> constructs based on the
> org.aspectj.ajdt.internal.core.builder.AjCompilerOptions#behaveInJava5Way
> boolean value. Default value is false.
> My suggestion would be to set this value to true in
> org.codehaus.plexus.compiler.ajc.AspectJCompiler#setSourceVersion for source
> versions greater 1.4 using:
> buildConfig.getOptions().behaveInJava5Way = true;
> Doing so fixes the problem.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)