Hi Ashish,
Yes i have all the jars inside the repository folder, but the jars are inside thier repective folders.
<property name="ws.jars" value="C:\Users\ashariff\.m2\repository"/>
Test NG jars are placed in C:\Users\ashariff\.m2\repository\org\testng\testng\6.8\testng-6.8.jar
Similarly Selenium jars are placed C:\Users\ashariff\.m2\repository\org\seleniumhq\selenium
So i updated the testng jars path in build.xml
<taskdef name="testng" classpath="C:\Users\ashariff\.m2\repository\org\testng\testng\6.8\testng-6.8.jar"
classname="org.testng.TestNGAntTask" />
and if i compile i get these errors
[javac] C:\Selenium\Framework 2016\Hybrid Framework\CORE_HYBRID_FRAMEWORK_20
16\src\main\java\com\qtpselenium\core\hybrid\Keywords.java:5: error: package org
.testng does not exist
[javac] import org.testng.Assert;
[javac] ^
[javac] C:\Selenium\Framework 2016\Hybrid Framework\CORE_HYBRID_FRAMEWORK_20
16\src\test\java\com\qtpselenium\core\hybrid\base\baseTest.java:4: error: packag
e org.testng.annotations does not exist
[javac] import org.testng.annotations.DataProvider;
[javac] ^
[javac] 100 errors
BUILD FAILED
C:\Selenium\Framework 2016\Hybrid Framework\CORE_HYBRID_FRAMEWORK_2016\build.xml
:84: Compile failed; see the compiler error output for details.
Total time: 15 seconds
[quote:3uewcv25]So i updated the testng jars path in build.xml
<taskdef name="testng" classpath="C:\Users\ashariff\.m2\repository\org\testng\testng\6.8\testng-6.8.jar"
classname="org.testng.TestNGAntTask" />
[/quote:3uewcv25]
change it back in build.xml
and for ant to work with maven repo you have to use this
http://stackoverflow.com/questions/1422427/is-there-a-way-i-can-use-maven-repositories-to-add-dependencies-to-ant
Hi Ashish,
I changed the below
<taskdef name="testng" classpath="C:\Users\ashariff\.m2\repository\org\testng\testng\6.8\testng-6.8.jar"
classname="org.testng.TestNGAntTask" />
<taskdef name="testng" classpath="${test.classpath}"
classname="org.testng.TestNGAntTask" />
<taskdef name="testng" classname="org.testng.TestNGAntTask">
After changing i get an warning as mentioned earlier.
In the blog it mentions to add the below code in build.xml where to add these lines in build.xml.? Anywhere in build.xml i add these lines it shows an error .
please help. I am stuck with this ant task since 3 weeks and i dont understand how to configure or manipulate the ant build.xml file.
<artifact:dependencies filesetId="deps.fileset" type="jar">
<pom file="mypom.xml"/>
</artifact:dependencies>
Sure.
I have sent a add request please accept it from skype id "abwasha".
I would be able to be on SKYPE on 9th feb 2017 - IST - 8.30 AM - 9.00AM or same day any time after 6.30PM IST.
Hi Ashish ,
Thanks for your help. The error now is fixed and ant is able compile. But if i run it simply shows the outpur in the command promt not running the code actually. And the reports shows the test cases are passed but without actually executing the code. If i run from eclipse as testng it run and executes the code. Any idea how to get this up . The purpose to have ant task is to integrate with jenkin server.