• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1846
  • Last Modified:

how to specify source folders in a java project from a SVN checkout

After installing subclipse on a new eclipse (europa) installation, I proceeded to checkout the trunk from the svn repository.  This contains many folders under trunk, each folder being a separate project.   Upon checkout, the trunk (and the rest) were under the workspace folder

Assume that one of the project folders is called project1.. So locally, it is under workspace\trunk\project1

How do I create a Java project that only pertains to project1 files and resources (and will let me commit etc) ?  When I tried to do this and specified this folder, it complained that the project must be directly under the workspace folder (which it is obviously cannot).
0
nsriram
Asked:
nsriram
  • 2
  • 2
1 Solution
 
doraemon-nolifeCommented:
1. Goto FILE > Project

2. Select java project

3. In the Content box, select "Create project from existing source"

4. Browse to your project folder checked out from SVN.

0
 
nsriramAuthor Commented:
"Projects located in the workspace folder must be direct sub folders of the workspace folder" says eclipse when I try to browse to the relevant folder.

Obviously had I just checked out the relevant project into the workspace, this problem doesnt happen as the project1 is directly under workspace folder.  So I imagine this means that one has to check out each project individually instead of checking out a trunk superfolder that has multiple project folders.
0
 
yaxhCommented:
First you need to open 'SVN Repository Exploring Perspective' using "Select Perspective" dialog window. Now after doing that, add new "Repository Location". You can now browse whole repository and can check out whatever you require from repository. It could be trunk itself of subproject under that trunk.

Following doc of snapshots might help you in this regard:

http://www.cse.iitb.ac.in/yash/uploads/upload/help.doc
0
 
nsriramAuthor Commented:
yaxh:  Your suggestion involves checking out a single project to the workspace. Eclipse likes this because that project is directly under workspace. However suppose one (for whatever reason) checked out trunk itself, then the relevant project folders are one level deeper in the workspace (and under svn control).  It appears that Eclipse doesnt like this (as its "idea" of a project in workspace maps on to a folder directly below workspace).  In any case, I am accepting your solution (what I did was just to follow what eclipse liked, check one project out at a time).
0
 
yaxhCommented:
nsriram: One more thing you can do here.

1. Create a local project using project wizard.
2. Import source from the sup-projects under the trunk which you have already checked out. The import allows you to get any source from  local file system, or even shared network too.

The problem here (may be it's just me) is when I do any SVN action, it complains about some missing "tmp" directory. So, what i did was I manually (out side of eclipse) copied (after import) actual source from sub-project (overridden the imported one) under trunk to locally created project. Then I went to eclipse and refreshed the project which i have created. Now it lets me do anything which I wanted to.


0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now