I am trying to run the testng.xml using pom.xml but the class that is inside this testng.xml refers to another class that isn't in pom.xml. I have added it to the classpath and added the necessary class as a dependency too. However, I still get a ClassNotFoundException that still remains when I do mvn install.
Let me just explain what i want as the output,Suppose there are 3 maven modules A,B and C.Now i am running the pom.xml of module 3 which consists of a testng.xml.This testng.xml wants to run a class of module 1 or 2 as per the user's wish(Its user interactive,so the testng changes accordingly).Now i have added the dependencies of 1 and 2 in 3. One more thing,i am running the pom.xml of module3 by runtime java command exec.
testng.xml looks like this <class name="com.org.test.mod1"></class>.And I am running Process p1=Runtime.getRuntime().exec("mvn -e install");