I'm working on a Java Netbeans 6.7 roject with a few developers and we're using Mercurial for version control. I was wondering what I should put in the .hgignore file (ie. what files should not be added to the repository). I know I will definitely want the src, test, and lib folders in the repository and the build folder to not be in the repository. But I'm not sure what to do about the nbproject folder.
Git is used for version control of files, much like tools such as Mercurial, Subversion, CVS, and Perforce.
Under the project name that interest you, go in the "src" folder. All your java files should be there. Save this answer.
Select Tools > Libraries to open up the Library Manager. Click the button Add JAR/Folder and browse to the lib folder within the ImageGear for Java installation directory. Select all *. jar files in the lib folder.
A NetBeans project is defined by the existence of the nbproject directory. In the mentioned directory, NetBeans will find information and preferences that are stored when you work on your project.
You must ignore the following folders: build (or nbbuild), dist (or nbdist), and the nbproject/private.
And if you want others to open it with netbeans (as you do in netbeans) you must add nbproject folder.
Though nbproject/private should be ignored, nbproject should be checked into the version control system.
If you want more information, see netbeans help on http://netbeans.org/kb/docs/java/import-eclipse.html#versioning
If you have created these projects under an existing clone/repository, the NetBeans/Mercurial integration will already have a good idea of what to include or ignore.
NetBeans will automatically include files in nbproject that are considered to be environment independent. Files that include environmental dependencies (like directory paths) are usually placed in nbproject/private directory. You probably do not need to save those to your repo.
You may want to exclude the nbproject/build-impl.xml... it is generated when the project is opened... But, if you do not have it in your repo you will run into problems if you attempt to build the project with ant, independent of the IDE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With