Search code examples
maven-2maven-shade-plugin

Is there a maven archtype for creating a console app?


Is it possible to generate a maven stub project via mvn archetype:generate that has a main function, and part of the build process includes making a App.cmd/App.sh to run the app from a shell?

It seems that I need the maven-shade-plugin to create a console app jar with wrapper scripts for command line startup. However, I don't know if their is an archtype to configure a maven project to use it and create an empty console app.


Solution

  • The "Simple" archetype creates a maven project with a class that has a "main" method. Use that with your maven-shade-plugin to create an executable jar and you are good to go!