How to build a maven scaffold like spring initializr

Viewed 28

As the title, is there such a maven plugin that can achieve such a function, I can manually select the required dependencies, or even generate the code automatically?

2 Answers

You can create Maven project with mvn archetype:generate command. For example:

mvn archetype:generate -DgroupId=com.roamch007 -DartifactId=my-app -DinteractiveMode=false

This command will create project in may-app directory.

If you need specific dependencies you can create Maven Archetype, and re-use this archetype while generating new projects.

Read more: Guide to Maven Archetype

Related