哪些NetBeans项目文件应进入源代码管理? [英] Which NetBeans projects files should go into source control?

查看:102
本文介绍了哪些NetBeans项目文件应进入源代码管理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们通常将Eclipse用于特定的Java项目,但是最近我将该项目导入了NetBeans,以使用其对话框构建功能.

We normally use Eclipse for a particular Java project, but recently I imported the project into NetBeans to use its dialog building features.

由于我可能会回到这一点,所以我想将NetBeans项目文件存储到版本控制中.但是,我不想提交我的"而不是项目"的文件,即,具有我自己的设置的文件可能会与其他用户的文件冲突.

Since I'll probably come back to this, I wanted to store the NetBeans project files into version control. However, I don't want to commit files that are "mine" versus "project", i.e., files with my own settings that would conflict with another user's.

NetBeans在顶级项目区域中创建了以下结构:

NetBeans created the following structure in the top-level project area:

nbbuild
nb-build.xml
nbproject
    <various files>
    configs
    private

很明显,nbbuild是构建输出,因此不会进入.nb-build.xml文件似乎很可能出现,大多数nbproject也是这样.但是,nbproject/private表示它是我的".偷看配置",我不清楚这是我的还是项目...

Clearly nbbuild is build output, so that won't go in. The nb-build.xml file seems likely, as does most of nbproject. However, nbproject/private suggests it's "mine". Peeking at "configs", it's not clear to me if that's mine or project...

有人有一些准则吗?

推荐答案

有关项目文件的NetBeans知识库文章&版本控制讨论了NetBeans项目文件,并给出了有关哪些文件是特定于项目的(即可以通过版本控制共享)以及哪些是用户特定的宽松建议.

The NetBeans knowledge base article on project files & version control discusses the NetBeans project files, with loose advice about which files are project specific (i.e. can be shared via version control), and which are user specific.

这是有关版本控制的部分:

Here is the section on version control:

如果从版本控制系统中检出项目,则不应将build(或nbbuild),dist(或nbdist)和nbproject/private文件夹检入该版本控制系统.

If the project is checked out of a version control system, the build (or nbbuild), dist (or nbdist), and the nbproject/private folders should not be checked into that version control system.

如果项目在CVS,Subversion或Mercurial版本控制系统下,则在导入项目时会为这些目录创建或更新相应的忽略"文件.

If the project is under the CVS, Subversion, or Mercurial version control systems, the appropriate "ignore" files are created or updated for these directories when the project is imported.

尽管应忽略nbproject/private,但应将nbproject检入版本控制系统. nbproject包含项目元数据,使其他用户可以在NetBeans中打开项目,而不必先导入项目.

Though nbproject/private should be ignored, nbproject should be checked into the version control system. nbproject contains project metadata that enables other users to open the project in NetBeans without having to import the project first.

这篇关于哪些NetBeans项目文件应进入源代码管理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆