maven 單獨構建多模組項目中的單個模組,maven構建模組項目

來源:互聯網
上載者:User

maven 單獨構建多模組項目中的單個模組,maven構建模組項目

最近在公司的一個項目裡用到了maven的多模組,由於項目比較大,每次修改後構建整個工程耗時太久,需要單獨構建某個模組,mvn有支援的選項:


-pl, --projects        Build specified reactor projects instead of all projects-am, --also-make        If project list is specified, also build projects required by the list-amd, --also-make-dependents        If project list is specified, also build projects that depend on projects on the list

首先切換到工程的根目錄,

單獨構建模組 pingjuan-web,同時會構建 pingjuan-web 模組依賴的其他模組

$ mvn install -pl pingjuan-web -am

單獨構建模組 pingjuan-common,同時構建相依模組 pingjuan-common 的其他模組

$ mvn install -pl pingjuan-common -am -amd


maven建立多模組web項目時,怎繼承css、js、image等檔案

打包用war的方式.這樣的話webapp裡的資源都會被打包進去.然後其他模組添加這個war包的依賴
 
maven 多模組 web項目 小問題

test類,是不是在test目錄下?,如果是的話,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.