This is example project that show how to build executable jar with test and main code with Maven.
mvn package
java -jar target/testng-maven-1.0-SNAPSHOT-fat-tests.jar
https://stackoverflow.com/a/36047816/2069783 https://github.com/trierra/testNg-maven-starter https://www.programcreek.com/java-api-examples/?code=opengeospatial/teamengine/teamengine-master/teamengine-spi/src/main/java/com/occamlab/te/spi/executors/testng/TestNGExecutor.java