Choose a Project Template
Compare the template sources, generation methods and applicable scenarios of Maven Archetype and Gradle Archetype Plugin.
Two creation paths
| Dimensions | Maven Archetype | Gradle Archetype Plugin |
|---|---|---|
| Project | lodsve-maven-archetype | lodsve-gradle-archetype-plugin |
| Template source | Maven repository or Archetype installed to local repository | Local directory, default src/main/resources/templates |
| Built-in content | Quickstart, MyBatis, Nacos, RPC API / Server / Client | The plugin repository provides a generation engine; you need to prepare the template yourself |
| entrance | mvn archetype:generate | Gradle’s generate task |
| Generate results | The default project directory is named artifactId | generated/ under the generator project |
| Suitable for whom | Maven users who want to use existing Boot project prototypes directly | Users who want to reuse and customize their team’s Gradle project templates |
Maven user
from Quickstart Generate a basic web project. Select when database access is required MyBatis, select when using the configuration center Nacos. Separate API and implemented service scenarios according to RPC Guide Create API, Server, Client in sequence.
Gradle user
First create a generator project that applies the com.lodsve.archetype plugin, put it into the team template, and then execute generate. Build files, Boot dependencies, Wrapper and business code all come from templates; the plugin itself does not come with the same set of Boot templates as Maven.
See the complete steps Gradle quick start;For variable and file name rules, see Template writing.
Post-build check
- Check the project coordinates, package name, port and context path.
- Check the generated Boot dependency version with the JDK and build tool versions.
- Configure external services such as database and Nacos according to the environment.
- Build and launch the application, verify a business interface, and then start scaling.
