Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 144331

Summary: [Import/Export] import existing projects cannot find projects in child directories using 1.5 VM
Product: [Eclipse Project] Platform Reporter: fred carter <fred.carter>
Component: IDEAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED INVALID QA Contact: Prakash Rangaraj <prakash>
Severity: normal    
Priority: P5 CC: eclipse
Version: 3.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description fred carter CLA 2006-05-29 18:28:36 EDT
Attempting to import a large collection of existing projects from file system.  Works fine in 3.1.2.  If I attempt to import collection from c:/dev/main, wizard searches but finds no projects.

If i go into any of the sub directories, if finds the one project there & imports fine.  Importing a number of projects from sub directories should work.
Comment 1 fred carter CLA 2006-05-29 20:11:54 EDT
Note:  Problem only happens when using JDK 1.5.0_07.  Starting from jdk 1.4.2_08, things work as expected.
Comment 2 Tod Creasey CLA 2006-05-30 08:13:22 EDT
Fred which 1.5 VM are you using? Which revision?
Comment 3 fred carter CLA 2006-05-30 13:15:24 EDT
Using Sun JDK 1.5.0_07:  java -version output:
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)


Also, for reference, an example .project file is:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
  <name>agentClient</name>
  <comment>agentClient project in the main branch (generated)</comment>
  <projects>
    <project>soa</project>
    <project>wsutility</project>
    <project>utility</project>
    <project>csharp</project>
    <project>nunit</project>
    <project>containerClient</project>
    <project>cdo</project>
    <project>xmlaccess</project>
    <project>intermediaryClient</project>
    <project>policyManagerClient</project>
  </projects>
  <buildSpec>
    <buildCommand>
      <name>org.eclipse.jdt.core.javabuilder</name>
      <arguments>jar</arguments>
    </buildCommand>
  </buildSpec>
  <natures>
    <nature>org.eclipse.jdt.core.javanature</nature>
  </natures>
</projectDescription>

and a .classpath is

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
  <classpathentry kind="src" path="src">
  </classpathentry>
  <classpathentry kind="src" path="gensrc">
  </classpathentry>
  <classpathentry kind="src" path="tests">
  </classpathentry>
  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
  </classpathentry>
  <classpathentry kind="output" path="classes">
  </classpathentry>
  <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/BuildlibInteg">
  </classpathentry>
  <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/BuildlibLocal">
  </classpathentry>
</classpath>
Comment 4 Karice McIntyre CLA 2006-06-14 16:59:33 EDT
I use Sun's 1.5.0_04 VM and don't have any problems locating projects in workspace directories.  Do you have several different workspaces or just one workspace in your c:\dev\main directory.  I have a setup where I have c:\workspaces and a bunch of workspace directories beneath that directory.  Using 3.2 RC7, and my 1.5 VM, the wizard finds projects if i select the c:\workspaces directory or if I select one of the workspace directories in c:\workspaces (e.g. c:\workspaces\workspace1, which has a bunch of projects in it).
Comment 5 fred carter CLA 2006-06-14 17:03:55 EDT
(In reply to comment #4)
> ...
The c:\dev\main contains a bunch of directories (about 120), most of which contains a .project & .classpath.

The workspace itself is elsewhere (in the sense that the eclipse workspace is elsewhere and the source is not imported).
Comment 6 Karice McIntyre CLA 2006-06-14 17:20:26 EDT
I am still having troble replicating the problem.  The directory with the projects is not a workspace (i.e. there is no metadata), correct?  How did the projects get to the c:\dev\main directory in the file system - perhaps by exporting them to teh file system from a workspace?  
Comment 7 fred carter CLA 2006-06-14 18:12:43 EDT
(In reply to comment #6)
> ...

.project & .classpath files are generated.  So they could be faulty.  However, since they work individually, I'm assuming not.

Big project, periodically have to work on different code paths.  So I have anttask extensions that generate .{project,classpath} files when needed. start eclipse, create new workspace, import all, and tell it to build.

Works reasonably well in with JVM 1.4.2_08, not with 1.5.0_07.

Just tried switching VM to 1.5 in existing workspace.  That generates startup error:
"Path for project must have only one segment"
Comment 8 Karice McIntyre CLA 2006-06-15 09:42:11 EDT
Oh, you are generating your own .project and .classpath files.  Can you attach them to this bug?  
Comment 9 fred carter CLA 2006-06-15 11:35:20 EDT
(In reply to comment #8)
> Oh, you are generating your own .project and .classpath files.  Can you attach
> them to this bug?  
> 

see comment #3
Comment 10 Karice McIntyre CLA 2006-06-16 11:38:58 EDT
I now have Sun JDK 1.5.0_07 and tried to replicate the problem using the .project and .classpath files provided and could not.  Are there any stack traces in the log file after you get the error message "Path for project must have only one segment"?  
Comment 11 Michael Scharf CLA 2006-07-11 19:40:02 EDT
I have the same problem: I cannot import existing projects. The import existing projects wizard does not list any project :-(.
I'm using 1.5.0_06...
Comment 12 Michael Scharf CLA 2006-07-11 20:54:25 EDT
Ah -- I know the reason why I could not import some projects: I had already projects with the same name in my workspace. They were closed and I used to hide closed projects...

Had nothing to do with the java vm!
Comment 13 John Arthorne CLA 2006-08-01 13:15:52 EDT
If you have projects nested in the file system, this could be a dup of bug 144610.
Comment 14 Karice McIntyre CLA 2006-08-10 16:04:09 EDT
Wassim - one more import/export bug for you. :)  
Comment 15 Susan McCourt CLA 2009-07-15 12:13:32 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 16 Prakash Rangaraj CLA 2009-07-16 01:57:10 EDT
(In reply to comment #12)
> Ah -- I know the reason why I could not import some projects: I had already
> projects with the same name in my workspace. They were closed and I used to
> hide closed projects...
> 
> Had nothing to do with the java vm!
> 

    Following this closing this bug. Also from 3.5 if your workspace already has the projects (closed/opened) the Import Wizard will show you a nice warning :-)