[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,
- How to get Java Thread name Example [Program]
- Java 8: Get First and Last Date of the Week for Given Date
- Convert String to int in Java
- How to Get List of All Country Codes in Java Using Locale Class
- Convert Multidimensional Array toString In Java
- [Fix] java: incompatible types: incompatible parameter types in lambda expression error
- Display Era details (AD BC) in Java Date using SimpleDateFormat
- Create a Zip file using Java Code programmatically
- [Fix] java.net.MalformedURLException: unknown protocol
- [fix] Java JDBC ConnectException: Connection refused
- Read Json File and Convert to Java Object using Jackson
- list of jars required for hibernate 4.x.x
- Simple Struts 2 Tutorial in eclipse with tomcat 7 server
- Java: The value of the local variable string is not used
- [fix] URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs) IntelliJ
- Java 8+ get Day of the Week Examples with LocalDateTime, DateTime, ZonalDateTime and Instant classes
- Run SQL Script file using Java JDBC Code Example
- Remove Trailing zeros BigDecimal Java
- Java JDBC IN Clause Example with PreparedStatement MySQL
- Convert Java List to Json String using Jackson
- Java 8 foreach loop code examples
- error: file not found: HelloWorld.java
- IntelliJ Keyboard Shortcut to remove unused imports [Java]
- Exception in thread main java.lang.NoClassDefFoundError: package javaClass
- Struts 2 Hello World Example in Eclipse
More Posts:
- How to fix Java HTTP java.net.UnknownHostException - Java
- Whats new in Python 3.10 Pre-release - Python
- How to set Out Of Office (OOO) on Outlook for Mac - MacOS
- SharePoint 2010 DataForm Unable to display this Web Part System.StackOverflowException - SharePoint
- Quick Steps to install NodeJs on macOS - MacOS
- How to fix java.net.NoRouteToHostException in Android Studio - Android-Studio
- Fix: Deprecated Gradle features were used in this build, making it incompatible with Gradle - Gradle
- How to remove unwanted Java imports in IntelliJ (alternative of eclipse Ctrl + Shift + O) - Eclipse