Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Is .metadata supposed to be under source control?(How do you handle .metadata and source control?)
Is .metadata supposed to be under source control? [message #732049] Mon, 03 October 2011 19:24 Go to next message
Eric Kolotyluk is currently offline Eric KolotylukFriend
Messages: 9
Registered: November 2010
Location: Vancouver
Junior Member
Lets say I have created the following project structure

MyApp/trunk/
+++.metadata/
+++project1/
++++++.metadata
++++++.classpath
++++++.project
+++project2/
++++++.metadata
++++++.classpath
++++++.project

Are the .metadata files supposed to be under source control or not?

Cheers, Eric

Re: Is .metadata supposed to be under source control? [message #732060 is a reply to message #732049] Mon, 03 October 2011 19:40 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 03-Oct-11 13:24, Eric Kolotyluk wrote:
> Lets say I have created the following project structure
>
> MyApp/trunk/
> +++.metadata/
> +++project1/
> ++++++.metadata
> ++++++.classpath
> ++++++.project
> +++project2/
> ++++++.metadata
> ++++++.classpath
> ++++++.project
>
> Are the .metadata files supposed to be under source control or not?
>
> Cheers, Eric

I would not advise it. Place only your projects under source-code
control. Here's something I wrote up on Git if you like:
http://www.javahotchocolate.com/tutorials/git-eclipse.html


Hope this is useful.

Russ
Re: Is .metadata supposed to be under source control? [message #732099 is a reply to message #732060] Mon, 03 October 2011 22:28 Go to previous messageGo to next message
Eric Kolotyluk is currently offline Eric KolotylukFriend
Messages: 9
Registered: November 2010
Location: Vancouver
Junior Member
Yes, very useful, thanks.

I can see now that the design of the Eclipse IDE is very broken in terms of configuration - especially in a shared development environment. While I am used to seeing the .classpath and .project files, I rarely see the .settings directory. The fact that some important configuration information gets stuffed in the .metadata directories and other important information gets stuffed in the Eclipse install directory itself - and that it is highly desirable to share much of that configuration with other developers (so they don't have to reinvent the wheel constantly) only shows how broken the design really is. What I find really frustrating and painful is how much work I have to go to in order to document configuring each of our Applications in Eclipse.

In this respect I can honestly say Eclipse falls significantly sort of Visual Studio in terms of shared configuration information usability. For the most part with our Visual Studio projects you can just check the solution out of source control and build it with little or no extra configuration to document. This is not even close to being true in Eclipse as there is no concept of a solution or application, and consequently there is much painful configuration documentation to write, and developers are always getting screwed if they don't follow the manual configuration steps perfectly.

If I am wrong, someone please tell how it is supposed to work in Eclipse.

Cheers, Eric
Re: Is .metadata supposed to be under source control? [message #732105 is a reply to message #732099] Mon, 03 October 2011 22:34 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 03-Oct-11 16:28, Eric Kolotyluk wrote:
> Yes, very useful, thanks.
>
> I can see now that the design of the Eclipse IDE is very broken in terms
> of configuration - especially in a shared development environment. While
> I am used to seeing the .classpath and .project files, I rarely see the
> .settings directory. The fact that some important configuration
> information gets stuffed in the .metadata directories and other
> important information gets stuffed in the Eclipse install directory
> itself - and that it is highly desirable to share much of that
> configuration with other developers (so they don't have to reinvent the
> wheel constantly) only shows how broken the design really is. What I
> find really frustrating and painful is how much work I have to go to in
> order to document configuring each of our Applications in Eclipse.
>
> In this respect I can honestly say Eclipse falls significantly sort of
> Visual Studio in terms of shared configuration information usability.
> For the most part with our Visual Studio projects you can just check the
> solution out of source control and build it with little or no extra
> configuration to document. This is not even close to being true in
> Eclipse as there is no concept of a solution or application, and
> consequently there is much painful configuration documentation to write,
> and developers are always getting screwed if they don't follow the
> manual configuration steps perfectly.
>
> If I am wrong, someone please tell how it is supposed to work in Eclipse.
>
> Cheers, Eric

One royal monolith can have its way with its own IDE?

Sharing what's in .metadata is iffy. I'd have to look to see if it's
really sharable, but I think not. There is a third-party work-around
called Pulse and also an open project whose name I forget.

In my experience, though, other developers want control over what's in
..metadata and so that's never really been a problem although I can image
that beginning Eclipse users might find that very helpful at first and
it would reduce intra-group Eclipse training.

It's possible to create a workspace without much in it, then generate
another workspace from it (in terms of settings of the sort you'd find
in .metadata). I've done this purely for myself--not tried to share with
another.

Most of Eclipse's problems of this sort are a failure to be portable
from one host to another. In the end, it's what you're used to and how
much trouble you wish to go to, i.e.: I'm sure there are others whose
usage is far more sophisticated than mine and who might even have better
suggestions here.

Best of luck,

Russ
Re: Is .metadata supposed to be under source control? [message #732115 is a reply to message #732099] Mon, 03 October 2011 23:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Eric,

Comments below.

On 03/10/2011 3:28 PM, Eric Kolotyluk wrote:
> Yes, very useful, thanks.
>
> I can see now that the design of the Eclipse IDE is very broken in
> terms of configuration - especially in a shared development environment.
I think you're using configuration to mean a couple of different things,
e.g., preferences, settings, and installations.
> While I am used to seeing the .classpath and .project files, I rarely
> see the .settings directory.
Any project specific settings will be there. Many settings you make
globally can also be done in a project specific way. It's indeed quite
unfortunate that you can't share such settings easily. There's a Google
project to help manage this; I too forget the name.
> The fact that some important configuration information gets stuffed in
> the .metadata directories and other important information gets stuffed
> in the Eclipse install directory itself - and that it is highly
> desirable to share much of that configuration with other developers
> (so they don't have to reinvent the wheel constantly) only shows how
> broken the design really is.
There is support for File->Import/Export->General->Preferences. It's
very handy and I use it to set up each workspace. They're not well
categorized though. I'd look closely at what's in there and make sure
none of the settings are specific to the location of the installation on
a specific machine.
> What I find really frustrating and painful is how much work I have to
> go to in order to document configuring each of our Applications in
> Eclipse.
Does this mostly come down to preferences (workspace level settings)
that you can easily import/export?
>
> In this respect I can honestly say Eclipse falls significantly sort of
> Visual Studio in terms of shared configuration information usability.
> For the most part with our Visual Studio projects you can just check
> the solution out of source control and build it with little or no
> extra configuration to document. This is not even close to being true
> in Eclipse as there is no concept of a solution or application, and
> consequently there is much painful configuration documentation to
> write, and developers are always getting screwed if they don't follow
> the manual configuration steps perfectly.
>
> If I am wrong, someone please tell how it is supposed to work in Eclipse.
Maybe you can give a specific example. In my experience project level
settings (which are bit of a pita to manage) and shared preferences via
import/export mostly suffice...
>
> Cheers, Eric


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Is .metadata supposed to be under source control? [message #732336 is a reply to message #732115] Tue, 04 October 2011 14:33 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
Use Project Specific settings when the project needs to be shared. This will place the settings in the .settings directory. Check this directory and its files into your SCM. This allows you to check out the project and maintain consistency between developers.



Re: Is .metadata supposed to be under source control? [message #733837 is a reply to message #732099] Wed, 05 October 2011 18:35 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 10/3/11 6:28 PM, Eric Kolotyluk wrote:
> Yes, very useful, thanks.
>
> I can see now that the design of the Eclipse IDE is very broken in terms
> of configuration - especially in a shared development environment. While
> I am used to seeing the .classpath and .project files, I rarely see the
> .settings directory. The fact that some important configuration
> information gets stuffed in the .metadata directories and other
> important information gets stuffed in the Eclipse install directory
> itself - and that it is highly desirable to share much of that
> configuration with other developers (so they don't have to reinvent the
> wheel constantly) only shows how broken the design really is. What I
> find really frustrating and painful is how much work I have to go to in
> order to document configuring each of our Applications in Eclipse.
>
> In this respect I can honestly say Eclipse falls significantly sort of
> Visual Studio in terms of shared configuration information usability.
> For the most part with our Visual Studio projects you can just check the
> solution out of source control and build it with little or no extra
> configuration to document. This is not even close to being true in
> Eclipse as there is no concept of a solution or application, and
> consequently there is much painful configuration documentation to write,
> and developers are always getting screwed if they don't follow the
> manual configuration steps perfectly.
>
> If I am wrong, someone please tell how it is supposed to work in Eclipse.

You simply have failed to understand the difference between Workspace
and Project and how they relate to each other. As Ed and Wegener have
pointed out, you share Projects, not Workspaces, and per-project
settings are the way to go.

On a more general note: Please consider that you might not have a full
understanding of the tool before declaring that it is "fundamentally
broken." Millions of people have been using Eclipse for 10 years, so
it's a pretty safe bet that what's actually broken is a newcomer's
understanding.

Eric
Previous Topic:Download bugzilla eclipse plugin?
Next Topic:Java Audio Clips
Goto Forum:
  


Current Time: Thu Apr 25 17:50:46 GMT 2024

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

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

Back to the top