Reputation: 3163
I have Java code managed by a Git repository. Currently, the directory structure is
myProject |
-- src
-- bin
-- lib
-- .git
Currently, each developer creates its own development environment under his desired tool (Eclipse/Netbeans). I would like to create a Eclipse project for this code and add it to my source repository, so that new Eclipse developers don't need to create a new project and set the dev environment manually. I'd like to have this:
myProject
|
-- src
-- bin
-- lib
-- .git
-- eclipse
|
-- .settings/
-- .project
-- .classpath
From what I've read in the web, I don't need to add the .metadata directory to the repository. Also, I know I could have dependency problems in some situations if I add the .classpath folder to the repository, but I prefer to not support these problematic situations (eg different Java compilers) than forcing the dev to manually set the classpath. Finally, I don't want to use Maven in this project.
Concisely, my requirements are - I don't want to put Eclipse project files in the root folder - I don't want to duplicate the code inside eclipse folder (that's what happens when I try to import existing code into an isolated project folder). I want it to reference the source files I have in the folder named 'src' - I want to configure Eclipse to put the compilation output (.class files) in the 'bin' folder.
That latter item I was able to set when creating the project, but I wasn't able to configure Eclipse to reference the source code (not duplicate it) without choosing a source parent directory as the project folder.
Any help is much appreciated.
Upvotes: 2
Views: 2371
Reputation: 3567
Use default location
and specify your eclipse
directory, hit NextGenerate web.xml...
uncheckedLink to alternate location (Linked Folder)
to create src and bin directories that are linked to the top-level src and bin.eclipse/.settings/org.eclipse.wst.common.component
to change WebContent.bak to WebContent (is there a setting for this? couldn't find it)Upvotes: 1
Reputation: 5661
You will need to create a project in the place you want it, and then use 'linked source' directories to point to your actual source code.
more information:
Store eclipse .project files outside the project directory
Upvotes: 2