Ido Ran
Ido Ran

Reputation: 11384

Should I put nbproject directory under source control in NetBeans

I'm using NetBeans to develop J2EE web service. NetBeans create a directory called nbproject inside my project directory. I'm wondering if I should put this directory under source control. I think it is required to build the project without NetBeans.

Upvotes: 20

Views: 17582

Answers (3)

Tim Sparg
Tim Sparg

Reputation: 3304

The nbProject folder contains all the netbeans metadata about your project. When you go Project -> properties all the settings (and others) that you find there are stored in the nbProjects folder.

EDIT: This has been answered in another question, and the answer there is more complete and accurate

In short you should include nbproject, but not nbproject/private/. Add */nbproject/private/ to your .gitignore file.

Upvotes: 8

Evgeniy Mishustin
Evgeniy Mishustin

Reputation: 3804

If you are building your project with Maven or Gradle you should definitely exclude the folder from the VCS.

Upvotes: 2

Deviland
Deviland

Reputation: 3374

This is usually not required. Think of it this way: If I was to check out your project but happened to be using a different IDE, I would not require your nbproject directory. In other words: This directory is machine specific, not project specific. Hope this helps.

Upvotes: 50

Related Questions