代码片段
让 Java 给点颜色看看
脚本
.bash_aliases
kali
x_storages 查询语句
Maven 常用参数及其说明
本文档使用 MrDoc 发布
-
+
首页
Maven 常用参数及其说明
# Maven 常用参数及其说明 ```man -h,--help Display help information -am,--also-make 构建指定模块,同时构建指定模块依赖的其他模块; -amd,--also-make-dependents 构建指定模块,同时构建依赖于指定模块的其他模块; -B,--batch-mode 以批处理(batch)模式运行; -C,--strict-checksums 检查不通过,则构建失败;(严格检查) -c,--lax-checksums 检查不通过,则警告;(宽松检查) -D,--define <arg> Define a system property -e,--errors 显示详细错误信息 -emp,--encrypt-master-password <arg> Encrypt master security password -ep,--encrypt-password <arg> Encrypt server password -f,--file <arg> 使用指定的 POM 文件替换当前 POM 文件 -fae,--fail-at-end 最后失败模式:Maven 会在构建最后失败(停止)。如果 Maven refactor 中一个失败了,Maven 会继续构建其它项目,并在构建最后报告失败。 -ff,--fail-fast 最快失败模式:多模块构建时,遇到第一个失败的构建时停止。 -fn,--fail-never 从不失败模式:Maven 从来不会为一个失败停止,也不会报告失败。 -gs,--global-settings <arg> 替换全局级别 settings.xml 文件(Alternate path for the global settings file) -l,--log-file <arg> 指定输出日志文件 -N,--non-recursive 仅构建当前模块,而不构建子模块(即关闭 Reactor 功能)。 -nsu,--no-snapshot-updates 强制不更新 SNAPSHOT(Suppress SNAPSHOT updates) -U,--update-snapshots 强制更新 releases、snapshots 类型的插件或依赖库(否则 maven 一天只会更新一次 snapshot 依赖) -o,--offline 运行 offline 模式,不联网进行依赖更新 -P,--activate-profiles <arg> 激活指定的 profile 文件列表(用逗号[,]隔开) -pl,--projects <arg> 手动选择需要构建的项目,项目间以逗号分隔;A project can be specified by [groupId]:artifactId or by its relative path. -q,--quiet 安静模式,只输出 ERROR -rf,--resume-from <arg> 从指定的项目(或模块)开始继续构建 -s,--settings <arg> 替换用户级别 settings.xml 文件(Alternate path for the user settings file) -T,--threads <arg> Thread count, for instance 2.0C where C is core multiplied -t,--toolchains <arg> Alternate path for the user toolchains file -V,--show-version Display version information WITHOUT stopping build -v,--version Display version information -X,--debug 输出详细信息,debug模式。 -cpu,--check-plugin-updates 【废弃】,仅为了向后兼容 -npr,--no-plugin-registry 【废弃】,仅为了向后兼容 -npu,--no-plugin-updates 【废弃】,仅为了向后兼容 -up,--update-plugins 【废弃】,仅为了向后兼容 ``` 必选的 Profile 一般配置在 settings.xml 中,始终激活 可选的 Profile 一般配置在 pom.xml 中,持续集成时,根据不同环境激活不同的 Profile ```shell $ mvn help:active-profiles # 列出当前激活的 Profile $ mvn help:all-profiles # 列出当前所有的 Profile ``` 到目前为止(最新版本为3.1.1) Maven 的不足: 1. 无法在 Profile 中引用另外一个 Profile,Maven 不支持,从而导致代码重复 # 参考链接 - [Maven 常用参数及其说明](https://blog.csdn.net/wangjunjun2008/article/details/18982089)
七宇轩远
2023年05月18日
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码