java - "Supported source version ' RELEASE_ 5' from annotation processor..."是什么意思?

标签 java maven annotations sonatype plexus

这是什么意思以及如何删除它(重新格式化以提高可读性)?

[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

org.sonatype.sisu:sisu-inject-plexus:2.1.1 是项目依赖项之一时,就会发生这种情况。

最佳答案

sisu-inject-plexus 升级后第一个警告已删除:

<dependency>
  <groupId>org.sonatype.sisu</groupId>
  <artifactId>sisu-inject-plexus</artifactId>
  <version>2.3.0</version>
</dependency>

使用 javac-Xlint:-processing 标志后的第二个编译器:

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <executions>
    <execution>
      <id>default-testCompile</id>
      <configuration>
        <compilerArgument>-Xlint:-processing</compilerArgument>
      </configuration>
    </execution>
  <execution>
</plugin>

否则,我们可以使用

<compilerArgument>-proc:none</compilerArgument>

关于java - "Supported source version ' RELEASE_ 5' from annotation processor..."是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10738609/

相关文章:

java - 一个 Java 应用程序中需要两个不同版本的 JAR

java - 如何将 Maven 添加到 IntelliJ 中现有的 Java Web 应用程序?

android - Android 中的 IntDef 注解

ios - 在 MapView 中搜索注释

clojure - 何时何地在 Clojure 代码中放置类型注释?

java - 处理文件的小程序在本地工作但在网站上失败

java - 使用 Gradle Docker 容器运行 Gretty 项目

java - Eclipse Maven : SLF4J: Class path contains multiple SLF4J bindings

java - 如何使用本地 tomcat 版本与 maven

java - 如何访问 Android Studio 中不同类中的 ImageButton?