1、引入脚手架构建的插件依赖
<!--构建脚手架archetype-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
2、执行脚手架命令对模板工程进行创建
执行maven命令:mvn archetype:create-from-project

选到需要构建脚手架的模板工程
执行完后是如下界面:

3、进入到脚手架生成的archetype源码目录下执行脚手架创建
打开终端窗口:cd D:\workspace\code\ruoyi\spmp-health\target\generated-sources\archetype

执行maven命令:mvn clean install
执行成功结果如下图所示:

4、创建archetype-catalog.xml文件
执行maven命令:mvn archetype:crawl
执行成功结果如下图所示:

使用everything全局查询该文件archetype-catalog.xml

5、上传脚手架jar包和pom文件到中央maven仓库
打开终端命令窗口输入:cd D:\workspace\code\ruoyi\spmp-health\target\generated-sources\archetype\target

进入到nexus3上传jar界面,如下图所示:

进入到nexus3上传pom界面,如下图所示:

上传成功后,查看中央maven仓:
