views:

717

answers:

5

I noticed that Eclipse (Flex Builder) generates hundreds of metadata files. Should I check them into my source control? They seem necessary, because if I delete them Flex Builder just opens up an empty workbench...

Some of these files plainly do not belong in source control (like .history files and some cache files). If I delete them my project opens up again without a hitch. But the list is long and there seem to be no clear separation between folders that contain files that belong in source control and those that do not.

I can't just shove them all into svn, even if I were to ignore the inefficiency, because Eclipse generates new ones constantly, with different names, which in turn also seem to be crucial for the project to load.

Can someone please enlighten me?

+2  A: 

I generally put all of my source code under src, and I check in src and all of its descendents. If my project relies on any external dependencies (e.g., the Cairngorm SWC, as3corelib, etc.), Flash/graphical assets, stylesheets, or resource files, I check those in, too. But I don't check in any generated (bin-*), intermediate or IDE-specific stuff, because having that stuff in source control doesn't seem to provide much practical benefit, and in my experience has only caused me headaches; in general, I check in the most minimal set of whatever I'd need -- given a clean FlexBuilder installation (or none at all -- for example, if I were compiling instead with mxmlc or compc) and an empty project -- to build the project successfully.

Christian Nunciato
But without the metadata files Flex Builder opens up an empty project...
Assaf Lavie
I'm not sure what you mean; you wouldn't delete anything from your dev environment -- your environment remains as you make it (as do the respective environments of the other members of your team). The idea is you only check in what's needed to build the app, irrespective of your environment.
Christian Nunciato
+1  A: 

Don't check in the hundreds of metadata files. If you want to be able to check out the project in a way that it can just be imported, then check in:

.actionScriptProperties
.project
.flexProperties

And "html-template" and "libs". As Christian says, any resources you depend on. I usually keep those as separate Flex Library projects though.

PEZ
So you're saying I should import these files each time I checkout a clean copy from svn?
Assaf Lavie
If you're using subclipse you can import the project directly from the svn repo if these files are checked in.
PEZ
A: 

Most of the eclipse project files, like .project, .properties, everything in .settings, can go into your source control. As long as the files don't have user-dependent settings like file paths or local urls, you should be fine.

One method we use is creating local property files that don't get used in SCM, but are included in the ones that do. I.E an ant build file including a local.properties file which has local metadata.

A: 

What if the .actionScriptProperties, .project, or .flexProperties have user-dependent stuff in them? Typically this will be url or path information. What's the best practice way of externalizing this? I tried creating path variables, but this only works obviously for paths. Not for things like hostname, etc.

A: 

this is such a headache ,everone has different opinions and my team are confused which way to go

Nikos