How to add a project to create a path in IntelliJ Idea

I recently switched to IntelliJ Idea 13, earlier in eclipse, I was able to add the project to another way of building the project. I can not do this in IntelliJ.

How can I add project1 to the project2 build path so that I can use it as a dependency. I do not want this project to be a JAR, because I am still developing it.

Following this similar previous question: Intellij - add a project dependency, as in Eclipse

I could not successfully achieve my goal.

In the file> Project Structure> Modules

I see a project that I would like to add to my build path (DataProvider), but it is highlighted in red and the bottom text warns: "Invalid" DataProvider "element in the dependency list

enter image description here

Any help or help would be greatly appreciated.

Edit:

Solution (Thanks @leeor)

Import project as module

File> Import Module> (select the project to import)

This will add this project to the project viewing panel on the left side of the screen.

Then go to your current project

File> Project Structure> Module> (select the current project)

In the Dependencies section

Mark your project (now the module) that you want to import, then click "Apply" and then "OK."

Done!

Using IntelliJ Idea 13.1.6 on Mac

+5
source share
1 answer

If you want to depend on another module without being a jar, you need to import this as a module into the same project. This is not like importing a DataProvider , since it does not appear in the list of modules.

+2
source

Source: https://habr.com/ru/post/1240771/


All Articles