maven构建执行svn get
我有一个项目构建,需要在构建期间包含来自另一个 svn 位置的文件。 我想执行 svn get ,然后将这些文件复制到构建的适当文件夹中。 研究这个问题似乎我可以使用 ant 任务,但我想找出这个构建的最佳方法是什么。
I have a project build that needs to include files from another svn location during the build. I want to execute an svn get and then copy these files to the appropriate folder for the build. Researching this issue it seems I could use ant tasks but I wanted to find out what might be the best approach to take for this build.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 maven-scm-plugin。 根据 scm 矩阵 允许签出和更新。
You can use the maven-scm-plugin. According to the scm matrix both checkout and update are allowed.
罗伯特的回答很好,如果项目很大,尽管您将检查大量内容以获得单个文件。
如果您想从 SCM 获取单个文件,Maven SCM API< /a> 允许您直接与 SCM 存储库交互以调用任意目标。 在此相关答案中,我提供了一个示例提交单个文件的自定义 Mojo,如果您实现该 mojo 并将命令从 add 更改为 checkout,您将避免签出整个项目。
Robert's answer is good, if the project is large though you'll be checking out a lot of content to get e single file.
If you want to get an individual file from SCM, the Maven SCM API allows you to interact directly with an SCM repository to invoke arbitrary goals. In this related answer I provide an example of a custom Mojo that commits a single file, if you implement that mojo and change the command from add to checkout you'll avoid having to checkout the entire project.