0

I am new to Selenium and Maven tools. Trying to set up the Selenium 2.0 Java project using Maven, via this guide.

After creating and saving pom.xml in my project directory, I run mvn clean install and get the following error:

(...) The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\User\Documents\TestAutomation). Please verify you invoked Maven from the correct directory. -> [Help 1]

My pom.xml looks like this, as in the example from the link:

<?xml version="1.0" encoding="UTF-8"?> <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>MySel20Proj</groupId> <artifactId>MySel20Proj</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.45.0</version> </dependency> </dependencies> </project>

I have Maven 3.3.1 and Java 1.8.0 installed on Windows 7.

Any idea, what am I doing wrong? I have little experience with testing tools in general.

7
  • In what directory is the pom file saved to?
    – ryekayo
    Apr 14, 2015 at 18:51
  • It's saved in C:\Users\User\Documents\TestAutomation, just an empty directory (with pom.xml) where I wanted Maven to create the project for me. Apr 14, 2015 at 18:52
  • Can you try mvn -f clean install pom.xml
    – ryekayo
    Apr 14, 2015 at 18:53
  • It gives me the following error message: "Some problems were encountered while processing the POMs: Non-readable POM ... (couldn't find the file)" Apr 14, 2015 at 18:54
  • Hmmm...what compiler are you using?
    – ryekayo
    Apr 14, 2015 at 18:55

1 Answer 1

0

OK, the problem was with the file extension. It was actually saved as pom.xml.txt, not pom.xml as I expected. (found that via dir command)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.