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.
If you want a web application, use maven-archetype-webapp, or if you want a simple application use maven-archetype-quickstart. They are useful because you will be able to expand them with no problem. Note that this is in the Eclipse plugin by default (at least it is today).
Archetype will help authors create Maven project templates for users, and provides users with the means to generate parameterized versions of those project templates. Using archetypes provides a great way to enable developers quickly in a way consistent with best practices employed by your project or organization.
Archetype configurationYou can see the packaging maven-archetype . You can customize build of your archetype here as with any other pom. However, there is another pom. xml file located under src\main\resources\archetype-resources which is the pom file of the generated project.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With