16

I don't know whether it's even possible since this file does not contain any relevant links to directories, but anyway: I want to store .project files in a separate dir outside the project root. How can I do that?

peterh
  • 11,875
  • 18
  • 85
  • 108
ienes
  • 185
  • 1
  • 4
  • Due to the fact the project directory is constantly in use by a lot of co-workers it's common for this file to disappear strangely. – ienes Aug 06 '10 at 12:22

1 Answers1

16

You can't place the ".project" outside of the project root, as the project root is the folder where the ".project" is located. What you can is, you can define a project at an other location as your sources und create linked folders to link your sources to your project.

If you create a new folder there is a button "Advanced" in the dialog. If you click it there is a checkbox "Link to folder in the file system". Here you can link folders to your project that are not located in the project folder. I assume this is the effect you want to achieve.

Ishmaeel
  • 14,138
  • 9
  • 71
  • 83
Arne Deutsch
  • 14,629
  • 5
  • 53
  • 72
  • Great advice! This "eclipse-symlink" was just what I needed so that I can work on git repos, while syncing my .project files via Dropbox. – metakermit Apr 04 '13 at 11:33
  • I just started working on a project and was surprised to see no .project with the source folders etc. After reading this answer, it might explain how the setup was done. Thanks for the post, very useful. – MikeRoger Oct 02 '14 at 08:28
  • Very useful for having your project live outside of source control folders. Thanks! – Rich Apr 14 '16 at 11:04
  • 1
    Yet another reason to dislike eclipse. You should be able to store settings and project information in a separate location from the project source. – Kevin M Jul 21 '16 at 16:47
  • 1
    @KevinM, that capability es exactly what this answer gives you. – hmijail Oct 23 '16 at 17:11
  • Can you do it at a high level in eclipse configuration? I'd like to keep eclipse from creating all those files/directories in my source folders any time I have to fall back to using eclipse to test to see if something is working in eclipse, but not in intellij (that's really the only reason I ever open eclipse, but once I do, it recreates all those project related files again in my project source). – Kevin M Oct 25 '16 at 16:17
  • In that specific case I would create an eclipse workspace somewhere different then your projects, create new java projects for your IntelliJ projects and link the sources of the original projects (new folder wizard has an "Advanced" button where you can create a "Linked Folder"). This way you can just open eclipse for testing and do not need to recreate the projects all the time. – Arne Deutsch Oct 26 '16 at 14:05