<p>How do you ensure, that you can checkout the code into Eclipse or NetBeans and work there with it?</p>

<p>Edit: If you not checking in ide-related files, you have to reconfigure buildpath, includes and all this stuff, each time you checkout the project. I don't know, if ant (especially an ant buildfile which is created/exported from eclipse) will work with an other ide seamlessly.</p>

[{'answer_id': 81588, 'author': 'Seldaek', 'author_id': 6512, 'author_profile': 'https://Stackoverflow.com/users/6512', 'pm_score': 1, 'selected': False, 'text': "<p>The best thing is probably to <em>not</em> commit any IDE related file (such as Eclipse's .project), that way everyone can checkout the project and do his thing as he wants. </p>\n\n<p>That being said, I guess most IDEs have their own config file scheme, so maybe you can commit it all without having any conflict, but it feels messy imo.</p>\n"}, {'answer_id': 81639, 'author': 'Henry B', 'author_id': 6414, 'author_profile': 'https://Stackoverflow.com/users/6414', 'pm_score': 0, 'selected': False, 'text': "<p>For the most part I'd agree with seldaek, but I'm also inclined to say that you should at least give a file that says what the dependencies are, what Java version to use to compile, etc, and anything extra that a NetBeans/Eclipse developer might need to compile in their IDE.</p>\n\n<p>We currently only use Eclipse and so we commit all the Eclipse .classpath .project files to svn which I think is the better solution because then everyone is able too reproduce errors and what-not easily instead of faffing about with IDE specifics.</p>\n"}, {'answer_id': 81675, 'author': 'Olaf Kock', 'author_id': 13447, 'author_profile': 'https://Stackoverflow.com/users/13447', 'pm_score': 4, 'selected': True, 'text': '<p>The smart ass answer is "by doing so" - unless you aren\'t working with multiple IDEs you don\'t know if you are really prepared for working with multiple IDEs. Honest. :)</p>\n\n<p>I always have seen multiple platforms as more cumbersome, as they may use different encoding standards (e.g. Windows may default to ISO-8859-1, Linux to UTF-8) - for me encoding has caused way more issues than IDEs.</p>\n\n<p>Some more pointers:</p>\n\n<ul>\n<li>You might want to go with Maven (<a href="http://maven.apache.org" rel="nofollow noreferrer">http://maven.apache.org</a>), let it generate IDE specific files and never commit them to source control.</li>\n<li>In order to be sure that you are generating the correct artefacts, you should have a dedicated server build your deliverables (e.g. cruisecontrol), either with the help of ant, maven or any other tool. These deliverables are the ones that are tested outside of development machines. Great way to make people aware that there is another world outside their own machine.</li>\n<li>Prohibit any machine specific path to be contained in any IDE specific file found in source control. Always reference external libraries by logical path names, preferable containing their version (if you don\'t use maven)</li>\n</ul>\n'}, {'answer_id': 81789, 'author': 'Stu Thompson', 'author_id': 2961, 'author_profile': 'https://Stackoverflow.com/users/2961', 'pm_score': 0, 'selected': False, 'text': '<p>I\'m of the philosophy that the build should be done with a "lowest common denominator" approach.  What goes into source control is what is required to do the build.  While I develop exclusively in with Eclipse, my build is with ant at the command line.  </p>\n\n<p>With respect to source control, I only check in files that are essential to the build from the command line.  No Eclipse files.  When I setup a new development machine (seems like twice a year), it takes a little effort to get Eclipse to import the project from an ant build file but nothing scary.  (In theory, this should work the same for other IDEs, no?  Surly they must be able to import from ant?)</p>\n\n<p>I\'ve also documented how to setup a bare minimum build environment.  </p>\n'}, {'answer_id': 81924, 'author': 'Stephen Denne', 'author_id': 11721, 'author_profile': 'https://Stackoverflow.com/users/11721', 'pm_score': 0, 'selected': False, 'text': '<p>I use maven, and check in just the pom &amp; source.<br>\nAfter checking out a project, I run mvn eclipse:eclipse<br>\nI tell svn to ignore the generated .project, etc.</p>\n'}, {'answer_id': 84958, 'author': 'Jay R.', 'author_id': 5074, 'author_profile': 'https://Stackoverflow.com/users/5074', 'pm_score': 3, 'selected': False, 'text': "<p>We actually maintain a Netbeans and an Eclipse project for our code in SVN right now with no troubles at all.  The Netbeans files don't step on the Eclipse files.  We have our projects structured like this:</p>\n\n<pre><code>sample-project   \n+ bin\n+ launches  \n+ lib  \n+ logs\n+ nbproject  \n+ src  \n  + java\n.classpath\n.project\nbuild.xml\n</code></pre>\n\n<p>The biggest points seem to be:</p>\n\n<ul>\n<li>Prohibit any absolute paths in the\nproject files for either IDE. </li>\n<li>Set the project files to output the\nclass files to the same directory.</li>\n<li>svn:ignore the private\ndirectory in the .nbproject\ndirectory.</li>\n<li>svn:ignore the directory used for\nclass file output from the IDEs and any other runtime generated directories like the logs directory above.</li>\n<li>Have people using both consistently\nso that differences get resolved\nquickly.</li>\n<li>Also maintain a build system\nindependent of the IDEs such as\ncruisecontrol.</li>\n<li>Use UTF-8 and correct any encoding issues\nimmediately.</li>\n</ul>\n\n<p>We are developing on Fedora 9 32-bit and 64-bit, Vista, and WindowsXP and about half of the developers use one IDE or the other.  A few use both and switch back and forth regularly.</p>\n"}, {'answer_id': 89205, 'author': 'Brad at Kademi', 'author_id': 17025, 'author_profile': 'https://Stackoverflow.com/users/17025', 'pm_score': 0, 'selected': False, 'text': '<p>Here\'s what i do:</p>\n\n<ol>\n<li>Only maintain in source control your ant build script and associated classpath. Classpath could either be explicit in the ant script, a property file or managed by ivy.</li>\n<li>write an ant target to generate the Eclipse .classpath file from the ant classpath</li>\n<li>Netbeans will use your build script and classpath, just configure it to do so through a free form project.</li>\n</ol>\n\n<p>This way you get IDE independent build scripts and happy developers :)</p>\n\n<p>There\'s a blog on netbeans site on how to do 3. but i can\'t find it right now. I\'ve put some notes on how to do the above on my site - <a href="http://www.bradmcevoy.com/ant_netbeans_eclipse.html" rel="nofollow noreferrer" title="Ant+Netbeans+Eclipse">link text</a> (quick and ugly though, sorry)</p>\n\n<p>Note that if you\'re using Ivy (a good idea) and eclipse you might be tempted to use the eclipse ivy plugin. I\'ve used it and found it to be horribly buggy and unreliable. Better to use 2. above.</p>\n'}]
['https://Stackoverflow.com/questions/81567', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5751/']