Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Workspace and Project Bird's Nest(Restoring environment to the point I can build again)
Workspace and Project Bird's Nest [message #673864] Wed, 25 May 2011 01:49 Go to next message
Al  is currently offline Al Friend
Messages: 2
Registered: May 2011
Junior Member
I defined a new workspace and tried to import all the objects I had from my old workspace to begin working on a new version of the project. I'm not sure exactly how I created this mess... Once I create a new workspace I add new packages and objects to it thinking that this new workspace and project will be in its own location on the hard disk (and that all my old objects were imported into the new workspace). What I find instead is that the new project is simply a renamed version (for the most part) of the old project, all new packages and objects are being added to the old project and all the old packages and objects did not import into the new project - the new project just has reference to them in the old project's directory. This is not what I want. How can I piece all this back together and get a project that is updating the hard drive directories as you would expect (e.g. MyWorkspace = C:\Development\MyWorkspace\src\main\java... instead of MyWorkspace = C:\Development\SomeOldWorkspacesClasses\src\...).

I am using MVN to build and was doing fine despite the anomaly until my hard drive crashed. On the restore, MVN will no longer find the classes it once was finding (the POM being in the new workspace and the directories and objects being in the old workspace was building fine before the crash). My server jar just comes up empty now - which I did not know until I ran the Flex portion of the app and got "NoClassDef" errors in the Flex client. I eventually jar tf -myserver.jar and find out that it is empty other than the POM...

Can someone help me force the right changes in the new project to get it all organized under the one workspace? If more info is needed, please let me know. Sorry... if it was not obvious, I'm an Eclipse novice.

In case it matters, my original intent was to segregate versions by creating new workspaces for each version. Since my new workspace just kept adding to and overwriting my old workspace, that purpose has already been defeated and I'd just like to bring everything into line now under one project without starting over under a new workspace.

Thanks for your help!

Al
Re: Workspace and Project Bird's Nest [message #673894 is a reply to message #673864] Wed, 25 May 2011 05:36 Go to previous messageGo to next message
Al  is currently offline Al Friend
Messages: 2
Registered: May 2011
Junior Member
To further confuse this, I have since found that I was incorrect. My maven build is installing from a directory other than the one I thought it was installing from(it is adding the classes in SomeOldWorkspacesClasses\src\...). I found this after checking the actual jar in the war file (as opposed to the target directory I was checking). My NoClassDef problem and Tomcat hanging is due to some other issue. This does not solve my general project config problem though. This is, however, an example of how having this workspace out of whack is making problems harder for me to solve...
Re: Workspace and Project Bird's Nest [message #674005 is a reply to message #673864] Wed, 25 May 2011 13:40 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
It sounds like you suffer from a fundamental misunderstanding about what
an Eclipse workspace is and an Eclipse project is.
A workspace is a logical container for, among other things, Projects and
Preferences. A Project is a container for source files and other files
related to them. A workspace has a certain physical location on your
file system; Project's can be located in the file system either
underneath a workspace location (the default behavior) or elsewhere.
Remember, the woskpace is a _logical_ container, not necessarily a
physical container, of Projects.
A) When you import a Project into a workspace, there's an option to copy
the project's contents into the workspace.
B) When creating a new project, you can also locate it at some existing
code base in your filesystem.
It sounds like you either overlooked the option in A) or did B) and
pointed both Projects to the same physical location.

It's really hard to say more without knowing the details of what you did
and where your project(s) is/are located.

Eric


On 5/24/11 9:49 PM, Al wrote:
> I defined a new workspace and tried to import all the objects I had from
> my old workspace to begin working on a new version of the project. I'm
> not sure exactly how I created this mess... Once I create a new
> workspace I add new packages and objects to it thinking that this new
> workspace and project will be in its own location on the hard disk (and
> that all my old objects were imported into the new workspace). What I
> find instead is that the new project is simply a renamed version (for
> the most part) of the old project, all new packages and objects are
> being added to the old project and all the old packages and objects did
> not import into the new project - the new project just has reference to
> them in the old project's directory. This is not what I want. How can I
> piece all this back together and get a project that is updating the hard
> drive directories as you would expect (e.g. MyWorkspace =
> C:\Development\MyWorkspace\src\main\java... instead of MyWorkspace =
> C:\Development\SomeOldWorkspacesClasses\src\...).
> I am using MVN to build and was doing fine despite the anomaly until my
> hard drive crashed. On the restore, MVN will no longer find the classes
> it once was finding (the POM being in the new workspace and the
> directories and objects being in the old workspace was building fine
> before the crash). My server jar just comes up empty now - which I did
> not know until I ran the Flex portion of the app and got "NoClassDef"
> errors in the Flex client. I eventually jar tf -myserver.jar and find
> out that it is empty other than the POM...
> Can someone help me force the right changes in the new project to get it
> all organized under the one workspace? If more info is needed, please
> let me know. Sorry... if it was not obvious, I'm an Eclipse novice.
> In case it matters, my original intent was to segregate versions by
> creating new workspaces for each version. Since my new workspace just
> kept adding to and overwriting my old workspace, that purpose has
> already been defeated and I'd just like to bring everything into line
> now under one project without starting over under a new workspace.
>
> Thanks for your help!
>
> Al
Previous Topic:Trouble with starting Eclipse
Next Topic:Eclipse runs as one user, but not another
Goto Forum:
  


Current Time: Fri Mar 29 05:10:32 GMT 2024

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

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

Back to the top