When I run Maven from Eclipse and I generate a JAR, I need to run the JAR in that way from command line, once released:
java -classpath [long list of dependencies] uk.co.superzoom.App
Is it the best way of releasing a JAR or should i change the pom.xml in order to be able to run the JAR in that way:
java -jar myjar.jar
If the second case, two changes would be needed:
1) Add to the manifest the infromation about the main class in order to create a runnable JAR
Main-Class: uk.co.superzoom.App
2) Add all the dependencies automatically, without having to write the long list from command line every time (at the moment they are only visible from Eclipse, but from command line I need to add the long list).
How can I implement the steps (1) and (2) in my pom.xml. Can you provide any example of this?