How do you handle different Java IDEs and svn?

前端 未结 7 1799
天命终不由人
天命终不由人 2020-12-16 22:55

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

Edit: If you not checking in ide-related files, you have to reconf

7条回答
  •  春和景丽
    2020-12-16 23:23

    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:

    sample-project   
    + bin
    + launches  
    + lib  
    + logs
    + nbproject  
    + src  
      + java
    .classpath
    .project
    build.xml
    

    The biggest points seem to be:

    • Prohibit any absolute paths in the project files for either IDE.
    • Set the project files to output the class files to the same directory.
    • svn:ignore the private directory in the .nbproject directory.
    • svn:ignore the directory used for class file output from the IDEs and any other runtime generated directories like the logs directory above.
    • Have people using both consistently so that differences get resolved quickly.
    • Also maintain a build system independent of the IDEs such as cruisecontrol.
    • Use UTF-8 and correct any encoding issues immediately.

    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.

提交回复
热议问题