【发布时间】:2018-11-28 10:03:06
【问题描述】:
是否可以为我的多模块 maven 项目的每个模块生成单独的 jar 文件。 我的项目结构
- pom.xml (parent pom)
|
|-application
|
|-module1
|
|-module2
应用程序模块有 main() 方法。模块 1 和模块 2 具有已被 UI 使用的 REST 端点。 目前,当我在应用程序模块上运行 mvn package 时,我得到了一个大的胖 jar 拥有所有 Spring Boot 依赖项以及每个模块 1 和模块 2 的依赖项。
相反,我想为模块 1 和模块 2 分别创建一个 jar 文件。这样当我在module1中更改代码时,我不需要每次都部署那个大胖jar,我只需要部署module1.jar。
【问题讨论】:
标签: java maven spring-boot