欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 美食 > 通过maven基于springboot项目构建脚手架archetype

通过maven基于springboot项目构建脚手架archetype

2024/10/24 1:51:33 来源:https://blog.csdn.net/qq_33034733/article/details/140374180  浏览:    关键词:通过maven基于springboot项目构建脚手架archetype

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仓:

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com