Maven Mojo 和SCM 插件:添加文件以忽略列表/设置 SVN 属性
我通过注入的 ScmManager
对象在自己的 Maven Mojo 中使用 maven-scm-plugin
,并试图找出如何将文件添加到 SCM 忽略列表。
ScmManager
提供的方法似乎不支持这一点。
理想的解决方案适用于 maven-scm-plugin
支持的所有 SCM 系统。我不确定是否每个系统都有这样的功能。也就是说,仅适用于 Subversion 存储库的解决方案也会对我有所帮助。
相应的SVN命令类似于
svn propset svn:ignore -F theFile .
如果ScmManager
不能直接设置忽略列表,也许它有能力设置这些类型的SCM属性?
I'm using maven-scm-plugin
from within an own Maven Mojo via an injected ScmManager
object and am trying to figure out how to add a file to the SCM ignore list.
The methods that ScmManager
provides don't seem to support this.
An ideal solution would work in all SCM systems that maven-scm-plugin
supports. I'm not sure though if every system has such a feature. That said, a solution which only works with Subversion repositories would help me as well.
The corresponding SVN command would be something like
svn propset svn:ignore -F theFile .
If ScmManager
cannot directly set ignore lists, maybe it has an ability to set these kind of SCM properties?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SCM 管理器或多或少是所有版本控制工具的抽象,因此我认为它永远不会提供这样的功能。但为什么 Maven 中需要这样的东西呢? Maven 是一个构建工具...如果您只需要 SVN,也许您可以创建一个单独的独立 Maven 插件来处理此类事情。
The SCM Manager is an abstraction of more or less all version control tools so i think it would never offer such a functionality. But why do you need such a thing in Maven ? Maven is a build tool...Mabe you can create a separate stand-alone Maven Plugin to handle such things if you need for SVN only.