Intellij - Add project dependency like in Eclipse

2019-01-19 13:02发布

I'm switching to Intellij and trying to do the same thing as in Eclipse. In Eclipse, you can add a project as a dependency in another project (project properties -> "Java Build Path" -> "Projects" -> Click on my library project).

The current situation is that I'm developing a library and I can test the features in another project without building the jar file every time I add new stuff to the library.

I'm trying to achieve this with Intellij but without success (the projects are both imported in Intellij).

How can I do that?

2条回答
闹够了就滚
2楼-- · 2019-01-19 13:28

From File -> project structure, select Modules. You will be presented with all the added projects. Click a project and from the right hand side select Dependencies tab. This will show you projects that are not imported in red coloured text. HTH

查看更多
一纸荒年 Trace。
3楼-- · 2019-01-19 13:37

File > Project Structure. Then choose your module, and add any dependency, either Jar, Library or Module:

IntelliJ Screenshot

Larger image here: http://i.imgur.com/rjdxJHx.png

查看更多
登录 后发表回答