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.

有帮助吗?

解决方案

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>

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top