As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

netbeans and source control (SOLVED)

DocDoc Registered User, ClubPA regular
edited January 2009 in Help / Advice Forum
I have a few netbeans projects that I'm trying to move over to source control (svn, specifically). It's being used by about three people.

I got svn set up and everything, but the netbeans config/build files change every time anyone checks anything in, and it breaks it for everyone else. All the paths to libs and everything are relative, so it's not that; just minor config differences between people's computers screws it up. Normally I'd just say fuck it and exclude all the build files, but then our automated build system won't work (it currently doesn't) or be updated correctly via svn.

How do you manage to use svn with netbeans and have the build scripts not fucking break for everyone every time anyone opens a project?

Doc on

Posts

  • Options
    cyphrcyphr Registered User regular
    edited January 2009
    Sounds like you're going to have to retool your automated build scripts a bit. I work in a .NET shop but I think it's a pretty common principle across the board that data specific to a local dev's machine should not be going into source control.

    cyphr on
    steam_sig.png
  • Options
    Monolithic_DomeMonolithic_Dome Registered User regular
    edited January 2009
    Does your build tool allow importing scripts within scripts (I know ant does, for instance)?

    You could make your build script look like this:

    <import "local-build-settings.config>
    <do stuff>


    Where local-build-settings includes everything that is machine-specific. That way you put build.config in souce control and exclude local-build-settings.config

    Monolithic_Dome on
    [SIGPIC][/SIGPIC]
  • Options
    SavantSavant Simply Barbaric Registered User regular
    edited January 2009
    Doc wrote: »
    I have a few netbeans projects that I'm trying to move over to source control (svn, specifically). It's being used by about three people.

    I got svn set up and everything, but the netbeans config/build files change every time anyone checks anything in, and it breaks it for everyone else. All the paths to libs and everything are relative, so it's not that; just minor config differences between people's computers screws it up. Normally I'd just say fuck it and exclude all the build files, but then our automated build system won't work (it currently doesn't) or be updated correctly via svn.

    How do you manage to use svn with netbeans and have the build scripts not fucking break for everyone every time anyone opens a project?

    I have a setup like this at work, but I only the java/netbeans portion somewhat infrequently and I'm not the one who got it set up. However, I know that there are some of the local settings that you aren't supposed to check in to SVN, or else it will cause problems. I think it is the private properties folder, but I'll have to check to see. For a couple of the properties files we have, NetBeans will change them around and update themselves whether you want them to or not, but fortunately you don't have to commit any changes to them and I believe committing won't hurt anything either.

    Dealing with where the source jars are that you build against can be a gigantic pain in the ass. Our builds are typically set to read them from a network drive, but the problem with that is that every little slowdown in performance of that drive will cause lag in the editor and slow everything down. NetBeans isn't very smart with network drives. If you need to change around where you are linking from to deal with this or other problems, you need to not commit any of those changes to the config files.

    Savant on
  • Options
    DocDoc Registered User, ClubPA regular
    edited January 2009
    Really, there is nothing in the files I'm worried about that *should* be local to the boxes; those are all in private files that are kind of off on their own. The issue I'm having is that just *loading* a project in netbeans causes the IDE to change all sorts of XML and .properties files that are supposed to be common.

    Doc on
  • Options
    DrFrylockDrFrylock Registered User regular
    edited January 2009
    Why don't you just set svn:ignore on those on the developer boxes? Alternatively, switch to Eclipse, which doesn't really do this.

    DrFrylock on
  • Options
    DocDoc Registered User, ClubPA regular
    edited January 2009
    DrFrylock wrote: »
    Why don't you just set svn:ignore on those on the developer boxes? Alternatively, switch to Eclipse, which doesn't really do this.

    Because there are some updates to those files that are necessary, like the inclusion of new libraries.

    Also, solved: we are rebuilding the project (not all the code, just the netbeans "project" files) from scratch so it hopefully won't do this anymore.

    Doc on
This discussion has been closed.