[INFO] Scanning for projects...
[INFO] Building csvexample 0.0.1-SNAPSHOT
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ csvexample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\code2care\eclipse-workspace\csvexample\src\main\resources
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ csvexample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\code2care\eclipse-workspace\csvexample\target\classes
[ERROR] COMPILATION ERROR :
[ERROR] Source option 5 is no longer supported. Use 6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
[INFO] 2 errors
[INFO] BUILD FAILURE
[INFO] Total time: 1.035 s
[INFO] Finished at: 2020-11-06T21:56:34+05:30
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5:compile
(default-compile) on project csvexample: Compilation failure:
Compilation failure:
[ERROR] Source option 5 is no longer supported. Use 6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
You can extract some important info from the above logs, "Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5, Source option 5 is no longer supported. Use 6 or later. Target option 1.5 is no longer supported. Use 1.6 or later." : Your build failed because either you missed to add maven plugin maven-compiler-plugin in your pom or added source or target below 1.5
How to fix this issue?
Add the following code in your pom.xml below </dependencies>.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Maven BUILD FAILURE - Failed to execute goal org.apache.maven.plugins - maven-compiler-plugin
More Posts related to Java,
- Java equals method - Tutorial
- Unbound classpath container: JRE System Library [JavaSE-1.7]
- Spring Boot: @RequestBody not applicable to method
- Java 8: Steam map with Code Examples
- Java Program: Random Number Generator
- Java java.time.Clock class code examples [Java Date Time API]
- Fix: type argument is not within bounds of type-variable T
- [Fix] java.net.MalformedURLException: unknown protocol
- Java 7 addSuppression() and getSuppression() Exception Handling
- Convert Java Array to ArrayList Code Example
- How to Word-Warp Console logs in IntelliJ
- Ways Compare Dates in Java Programming with Examples
- Remove Trailing zeros BigDecimal Java
- CRUD operations in Spring Boot + JDBC
- [Java Threads] Should we extend Thread Class or implement Runnable interface
- Json Serialization and Deserialization using Java Jackson
- Create simple struts2 project using maven commands
- How to install Java OpenJDK 11 on Alpine Linux
- Unsupported major.minor version 52.0 in java
- Error: Can not find the tag library descriptor for
- Java: Convert String to Binary
- How to run Java Unit Test cases with Apache Maven?
- Java: Testing Private Methods in JUnit using reflection API Example
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Java Join Strings with Comma Separator
More Posts:
- How to change the KeyMap in Android Studio - Android-Studio
- How to delete a file using PowerShell [Windows/macOS] - Powershell
- M1/M2 Mac VirtualBox Unsupported hardware architecture detected! - MacOS
- [Docker M1/M2 Mac] qemu-x86_64: Could not open /lib64/ld-linux-x86-64.so.2: No such file or directory AWS CLI - Docker
- wget Command on macOS Terminal - MacOS
- Android Parsing Data for android-L failed Unsupported major.minor version 51.0 Error - Android
- [Fix] java: integer number too large compilation error - Java
- Setting up Java JUnit Project with Eclipse + Maven Example - Java