Alpana Chauhan
Alpana Chauhan

Reputation: 417

Maven fails to update to selenium 2.44.0

I am trying to update my selenium to the latest version here is my 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>sXXXXXXQA</groupId>
  <artifactId>selnm</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

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

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

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
    <groupId>org.eclipse.persistence</groupId>
    <artifactId>eclipselink</artifactId>
    <version>2.5.0</version>
</dependency>

    <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>2.44.0</version>
</dependency>

  </dependencies>
</project>

but the it keeps giving error like

artifact descriptor exception: failed to read artifact descriptor for org.selenium
missing artifact org.eclipse.persistence.....    

if i add a maven dependency for it then it shows some other missing artifact and after adding 3, 4 dependencies it starts to give the same error of same missing artifacts, which I've already added in my pom.xml

I've also updated my maven eclipse plugin still nothing seems to resolve my problem

EDIT: after I updated my java maven project maven-> Update Project, it fixed the problem with pom.xml now its not showing any errors but for apparently no reason i see a RED_CROSS sign at root folder of my project and no other package or file inside it has this red cross.. again not able to figure out why? I tried to proceed with running the project by ignoring the errors.. so it gave the following errors in console

 org.testng.TestNGException: 
 Cannot find class in classpath: com.sxxxxl.oxxs.tests.CartTestLoggedIn
    at org.testng.xml.XmlClass.loadClass(XmlClass.java:81)
    at org.testng.xml.XmlClass.init(XmlClass.java:73)
    at org.testng.xml.XmlClass.<init>(XmlClass.java:59)
    at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:543)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.testng.xml.XMLParser.parse(XMLParser.java:39)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
    at org.testng.xml.Parser.parse(Parser.java:168)
    at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

while i was running these java classes successfully with selenium 2.43.1 I think i have some error with my build path how to find out?

Upvotes: 0

Views: 9560

Answers (1)

Alpana Chauhan
Alpana Chauhan

Reputation: 417

Okay so finally after a lot of struggle my issue is resolved. I did the following:

  1. updated my selenium dependency to 2.44.0
  2. updated my maven project (right click project-> maven-> update project)

still had some issues in my build path due to some outdated jars , which i could see in the marker tab/problem tab next to console tab in eclipse, so

  1. cleaned my .m2/repository folder
  2. restarted eclipse and compiled my project and the whole work-space was build again.

and it worked for me :)

Upvotes: 1

Related Questions