spring - 如何使用 maven 打包没有主类的自定义 spring-boot 启动器
问题描述
我创建了一个自定义的 spring-boot 启动项目,并希望将其部署到远程 maven 存储库。当我运行时mvn clean package deploy
,我收到一条错误消息:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.2.RELEASE:repackage (repackage) on project jcr-service-spring-boot-starter: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.2.RELEASE:repackage failed: Unable to find main class -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
事实上,我认为 spring-boot 启动项目没有必要有一个主类,因为它永远不会单独运行。
大家可以帮忙解释一下我如何打包这个项目吗?
解决方案
推荐阅读
- c# - JSON.stringify() 不支持庞大的记录集
- sql-server - 搜索具有未设置为 null 且在 x 天前创建的列的行
- laravel - Laravel 中声明的命名空间在哪里?
- plugins - 无法在 codeceptjs 上运行 allure
- windows - 使用批处理脚本组织文件
- python - 我用 vim 修改了 base_profile。为什么我有“-bash:设置:找不到命令”?
- node.js - NPM 失败'http fetch 404'
- r - 在 ggplot2 中显示具有自定义颜色的图例
- cassandra - 如何在 Cassandra 中操作主键和集群列?
- powerbi - DAX:每天的平均不同值