Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » When using repositories, do you save .metadata and files?
When using repositories, do you save .metadata and files? [message #154369] Sat, 31 December 2005 19:41 Go to next message
Eclipse UserFriend
Hi Folks,

When you are working in a workspace, the workspace contains
the .metadata directory and files that contains Eclipse preferences
and project information as well.

So my question is, do you save the .metadata and files to CVS
so that your Eclipse and project settings are preserved?

What I found in my case that using J2EE persepective and
and creating a Dynamic Web project, lots of information was
saved there and when I had removed and deleted the project
from Eclipse (and did not save the .metadata to CVS) and tried
to checkout from CVS and import the project back in, I was unable
to bring my Dynamic Web project back under the J2EE/Dynamic
Web container in the Project Explorer. My project ended up under
'Other Projects' in the J2EE perspective.

Any advice or pointers?

Thanks,
Dan Thurman
Re: When using repositories, do you save .metadata and files? [message #154378 is a reply to message #154369] Sun, 01 January 2006 01:26 Go to previous messageGo to next message
Eclipse UserFriend
>
> Any advice or pointers?
>

I hope you don't literally mean the workspace's ".metadata" directory
.... that's workspace specific ... and would be a major bug if project cr=
itical
was saved in there.

But, yes, there are .settings files under each project that do
have to be saved in the repository for shared use ... similar to
the .project file. (these .settings files do contain what you might
call 'metadata', but offhand, don't think any of the files are called th=
at).
Re: When using repositories, do you save .metadata and files? [message #154463 is a reply to message #154378] Mon, 02 January 2006 16:11 Go to previous messageGo to next message
Eclipse UserFriend
>
>"David Williams" <david_williams@us.ibm.com> wrote in message
news:op.s2or65k5ac05ss@dmw2t23.raleigh.ibm.com...
>
>>
>> Any advice or pointers?
>>
>
>I hope you don't literally mean the workspace's ".metadata" directory
>... that's workspace specific ... and would be a major bug if project
critical
>was saved in there.
>
>But, yes, there are .settings files under each project that do
>have to be saved in the repository for shared use ... similar to
>the .project file. (these .settings files do contain what you might
>call 'metadata', but offhand, don't think any of the files are called
that).
>

That is the problem, I think - that by not saving the .metadata file around
you are forced to reset your preferences and/or build settings for each
and every project in your workspace, especially if you "blow it away"
or to create a new workspace elsewhere.

I am forced to re-setup my CVS, subversion repositories, my default
prepectives, and on and on if anything happens to the workspace
..metadata folders. Perhaps I should just archive the workspace
folder as the root for my projects in my source control repository?

You say: "...major bug if project critical was saved there...", and I am
just
saying that my tomcat or geronimo or other settings pertaining to the
dynamic
web project that I am working on does get saved there - specifically - in
the
..metadata tree where the dynamic-web application is actually saved,
contructed
and executed from there. It is there that the
org.eclipse...server.core.../tmp0 root
tree is created, from which the application is debugged or executed from.
Is this
data project-specific or workspace-specific information? It seems to be a
mixture
of both. What is odd here is that if you keep your .metatdata files in your
workspace,
checkout a project in this workspace - the ONLY WAY that the project itself
can
be reconstructed from it's workspace AND project information is actually
saved in
the .metadata workspace directory and I say this, because if I have
encountered cases
where I tried to checkout and bring back my project into the workspace - I
was not
able to because of existing .metadata files that thinks the project is
already there
when it isn't or if in the case the .metadata does not have this
information - it has
no idea what perspective that project was in (such as a dynamic web
application)
that ends up in an "unknown" project perspective ('Other Project' as in my
case)

Anyway - just wondered if anyone has any issues regarding what is saved in
the .metadata
workspace directory and project managment in general.

Thanks for responding!
Dan
Re: When using repositories, do you save .metadata and files? [message #154471 is a reply to message #154369] Mon, 02 January 2006 17:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

It doesn't make sense to save the .metadata into a project's repository. It's highly user-specific and version-specific (to Eclipse) so there's no guarantee that anything you have in there will work if you upgrade Eclipse (and will almost certainly prevent being able to use it in an older version of Eclipse).

Lastly, there's a lot of transient data stored in there and this can have negative effects if you load it into a new Eclipse install that isn't expecting to have any transient data. Sometimes if you're using less robust plugins, it can cause them to fail horribly.

So is there any benefit of putting it in there? Not really. You get to save some settings, but that's about it. And if you want to have settings set up on a per workspace basis, using the import/export Preferences feature will save everything for you anyway, or as has been posted elsewhere, set them up as a per-project property (although not everything is there).

My advice would be to configure the workspace(s) as you want them, then export out the preferences (from the Window->Preferences page, do 'export' and 'import' as appropriate) and then check the .epf file into your version control for the project(s) or groups that you currently have. That way, setting up a new workspace is trivial, and once you've got a workspace checked out (you must have multiple workspaces anyway, like you do at the moment) it doesn't matter. If you need to set up a new workspace to edit an old project, simply import the .epf file first of all.

As for CVS repositories, if you edit a new workspace you can easily put in the repository by pasting the full CVS 'url' like :ext:me@a.b.c.com:/CVSRoot into the first field of the 'new CVS repository' wizard, and it'll decode all the parameters instead of having to type each one in manually.

In summary; .metadata and repositories really don't work, and absolutely don't work for any environment that has more than 1 developer.

Alex.
Re: When using repositories, do you save .metadata and files? [message #154708 is a reply to message #154471] Tue, 03 January 2006 20:04 Go to previous messageGo to next message
Eclipse UserFriend
"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:9903422.1136240534029.JavaMail.root@cp1.javalobby.org...
> It doesn't make sense to save the .metadata into a project's repository.
It's highly user-specific and version-specific (to Eclipse) so there's no
guarantee that anything you have in there will work if you upgrade Eclipse
(and will almost certainly prevent being able to use it in an older version
of Eclipse).
>
> Lastly, there's a lot of transient data stored in there and this can have
negative effects if you load it into a new Eclipse install that isn't
expecting to have any transient data. Sometimes if you're using less robust
plugins, it can cause them to fail horribly.
>

ok, so I can safely delete the .metadata file with no penalties other than
my
Eclipse settings which I will have to do it all over again. That means I
have
to recall from notes or memory what I need for the project I need to work
on - the SCM, the perpectives, etc... so this is trivial? Maybe and maybe
not.... ah well... I will just let this one go.

> So is there any benefit of putting it in there? Not really. You get to
save some settings, but that's about it. And if you want to have settings
set up on a per workspace basis, using the import/export Preferences feature
will save everything for you anyway, or as has been posted elsewhere, set
them up as a per-project property (although not everything is there).
>
> My advice would be to configure the workspace(s) as you want them, then
export out the preferences (from the Window->Preferences page, do 'export'
and 'import' as appropriate) and then check the .epf file into your version
control for the project(s) or groups that you currently have. That way,
setting up a new workspace is trivial, and once you've got a workspace
checked out (you must have multiple workspaces anyway, like you do at the
moment) it doesn't matter. If you need to set up a new workspace to edit an
old project, simply import the .epf file first of all.
>

What is an 'epf' file - there is a gazzoola number of choices - which do I
choose?

When I looked at trying to export it - I am bewildered because I have to
choose from a long list
of actions on how I want this project saved (or exported) and since all I am
doing is saving one
index.jsp file, the libraries needed for this project and just what do I
need to choose when exporting
this entire project only because I want to ensure that when I get back to
working on this project,
it will be restored exactly as it was when I last archived it? In this
particular case and from my
perspective, it is a J2EE, Dynamic Web project.... so if I export this
right, I should get my project
back in via an Import and this project will appears exactly as I had created
it and in it's perspective?.

> As for CVS repositories, if you edit a new workspace you can easily put in
the repository by pasting the full CVS 'url' like :ext:me@a.b.c.com:/CVSRoot
into the first field of the 'new CVS repository' wizard, and it'll decode
all the parameters instead of having to type each one in manually.
>
> In summary; .metadata and repositories really don't work, and absolutely
don't work for any environment that has more than 1 developer.
>
> Alex.
Re: When using repositories, do you save .metadata and files? [message #154748 is a reply to message #154708] Wed, 04 January 2006 04:14 Go to previous message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

An EPF file is an Eclipse Preferences File. You get it when you export (or import) preferences:

<a href=" http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.user/tasks/timpandexp.htm"> http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.user/tasks/timpandexp.htm</a>

You do not need to do anything with preferences if you want to store a project in a source control system. However, I suspect that you may be forgetting to add various of the 'dot' files to source control, such as .project, .classpath (and I'd expect that there's one for a web project, like .websettings, but I don't know what it's called).

Note that importing and exporting preferences does not store anything to do with perspectives of how they are laid out. These are transiently stored in the workspace, and there's no (easy) way to manage those between workspaces.

Note that the term 'exporting' a project refers to taking a Zip (or Jar, or whatever) out of the Eclipse workspace, whereas if you're storing it in a version control system the terminology is 'sharing'. And when you store a project in the version control system, it should store everything that's needed to make the project be editable again in a new Eclipse workspace; however, that doesn't mean that the Eclipse IDE will be configured to look exactly as when you last opened it.

Alex.
Previous Topic:WTP logo
Next Topic:add bind key
Goto Forum:
  


Current Time: Sat Mar 15 21:23:15 EDT 2025

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

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

Back to the top