LoginSignup
0
1

More than 5 years have passed since last update.

Maven [ERROR] ブートストラップ・クラスパスが-source 1.7と一緒に設定されていません

Posted at

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>
0
1
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
0
1