Maven install エラー
パッケージをいじった後などに、以下のようなエラーが出た場合。pom.xmlを修正することで改善できる。
[ERROR] ブートストラップ・クラスパスが-source 1.6と一緒に設定されていません
修正前
pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
上記の中で、「1.6」となってる部分2か所を、ビルドパスに設定してある JREシステム・ライブラリーのバージョンと合わせる(1.8など)。
修正後
pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>