LoginSignup
1
3

More than 5 years have passed since last update.

m2eclipseで適当に作ったプロジェクトでの警告対応

Last updated at Posted at 2013-12-13
static import 宣言は -source 1.3 でサポートされていません
(static import 宣言を使用可能にするには、-source 5 以降を使用してください)
注釈は -source 1.3 でサポートされていません
(注釈を使用可能にするには、-source 5 以降を使用してください)

上記警告が出た場合は、pom.xmlを弄ってJavaのバージョン指定を1.5以上にすればOK。

pom.xml
<build>
  <plugins>
    <plugin>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <source>1.6</source>
        <target>1.6</target>
        <encoding>UTF-8</encoding>
      </configuration>
    </plugin>
  </plugins>
</build>

参考

java - Modify pom.xml to include JDK compiler version - Stack Overflow

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3