怎么办时,你的版本控制Ant构建过程胡扯 [英] What to do when your ant build process craps on your Version Control

查看:162
本文介绍了怎么办时,你的版本控制Ant构建过程胡扯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我已经有了一个很好的Java项目,Ant构建一个/ DIST文件夹中。结果
整个项目是版本控制之下,这样我就可以仅仅通过路径dist文件夹上的SVN导出部署最新的版本。结果
但我的构建不断删除我的DIST文件夹内的.svn目录,和所有的家属,因为它不是建立仅覆盖时,淘到的文件夹。在precise罪魁祸首是JarBundler,即建立我mac.app捆绑Ant任务 - 这重新创建之前删除整束的文件夹结果
这显然​​胡扯了我的SVN,因为所有的.svn文件夹现在缺少该文件夹,所以它在冲突中说,它的。

So I've got a nice Java project, build with Ant to a /dist folder.
The whole project is under version control, so I can deploy the latest version just by 'svn export' on the path to the dist folder.
But my build keeps deleting the .svn folders inside my dist folder, and all its dependents, because it cleans out the folder when building instead of just overwriting. The precise culprit is JarBundler, the Ant task that builds my mac.app bundle - It deletes the whole bundle's folder before recreating it.
This obviously craps up my svn, because all the .svn folders are now missing for that folder and so it says its in conflict.

任何人有我怎么能解决这个任何想法?我无法弄清楚如何停止删去jarbundler,所以即时通讯将不得不做一些更哈克我害怕。林pretty新蚂蚁为好,仅供参考。

Anyone have any ideas for how I could solve this? I can't figure out how to stop jarbundler from deleting everything, so im going to have to do something more hacky I fear. Im pretty new to Ant as well, just for reference.

推荐答案

要在源头控制DIST的可以的进行,如果你希望你的源代码控制系统是一个 <视为好的做法EM>独特的参照的所有

To have dist in source control can be considered as good practice if you want your source control system to be a unique referential for all:


  • 开发

  • 汇编(单元测试)

  • 亿安科技测试(您查询您的集成平台上的一堆DIST和perfom有你的非回归测试,测试perfs,压力测试等)

  • 产品发布经理
    ...

但你需要有一个适当的释放过程中,通过拉这一点。

BUT you need to have a proper release process to pull this through.

在你的情况,在建立必须在 独立的私人目录,这是一个颠覆不目录。当构建是好的,您导入它变成颠覆如果是的官方的发布,或将其导入到一个共享目录,如果它是一个临时版本,只需要下一个团队(从而避免犯下数百构建成供应链管理,使用的空间没有)。

In your case, the build must be in a separate and private directory, that is a directory not in subversion. When the build is ok, you import it into subversion if it is an official release, or you import it to a shared directory if it is a temporary build, just needed by the next team (thus avoiding to commit hundreds of builds into SCM, using space for nothing).

请注意:在您的供应链管理具有交货(DIST)的主要优势是允许的依赖的项目不与你的源代码工作,但直接与您的交货(这必然要在一个点或另一个投入生产):如果他们设法使他们的code的工作,通过与您的交货编译,机会是自己的DIST,当您的部署,将工作

这样一来,其他球队访问您的交付(你的'myProject.jar'),因为他们访问任何其来源:他们可以通过单片机读取你的罐子,它的日期,它的历史,它的元数据,其标签的版本,等等。

Note: the main advantage for having the delivery (dist) in your SCM is to allow dependent project to work not with your sources, but directly with your delivery (which is bound to go at one point or another into production): if they manage to make their code work, by compiling with your delivery, chances are their own dist, when deployed with your, will work.
That way, the other teams access your delivery (your 'myProject.jar') as they access any of their sources: they can read through the SCM the version of your jar, its date, its history, its metadata, its label, and so on.

然而,对于一个很小的单芯片(如'没有其他项目依赖于它')项目,它可以说,DIST(最终打包供货)的可能是根据需求重新构建和存储在外部参考系统,如例如外部Maven仓库。

但是:Maven是没有SCM信息库,这意味着您需要登录您的jar('MyProject的-1.0.jar'),你有没有历史,你需要报告你一起交付一个单独的文本文件中的所有元数据。任何其他项目访问到交付在Maven的回购需要相应调整脚本和类路径到您的版本命名约定。

此外,Maven是在你的开发架构另一个仓库。每当你可以保留回购的数量降到最低('1')。),最好是

However, for one small monolithic (as in 'no other projects depend on it') project, it can be argued that dist (the final packaged delivery) could be re-build on demand and stored in an external referential system, as an external Maven repository for instance.
BUT: Maven is no SCM repository, meaning you need to sign you jar ('MyProject-1.0.jar'), you have no history, and you need to report all your metadata on a separate text file along your delivery. Any other project accessing to that delivery in that Maven repo needs to adjust its scripts and classpaths accordingly to your version naming convention.
Plus, Maven is another repository in your development architecture. Whenever you can keep the number of repos to a minimum (of '1' ;) ), it is better.

这篇关于怎么办时,你的版本控制Ant构建过程胡扯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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