MavenでJavaプロジェクトを構築しようとしています。私はJava 7を使用していますが、Mavenのソースは1.6です。変更できません。「mvn clean install」を実行すると、奇妙なエラーで失敗します。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project search: Compilation failure
[ERROR] could not parse error message: warning: [options] bootstrap class path not set in conjunction with -source 1.6
[ERROR] /someClassName.java:114: warning: [deprecation] LUCENE_36 in Version has been deprecated
[ERROR] out = new ICUCollationKeyAnalyzer(Version.LUCENE_36, l);
[ERROR] ^
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project search: Compilation failure
could not parse error message: warning: [options] bootstrap class path not set in conjunction with -source 1.6
/someClassName.java:114: warning: [deprecation] LUCENE_36 in Version has been deprecated
out = new ICUCollationKeyAnalyzer(Version.LUCENE_36, l);
現在、maven が推奨するように lucene のバージョンを変更するつもりはありません。では、なぜ maven はコード内の廃止されたものを気にかけ、これらのエラーを回避するのだろうか? ありがとう。
Apache Maven 3.0.4
Java version: 1.7.0_25, vendor: Oracle Corporation