Maven 基本參數

來源:互聯網
上載者:User

標籤:core   thread   嚴格   pen   使用   str   lte   snap   can   

-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;
$ mvn help:active-profiles 列出當前啟用的Profile
$ mvn help:all-profiles 列出當前所有的Profile


到目前為止(最新版本為3.1.1)Maven的不足:
1.無法在Profile中引用另外一個Profile,Maven不支援,從而導致代碼重複;

 

 

原文:18982089?utm_source=copy 

Maven 基本參數

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.