pom引入
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-resources-plugin</artifactId><version>3.1.0</version><configuration><encoding>UTF-8</encoding><!--<skipTests>true</skipTests>--><includeEmptyDirs>true</includeEmptyDirs></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-archetype-plugin</artifactId><version>3.2.1</version></plugin></plugins><extensions><extension><groupId>org.apache.maven.archetype</groupId><artifactId>archetype-packaging</artifactId><version>3.0.1</version></extension></extensions></build>
2.
3.
cd target/generated-sources/archetype/
mvn clean install
4.
5.
6.
参考文档:
maven-archetype自定义模板创建,并在本地和远程仓库生成模板项目_maven-archetype-plugin 版本-CSDN博客