1

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.

yegor256
  • 102,010
  • 123
  • 446
  • 597

2 Answers2

3

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>
yegor256
  • 102,010
  • 123
  • 446
  • 597
1

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.

Ernest Friedman-Hill
  • 80,601
  • 10
  • 150
  • 186
  • Ernest, could you please explain what "nothing is looking at them" means? – yegor256 May 24 '12 at 13:42
  • This output is coming from `apt`, I imagine, the Annotation Processing Tool, the purpose of which is to find all the annotations in your code and make them available to plug-in "annotation processors". The tool is just warning you that some annotations exist for which no annotation processor is registered. This is not a bad thing at all -- if you're not running JUnit at the moment, then nothing should care about those JUnit annotations. – Ernest Friedman-Hill May 24 '12 at 13:48
  • 2
    Got it, but this message is sent by `javac` (being ran by Apache Maven 3.0.3 maven-compiler-plugin 2.4). Do you know what to do in order to remove the warning. Ignoring it is not an option for me. – yegor256 May 24 '12 at 18:46