惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
C
Cybersecurity and Infrastructure Security Agency CISA
美团技术团队
J
Java Code Geeks
博客园 - 聂微东
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
雷峰网
雷峰网
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
IT之家
IT之家
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
The Exploit Database - CXSecurity.com
I
Intezer
V
Vulnerabilities – Threatpost
Simon Willison's Weblog
Simon Willison's Weblog
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
T
Tenable Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Project Zero
Project Zero
H
Hacker News: Front Page
SecWiki News
SecWiki News
L
LINUX DO - 最新话题
Hacker News: Ask HN
Hacker News: Ask HN
Forbes - Security
Forbes - Security
C
CERT Recently Published Vulnerability Notes
T
Threatpost
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V2EX - 技术
V2EX - 技术

博客园 - 人生为卒

CAD缺失字体如何处理 Excel 快速拖动公式的方法 微信小程序隐私审核 微信小程序创建流程 mysql 查询数据库的所有表格字段 CAD二次开发入门:WPF类库 Excel 根据单元格值设置行颜色 cmd安装Windows服务 log4.config MySq 表内存占用情况 C# 检测并重启windows服务,IIS应用池 redis 服务安装 Windows系统下本地MQTT服务器搭建,及开机自启 Navicat设置备份文件存储路径 Windows自动录屏功能 spring中常用注解 Windows系统 nacos 部署 解决不能访问GitHub的问题 Java-Maven基础
Java 打包到部署子工程出错
人生为卒 · 2023-11-14 · via 博客园 - 人生为卒

1 打包jar

坑1:打包提示成功,但是文件没有内容

需要在 pom.xml添加以下内容:

    <!-- 打包格式 -->
    <packaging>jar</packaging>

    <!-- 打包插件 -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                    <layout>JAR</layout>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        <configuration>
                            <attach>false</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

坑2:单独打包module提示失败:  “Failed to collect dependencies at org”

转载方法:https://zhuanlan.zhihu.com/p/556687317

新建了一个Maven工程,下面添加了多个Module,Module之间互相依赖。

使用maven install打包第一个Module,在第二个module的pom中添加对第一个module的引用

maven install打包第二个Module,报错:Failed to collect dependencies at ...

解决方案:在主工程中运行 maven install,而后再打包其它包即可

在主工程中运行 maven install,而后再打包其它包即可

2 cmd部署

eg

cd C:\A-MySelf\WebSite\cloud-provider

java -jar cloud-provider-0.0.1-SNAPSHOT.jar

3 怎么才能一直部署,这个方式cmd关闭后程序就关闭了?