While trying to run my POM.xml file using the command "mvn compile", I am facing an error. Both the POM.xml file and Error description is given below.

engineering

Description

While trying to run my POM.xml file using the command "mvn compile", I am facing an error. Both the POM.xml file and Error description is given below.

My POM.xml file:


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>


  <groupId>rahulshettyacademy.com</groupId>

  <artifactId>MavenFirstProject</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <packaging>jar</packaging>

  <build>

    <pluginManagement>

      <plugins>

        <plugin>          

         <groupId>org.apache.maven.plugins</groupId>

          <artifactId>maven-surefire-plugin</artifactId>

          <version>3.0.0-M5</version>

        </plugin>

      </plugins>

    </pluginManagement>

  </build>


  <name>MavenFirstProject</name>

  <url>http://maven.apache.org</url>


  <properties>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

  </properties>


  <dependencies>

  <dependency>

    <groupId>org.seleniumhq.selenium</groupId>

    <artifactId>selenium-java</artifactId>

    <version>3.141.59</version>

  </dependency>

  <dependency>

    <groupId>org.testng</groupId>

    <artifactId>testng</artifactId>

    <version>7.3.0</version>

    <scope>test</scope>

   </dependency>

    <dependency>

      <groupId>junit</groupId>

      <artifactId>junit</artifactId>

      <version>3.8.1</version>

      <scope>test</scope>

    </dependency>

  </dependencies>

</project>

Error in Command prompt:

[INFO] Scanning for projects...

[INFO]

[INFO] --------------< rahulshettyacademy.com:MavenFirstProject >--------------

[INFO] Building MavenFirstProject 0.0.1-SNAPSHOT

[INFO] --------------------------------[ jar ]---------------------------------

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ MavenFirstProject ---

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory C:\Users\Subhasish Pattanayak\eclipse-workspace\MavenFirstProject\src\main\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ MavenFirstProject ---

[INFO] Changes detected - recompiling the module!

[INFO] Compiling 1 source file to C:\Users\Subhasish Pattanayak\eclipse-workspace\MavenFirstProject\target\classes

[INFO] -------------------------------------------------------------

[ERROR] COMPILATION ERROR :

[INFO] -------------------------------------------------------------

[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] -------------------------------------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  1.060 s

[INFO] Finished at: 2020-11-08T22:34:13+05:30

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project MavenFirstProject: 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]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[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




Related Questions in engineering category