Maven building only changed files(Maven 构建只更改了文件)
问题描述
假设我有如下的模块结构
Lets say i have module structure like below
Modules
->utils
->domain
->client
->services
->deploy (this is at the module level)
现在要启动客户端,我需要构建所有模块,即 utils、域、客户端、服务, 因为我正在加载所有上述模块的 jar 以最终启动客户
Now to lauch the client i need to make a build of all the modules, i.e utils, domain, client, services, because i am loading the jars of all the above modules to fianlly lanch the client
所有的罐子都在模块部署中组装起来.
And all the jars gets assembled in the module deploy.
我的问题是,例如,如果我更改服务中的任何内容,那么当从 deploy maven 运行构建时有没有办法可以识别它必须只构建 services 和因此构建它并将其部署在部署文件夹中?
My question is if i change anything in services for example, then is there a way when running a build from deploy maven could recognise it has to build only services and hence build it and deploy it in deploy folder?
推荐答案
如果你使用的是 SVN 和 *nix,从根模块开始
If you are using SVN and *nix, from the root module
mvn install -amd -pl $(svn st | colrm 1 8 | sed 's /.* ' | xargs echo | sed 's- -,:-g' | sed 's ^ : ')
这篇关于Maven 构建只更改了文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Maven 构建只更改了文件
基础教程推荐
- 在springboot中如何给mybatis加拦截器 2023-04-29
- Java ECDSAwithSHA256 签名长度不一致 2022-01-01
- 将 Windows 证书导入 Java 2022-01-01
- Maven:无效的目标版本:10 2022-01-01
- doFilter()是在servlet的工作完成之前还是之后执行的? 2022-01-01
- 控制台应用程序中的 Java 键盘输入解析 2022-01-01
- 将 double 转换为 Int,向下舍入 2022-01-01
- 如何在相机中应用自定义滤镜 [Surfaceview 预览]. 2022-01-01
- 在java中使用xpath和selenium解析HTML表格数据 2022-01-01
- JPA惰性列表上的流 2022-01-01
