Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Directory structure in Java projects with Eclipse and EGit (on Linux)
Directory structure in Java projects with Eclipse and EGit (on Linux) [message #886730] Fri, 15 June 2012 14:37 Go to next message
Joachim Blaabjerg is currently offline Joachim BlaabjergFriend
Messages: 2
Registered: June 2012
Junior Member
Say I've got a new Eclipse project named Project. I've installed EGit and want to use a local repository outside my workspace, for example in ~/git/Project. If I create a new repository through EGit in ~/git/Project, the project itself is placed in ~/git/Project/Project, which seems entirely unnecessary.

Why the extra subdirectory? I would really like to have the src, bin, etc. directories in the top level of my repository. Is that possible?

I've been banging my head against the wall for a couple of hours trying to solve this, so I'm sorry if I've missed something obvious Embarrassed Thanks in advance!

(edited to add that I'm using Linux)

[Updated on: Fri, 15 June 2012 15:14]

Report message to a moderator

Re: Directory structure in Java projects with Eclipse and EGit [message #886744 is a reply to message #886730] Fri, 15 June 2012 15:01 Go to previous messageGo to next message
Joachim Blaabjerg is currently offline Joachim BlaabjergFriend
Messages: 2
Registered: June 2012
Junior Member
Keeping the repository within the workspace (using the "Use or create repository in parent folder of project" option) seems to solve the problem, but EGit recommends against it and I'd rather have all my repositories in one place anyway (I don't use Eclipse exclusively).

edit: a symlink from Project/Project to Project within the git repo seems to do the trick as well, but it feels very hackish and dirty. Like so:

joachibl@joachibl-U31SD:~/git/Project$ ls -la
total 52
drwxrwxr-x 6 joachibl joachibl 4096 Jun 15 17:10 .
drwxrwxr-x 8 joachibl joachibl 4096 Jun 15 17:07 ..
drwxrwxr-x 3 joachibl joachibl 4096 Jun 15 17:08 bin
-rw-rw-r-- 1 joachibl joachibl  295 Jun 15 17:05 .classpath
lrwxrwxrwx 1 joachibl joachibl    1 Jun 15 17:10 Project -> .
drwxrwxr-x 7 joachibl joachibl 4096 Jun 15 17:12 .git
-rw-rw-r-- 1 joachibl joachibl  379 Jun 15 17:10 .project
drwxrwxr-x 2 joachibl joachibl 4096 Jun 15 17:05 .settings
drwxrwxr-x 3 joachibl joachibl 4096 Jun 15 17:08 src
joachibl@joachibl-U31SD:~/git/Project$


I feel like I'm missing something very obvious.

[Updated on: Fri, 15 June 2012 15:19]

Report message to a moderator

Re: Directory structure in Java projects with Eclipse and EGit [message #887023 is a reply to message #886744] Sat, 16 June 2012 00:47 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Repositories contain projects, they're not used to house a single workspace project.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic: IBM rational in Eclipse
Next Topic:Static Code Analysis
Goto Forum:
  


Current Time: Fri Apr 26 13:16:45 GMT 2024

Powered by FUDForum. Page generated in 0.99987 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top