Ok, I have looked at the pom.xml
in my maven webdriver project and I think you should chcek this:
<!-- Create JAR manifest with main class, but without Maven descriptor, so clients don't see this file -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<mainClass>com.deutscheboerse.test.MyTest</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
While in the projet folder I have under package com.deutscheboerse.test
created file (java Class) which is named MyTest
and this class contains main method. Snippet from the code:
public static void main(String[] args) throws Exception {
myTest(args[0], args[1], args[2], price);
}
While the method mytest()
does the magic:
public static void myTest(String driver, String login, String password, Price price) throws Exception {
PerfTests tests = new PerfTests(USED_ENVIRONMENT, driver);
tests.login(login, password);
//... and other steps
}
Long story short
Check that your pom.xml
contains path to the main class and this class actually contains main method