I have a Maven 2 project which only holds TestNG tests:
I am trying to create an executable JAR that includes and executes these tests. The goal is to take this jar to any machine and run the unit tests. I already have a class with a main method next too my tests, which loads and executes the testng tests.
I am having difficultly creating this JAR.
I've tried using the "maven-shade-plugin" where I can create an executable JAR that includes all of the dependencies, but I cannot get it to include the unit tests (or my main class) when I run "mvn clean package". I have also tried creating an executable JAR using the "maven-jar-plugin" with the "test-jar" goal, but I cannot get the dependencies to be included in the JAR.
Can someone please help me with this? Can I create an executable jar of tests using maven 2? If so, how? I am new to maven so any code you can provide would be very helpful.
Here is what I have currently: