This issue is happening because, at runtime, TestNG jar is not available in the classpath. You can resolve this by using <scope>compile</scope> instead of <scope>test</scope> in your testng pom dependency..
Replace the test with compile in the pom.xml file. and then create a jar file then it will run perfectly.