I do have Configuration of Maven + TestNG + Selenium + Java
I wants to run specific Java class from POM.XMl file,
Tried:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>demo.java</mainClass>
</configuration>
</plugin>
</plugins>
</build>
There is common solution provided as far I referred, But it did not worked. It didn't run anything and Build was success,
Please note, As using TestNG there is not public static void main(String args[])
in any of Java class.
It would be great to have explanation on <mainClass>demo.java</mainClass>
part, With reference as TESTNG class.
So far I have tried :
From Maven, how do I run a class that lives under src/test/java?
How to execute a java class file from maven command line