I have created a Maven project in the Eclipse (Luna service Release 4.4.2) + Installed TestNG (7.3.0) but unfortunately, the TestNg version shows 6.9.11 installed though I have updated the TestNG version a couple of times using the suggestions given by other members on Stack overflow. Whenever I try to clean and build the Maven project. here is the error message I see. Can someone help me with how to fix this issue, please? I have seen somebody suggested to run some ````mvn -u clean install ``` commands. Since I'm new with Maven, Can someone explain to me where to run those commands? Here is my POM.xml file for reference.

> <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>com.appium.demo</groupId>
>   <artifactId>AppiumDemoProject</artifactId>
>   <version>0.0.1-SNAPSHOT</version>

<!-- https://mvnrepository.com/artifact/io.appium/java-client -->

<dependencies>
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>7.3.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.141.59</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.testng/testng -->
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.3.0</version>
        <scope>test</scope>
    </dependency>



</dependencies>
2

There are 2 best solutions below

1
On

You should run mvn -U clean install from your command line in the same directory as your pom.xml. You'll also want to make sure the directory of your maven installation's /bin folder is on your PATH so you can run the mvn command.

0
On

Fixed: After installing the right Maven binary zip files. [enter image description here][1]

[1]: https://i.stack.imgur.com/jruii.png. The error was fixed. Also, I had to change the tag from Jar to Pom file.