File-based vs Directory-based Projects. Which way to go?

Hi all,

IntelliJ noob here. I'm just wanting to find out why there are these two different approaches to managing projects, what the relative merits are, and why, in particular, IntelliJ defaults to the directory-based option when creating a new project (That's what appears to happen when I create a new project using the wizard). I come from a VS background so I'm used to file-based solutions and projects, and in some sense I feel more secure with that...like it's more tightly managed and controlled. Directory-based management seems "loose" to me and prone to integrity cock up, but I'm happy to be shown wrong. I would like to know what the more popular approach is in the IntelliJ and OSS communities.

Thanks in advance.

8 comments

Directory based format is preferred, we have plans to deprecate the file based format at some point.

0

Short and sweet. Thanks! :)

0

Hi Mark,

Just in case you you're interested in why .idea is preferred to *.ipr, here is the main difference - there is a number of settings relevant to particular user (e.g. whether to show line numbers in editor). All that 'local settings' are stored in *.ipr, hence, it shows conflicts if stored in vcs.

However, you can store only relevant .idea files in vcs (files which hold 'shared project settings'), so, there are no vcs conflicts for the ide config.

Denis

0

Ah ok. I assume some of the xml files in .idea also contain local settings though (e.g. workspace)? How does IDEA know to exclude these from commits?

0

Yes, .idea directory contains 'local settings' files as well, and it's up to end-user to decide what files should be kept and synced via vcs

Denis

0

I see. Which of the xml files contain local settings in .idea?

0

OK. Thanks Serge and Denis for your help.

0

Please sign in to leave a comment.