有哪些工具可以用来打包源码
我想从存储在 SVN 中并使用 maven 管理的项目创建一个包(没有 SVN 条目、Eclipse 设置)。我应该能够创建一个包,我可以在以后的某个时间点将其重新用作快照。我该怎么做?
I would like to create a package (devoid of SVN entries, Eclipse settings) from a project stored in SVN and managed using maven. I should be able to create a package which I can re-use as a snapshot at a latter point in time. How should I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
假设您已经使用 SCM 设置了项目,maven 将忽略 .svn 目录,并且只要您的 eclipse 属性文件不在“src”文件夹中,您也不会获得这些文件。您的 -SNAPSHOT 版本可以在以后部署和重用。
如果您只想保存 SVN 存储库“快照”供以后使用,我建议仅使用 SVN“标记”在存储库中保存该时间点。这可以使用 Maven SCM 插件 来完成
,此时您可以随时查看标记版本并从该确切修订版继续。
Assuming your have setup your project with a SCM, maven will ignore the .svn directories and as long as your eclipse properties files aren't within your "src" folders, you won't get those either. Your -SNAPSHOT versions can be deployed and reused later.
If you just want to have the SVN repository "SNAPSHOT" saved for later, I would suggest just using a SVN "TAG" to save that point in time within the repository. That can be done using the Maven SCM Plugin
At that point you can always checkout the tagged version and continue from that exact revision.
有多种方法可以做到这一点。最简单的方法之一是使用脚本(shell/batch/powershell)并执行 svn 导出。与 svn checkout 不同,这将获得没有 SVN 条目的源代码的指定修订版。本质上,您将在脚本中执行以下命令:
您可以添加命令以删除脚本中的 eclipse 设置。
There are multiple ways you can do this. One of the simplest ways is to use scripts (shell/batch/powershell) and do an svn export. This will get a specified revision of the source code without the SVN entries, unlike svn checkout. Essentially, you will be executing the following command in your script:
You can add the commands to remove the eclipse setting in your script.
您可以使用 maven 源插件 来执行此操作。
You can use the maven source plugin to do this.