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?
Instead open the project properties of the second project and select "Java Build Path". On the right side on the "Projects" tab you can add your first project as "required project on the build path". The class files of project 1 are now added to the class path of project 2.
If you go to File -> Settings -> Keymap you can choose Eclipse from the dropdown list.
From the main menu, select File | Export | Project to Eclipse…. The Export to Eclipse dialog displays the list of modules that have not been converted and switched to use the Eclipse format yet (the modules that have the IntelliJ IDEA module format . iml). Select the modules you want to export.
1 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).
In this case, your Eclipse project will be migrated to IntelliJ IDEA. Launch IntelliJ IDEA. If the Welcome screen opens, press Ctrl+Shift+A, type project from existing sources, and click the Import project from existing sources action in the popup.
The Project tool window displays the newly created Eclipse files. From the main menu, select File | Project Structure Ctrl+Alt+Shift+S or click on the toolbar. Select the module you want to convert and switch to the Dependencies tab. From the Dependencies storage format list, select Eclipse (.classpath).
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 Add the module you want to add as dependency. Add your module dependency in your project. If you use Maven you'll see the following message: Module 'your-module' is imported from Maven.
File > Project Structure. Then choose your module, and add any dependency, either Jar, Library or Module:
Larger image here: http://i.imgur.com/rjdxJHx.png
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With