开发者

Working with modules in IntelliJ IDEA

开发者 https://www.devze.com 2022-12-12 06:16 出处:网络
As I understand, using modules allows us to control some dependencies. I mean that we can allow one module to interact with another one but not vise versa. We also can make some reusable things and

As I understand, using modules allows us to control some dependencies.

I mean that we can allow one module to interact with another one but not vise versa. We also can make some reusable things and we can make deploying easier, if, for example, put all tests stuff into a separate module and won't deploy it to production.

I haven't ever use module开发者_运维知识库s but if described things are really possible I'd like to know how to make them.

  1. How to set dependencies?
  2. How to do this without IDE and any tools?
  3. How to do it in IntelliJ IDEA?


Managing the dependencies yourself can quickly get complicated for non-trivial applications. For dependency management in Java, I suggest looking at Maven. Using the "test" scope you can bundle the project without all of the testing code. IntelliJ, like other populate IDEs, has built-in support for Maven.

Maven - Introduction to the Dependency Mechanism

Hope it helps!


in IntelliJ,you can select the module and right click it,and set the properties(include dependencies) for the selected module.

0

精彩评论

暂无评论...
验证码 换一张
取 消