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更加流畅。原文如下:

posted on 2016-11-07 16:18  J.M.Liu  阅读(7684)  评论(0编辑  收藏  举报