NetBeans - SVN - Java WAR
我对 SVN 非常陌生。我创建了自己的存储库,该存储库在 apache Web 服务器上运行,并且使用 NetBeans 6.9.1 IDE 来构建 Java Web 应用程序。我已使用内置 Subversion 功能成功地将我的 Web 应用程序项目提交到我的存储库。
现在,我想做的是将存储库的特定修订检出到我的 Web 服务器 (tomcat) 上。我可以使用 SVN CO 命令执行此操作,但是,NetBeans 目前仅提交以下文件/目录。 构建.xml NB项目/ 源代码/ 测试/ web/
理想情况下(我认为)我想从 dist/ 文件夹提交 Web 应用程序的 WAR 文件,从而在签出修订版本时部署项目。
我注意到当我在 NetBeans 中右键单击我的项目并转到“Subversion >”时Svn Properties' 有一个 svn:ignore 语句,其值为 build &区。我很确定这就是 dist 文件夹没有提交到存储库的原因。
- 提交 WAR 文件的最佳方法是稍后通过提交 dist 文件夹与签出命令一起使用吗? 我。如果是这样,如何删除 Svn 属性中的 svn:ignore 语句?我尝试过删除它,但它会自动重新出现。 二.如果没有,我如何更有效地使用 SVN 和我的存储库来更新我的网络应用程序?
非常感谢您的帮助!
I am extremely new to SVN. I have created my own repository which is running on an apache web server and I am using the NetBeans 6.9.1 IDE to build the Java web application. I have successfully committed my web application project to my repository using the built in Subversion feature.
Now, what I would like to do is checkout specific revisions of the repository onto my web server (tomcat). I can do this with the SVN CO command, however, NetBeans is currently only committing the following files/directories.
build.xml
nbproject/
src/
test/
web/
Ideally (I think) I want to commit my web application's WAR file from the dist/ folder, thus deploying the project when I checkout the revision.
I notice when I right click on my project within NetBeans and go to 'Subversion > Svn Properties' there is an svn:ignore statement with the values build & dist. I am pretty sure this is why the dist folder is not being committed to the repository.
- Is the best way to commit the WAR file, for later use with a checkout command by committing the dist folder?
i. If so, how can I remove the svn:ignore statement in the Svn Properties? I have tried removing it, but it automatically reappears.
ii. If not, how can I use SVN and my repository more efficiently to update my webapps?
Many thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不要提交可以从源生成的文件。或者至少,如果您确实想提交发布文件,请将它们提交到一个单独的树中,与在开发过程中构建和重建战争的 dist 文件夹断开连接。
只有在成功通过所有测试之后才应提交版本(如果是),并且一旦发布版本,您应该始终为整个源代码树创建一个标签。这样,您始终可以签出标签并重建相同的版本。您还可以在主干中处理下一个版本时轻松创建已发布版本的维护分支。
Don't commit files which can be generated from the sources. Or at least, if you really want to commit release files, commit them into a separate tree, disconnected from the dist folder where the war is built and rebuilt during development.
The release should be committed (if it is) only after you've successfully passed all your tests, and you should always create a tag for the whole source tree once you have a release. This way, you can always checkout the tag and rebuild the same release. And you can also easily create a maintenance branch of a released version while working on the next version in trunk.