Maven, Subversion, Javadocs

is there any way to change the Javadocs @version value and automatically add the file version number to the SVN repository?

Template example

@version $ v rev. $ rev

and the output of @version v2.1 rev. 74321

update: I want to add version numbers and, if possible, tag names as versions

+3
source share
1 answer

You can use Subversion Subframe Substitution to replace the version number. For instance:

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

However, you need to set a property svn:keywordsfor each of the files for which you want to make this extension. eg:.

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

Source: https://habr.com/ru/post/1782675/


All Articles