Maven projects are not only used for building standalone or web applications they are also used for providing robust test frameworks using Java.
Running a standalone test is difficult, because the problem is that Maven packages the JAR file with only the main classes or test classes separately without the full dependencies.
The following describes how to create a standalone JAR file with test and main classes as well as all the dependencies.
1. Create a new XML file, e.g.
test-jar-with-dependencies.xml, in the project path, e.g.
2. Edit the
test-jar-with-dependencies.xml file and copy