<p>what is the best way of displaying/using the revision number in a java webapp?</p>

<p>we just use ant to build our .war archive, no buildserver or such. i'd hope there was some kind if $ref that i could write in a resource file, but this is only updated when the file in question is committed. i need it globally.</p>

<p>what would you recommend? post-commit triggers that update certain files?
custom ant scripts? is there a more non-hacky way of doing this?
or it it better to have my own version number independent of svn.</p>

<p>edit: great suggestions! thanks a lot for the answers!</p>

See
this thread
.
My favourite from that thread is just dumping
```
$Id:$
```
in your code where you want the revision ID. SVN will populate that with the real data when you do an export.