Maven、Subversion、Javadoc

发布于 2024-10-09 19:15:36 字数 158 浏览 0 评论 0原文

有没有办法修改 Javadocs @version 值并在 SVN 存储库上自动添加文件的修订号?

示例模板 @版本 $v 修订版。 $rev

和输出 @版本 v2.1 修订版。 74321

更新: 我想添加修订号和“也许”如果可能的话,标签名称作为版本

is there any way to modify Javadocs @version value and add revision number of the file automaticly on SVN repository?

example template
@version $v rev. $rev

and output
@version v2.1 rev. 74321

update:
i want to add revision numbers and "maybe" if it would be possible, tag-names as versions

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

待天淡蓝洁白时 2024-10-16 19:15:36

您可以使用 Subversion 关键字替换替换修订号。例如:

/**
 * Get the <tt>foo</tt> value.
 *
 * @version $Revision$
 */
class Foo
{
    ...
}

但是,您需要为要进行扩展的每个文件设置 svn:keywords 属性。例如:

$ svn propset svn:keywords "Revision" Foo.java
property 'svn:keywords' set on 'Foo.java'

You can use Subversion keyword substitution to substitute the revision number. For instance:

/**
 * Get the <tt>foo</tt> value.
 *
 * @version $Revision$
 */
class Foo
{
    ...
}

However, you'll need to set the svn:keywords property on each of the files for which you want to do that expansion. e.g.:

$ svn propset svn:keywords "Revision" Foo.java
property 'svn:keywords' set on 'Foo.java'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文