How do you find the main class in a jar?

Technically a jar file can contain more than one main class. When java executes a jar file, it looks in the META-INF/MANIFEST. MF file inside the jar to find the entrypoint. There is no direct command to get this information, but you can unpack the jar (it’s just a zip file) and look into the manifest yourself .

Read more

Why do I need maven surefire plugin?

Maven sure fire plugin is used to follow the sequence of tests in testng. xml file . If we don’t include the Mavwen surefire plugin then it will execute all the testcases under src/test/java which has prefix or suffix as ‘test’ and these tests will get executed without any sequence.

Read more