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

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
source share