What does “Supported source version 'RELEASE_5' from annotation processor…” mean?
-
10-06-2021 - |
Question
What does it mean and how it can be removed (reformatted for better readability)?
[INFO] Compiling 30 source files to ...\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
warning: Supported source version 'RELEASE_5' from annotation processor
'org.sonatype.guice.bean.scanners.index.QualifiedIndexAPT6'
less than -source '1.6'
warning: No processor claimed any of these annotations:
org.junit.Ignore,org.junit.Test,org.junit.BeforeClass
This happens when org.sonatype.sisu:sisu-inject-plexus:2.1.1
is one of project dependencies.
La solution
The first warning was removed after upgrading of sisu-inject-plexus
up to:
<dependency>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-plexus</artifactId>
<version>2.3.0</version>
</dependency>
The second one after using -Xlint:-processing
flag of javac compiler:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-testCompile</id>
<configuration>
<compilerArgument>-Xlint:-processing</compilerArgument>
</configuration>
</execution>
<execution>
</plugin>
Otherwise, we can use
<compilerArgument>-proc:none</compilerArgument>
Autres conseils
There are two unrelated warnings here. First, there's a class that claims it wants to look at annotations, but it only understands Java 5 syntax, and you've specified Java 6 syntax on the command line; and second, you've got some JUnit annotations in there, but nothing is looking at them.
They both sound fairly safe to ignore, but unfortunately whatever is trying to run javac
here (is it apt
?) is failing to understand the output.