0
votes

I am facing problem download selenium 3.0 dependency in maven. showing below error

C:\Users\YNT>mvn dependency:resolve [INFO] Scanning for projects... Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -clean-plugin/2.5/maven-clean-plugin-2.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- clean-plugin/2.5/maven-clean-plugin-2.5.pom (4 KB at 0.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -plugins/22/maven-plugins-22.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- plugins/22/maven-plugins-22.pom (13 KB at 10.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -install-plugin/2.4/maven-install-plugin-2.4.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- install-plugin/2.4/maven-install-plugin-2.4.pom (7 KB at 7.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -deploy-plugin/2.7/maven-deploy-plugin-2.7.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- deploy-plugin/2.7/maven-deploy-plugin-2.7.pom (6 KB at 5.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -site-plugin/3.3/maven-site-plugin-3.3.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- site-plugin/3.3/maven-site-plugin-3.3.pom (21 KB at 20.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -antrun-plugin/1.3/maven-antrun-plugin-1.3.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- antrun-plugin/1.3/maven-antrun-plugin-1.3.pom (5 KB at 4.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -plugins/12/maven-plugins-12.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- plugins/12/maven-plugins-12.pom (12 KB at 11.4 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/ 9/maven-parent-9.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/9 /maven-parent-9.pom (33 KB at 31.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -antrun-plugin/1.3/maven-antrun-plugin-1.3.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- antrun-plugin/1.3/maven-antrun-plugin-1.3.jar (24 KB at 23.7 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom (15 KB at 16.4 K B/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -plugins/16/maven-plugins-16.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- plugins/16/maven-plugins-16.pom (13 KB at 12.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/ 15/maven-parent-15.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/1 5/maven-parent-15.pom (24 KB at 28.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/apache/6/apache-6.p om Downloaded: https://repo.maven.apache.org/maven2/org/apache/apache/6/apache-6.po m (13 KB at 15.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.jar (204 KB at 85.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -dependency-plugin/2.8/maven-dependency-plugin-2.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- dependency-plugin/2.8/maven-dependency-plugin-2.8.pom (12 KB at 12.9 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -dependency-plugin/2.8/maven-dependency-plugin-2.8.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- dependency-plugin/2.8/maven-dependency-plugin-2.8.jar (150 KB at 82.7 KB/sec) [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.959 s [INFO] Finished at: 2016-10-16T16:20:11+05:30 [INFO] Final Memory: 12M/115M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin: 2.8:resolve (default-cli): Goal requires a project to execute but there is no PO M in this directory (C:\Users\YNT). Please verify you invoked Maven from the cor rect directory. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProject Exception

Here is the code for adding dependency in pom.xml

<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>Talentrack</groupId>
  <artifactId>Talentrack_talent</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <dependency>
  <groupId>org.testng</groupId>
  <artifactId>testng</artifactId>
  <version>6.8</version>
  <scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.0.0</version>
    </dependency> 
</project>

Am i working with right approach or making some mistake.

1
your pom.xml looks wrong , the one you posted is what you have ? all your dependencies should be inside dependencies tagArunakiran Nulu
Thanks Arunakiran, now it is working fineYogesh Trivedi

1 Answers

1
votes

Your pom.xml looks wrong ,all your dependencies should be inside dependencies tag