Created
March 22, 2020 15:07
-
-
Save SavSanta/4a27d8a865b2848e84597d4a0abf9576 to your computer and use it in GitHub Desktop.
Source option 5 is no longer supported. Use 6 or later.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From Issue @regisd @ https://github.com/jflex-de/jflex/issues/400 | |
""" | |
I think this means that | |
You are using JDK9 or later | |
Your project uses maven-compiler-plugin with an old version which defaults to Java 5. | |
You have three options to solve this | |
Downgrade to JDK7 or JDK8 (meh) | |
Use maven-compiler-plugin version or later, because | |
NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6 | |
See https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#target | |
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> </plugin> | |
Indicate to the maven-compiler-plugin to use source level 6 and target 6 (or later). | |
Best practice recommended by https://maven.apache.org/plugins/maven-compiler-plugin/index.html | |
Also note that at present the default source setting is 1.6 and the default target setting is 1.6, independently of the JDK you run Maven with. | |
You are highly encouraged to change these defaults by setting source and target as described in Setting the -source and -target of the Java Compiler. | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>1.6</source> | |
<target>1.6</target> | |
</configuration> | |
</plugin> | |
or use | |
<properties> | |
<maven.compiler.source>1.6</maven.compiler.source> | |
<maven.compiler.target>1.6</maven.compiler.target> | |
</properties> | |
""" | |
1. Used option 3 to copy directly into pom.xml file in the <plugins> section | |
2. mvn compile | |
3. Successfully seen targets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment