RSS Feeds for Subversion
Posted by: Matt in Software development, Web tools, tags: java, JDOM, RSS, Subversion, toolsI needed an application, available to my entire development team, to provide RSS feeds for commit activity in our Subversion repository. I found a couple of items that looked reasonable, but they required scripting languages I could not use in my environment - I needed a Java-based solution.
So I decided to write it.
To access Subversion, I used SVNKit, an all-java library for SVN access. To create the RSS feed file (which is just an XML file) I used JDOM, my favorite XML handling library.
To deploy it, just deploy the WAR File to your Servlet container. SvnRss web archive (WAR file)
To use it, hit the app, passing the SVN url as a query parameter (if your aggregator gives you trouble, try URL encoding it). If you need to authenticate to access the repository, specify uid=yourusername and pwd=password as query parameters as well. By default, the feed includes the last 100 revisions, but you can override this with the numRevisions=nn query parameter.
Example invocations:
http://yourserver/SvnRss/SvnRssServlet?svnUrl=svn://yourrepository:1230/java/trunk
http://yourserver/SvnRss/SvnRssServlet?svnUrl=svn://yourrepository:1230/java/trunk&uid=kescobar&pwd=whatsamanmonth
http://yourserver/SvnRss/SvnRssServlet?svnUrl=svn://yourrepository:1230/java/trunk&numRevisions=25
The source code (in an Eclipse project) is also available. SvnRss source code (Zip file)

Entries (RSS)