Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven, Subversion, Javadocs

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

like image 696
Erhan Bagdemir Avatar asked Nov 27 '25 00:11

Erhan Bagdemir


1 Answers

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'
like image 168
Brian Clapper Avatar answered Nov 29 '25 13:11

Brian Clapper