[JAVA] Maven [ERROR] Bootstrap classpath not set with -source 1.7

Maven install error

If you get the following error after playing with the package. It can be improved by modifying pom.xml.

[ERROR] Bootstrap classpath not set with -source 1.6

Before correction

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>

In the above, match the two parts that are "1.6" with the version of the JRE system library set in the build path (1.8 etc.).

Revised

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>

Recommended Posts

Maven [ERROR] Bootstrap classpath not set with -source 1.7
How to set JAVA_HOME with Maven appassembler-maven-plugin
Add if not in Set, error message if
Maven3 error memo
Docker Compose does not start with docker.credentials.errors.InitializationError error message