IntelliJ IDEA 中module的dependencies是其它module時的注意事項


Dependencies on other modules

If a module (module A) depends on another module (module B), IntelliJ IDEA assumes that:

  • The sources of module A depend on the sources in module B and don't depend on its test sources.
  • The test sources of module A depend on the sources and the test sources of module B.

 

也就是說,源代碼依賴源代碼,測試代碼依賴測試代碼

 

另外,如果要把一個library打包進一個artifact中,這個library必需是project level以上的。

如果把一個library中的某些部分(可以是類或者文件夾,甚至是archive里的文件)標記為exclude。但是這樣僅僅是把這些內容用作輸入時的提示,但是在運行或者編譯時,這些內容還是有效的。這么做的目的是為了讓IDE更加流暢。原文如下:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM