SVNResource

This resource is now deprecated and will be removed in V4.

You might want to use the RunnableResource with java code to access SVN (example here) or even a ScriptedRunnable

The SVN Resource allows configuration to be stored in an SVN repository.

The implementation is based on the V2 one which checks out an entire SVN URL into a specified directory (tree) and then uses the file as the source of input to the resource.  This resource can be used with property replacement.

Configuring the SVNResource

Licensing constraints mean that the required jars cannot be bundled with the Shibboleth distribution and so, prior to configuring an SVN resource, you need to download the SVNKit jar from into %{idp.home}/edit-webapp/WEB-INF/lib and rebuild and deploy the war file.  

The SVN resource is fully configured via its constructor.  The documentation for the BasicAuthenticationManager,   SVNClientManager, and SVNURL should also be consulted.  The SVNBasicAuthenticationManager extends the  BasicAuthenticationManager by the addition of bean-like setters for the proxying information.

A typical configuration segment might be:

Configuration segment for SVN Resource
	<bean id="AuthnMgr" class="org.tmatesoft.svn.core.auth.BasicAuthenticationManager">
		<constructor-arg>
			<null />
		</constructor-arg>
		<!-- alternatively username/pass, username/KeyStore/passphrase/port see 
			http://svnkit.com/javadoc/org/tmatesoft/svn/core/auth/BasicAuthenticationManager.html#constructor_detail -->
	</bean>
	<bean id="ClientMgr" factory-method="newInstance"
		class="org.tmatesoft.svn.core.wc.SVNClientManager"
		p:authenticationManager-ref="AuthnMgr" />
	<bean id="TheSVNURL" factory-method="create" class="org.tmatesoft.svn.core.SVNURL">
		<!-- see http://svnkit.com/javadoc/org/tmatesoft/svn/core/SVNURL.html -->
		<constructor-arg value="https" />
		<constructor-arg>
			<null />
		</constructor-arg>
		<constructor-arg value="svn.shibboleth.net" />
		<constructor-arg value="-1" />
		<constructor-arg
			value="/utilities/spring-extensions/trunk/src/test/resources/data/" />
		<constructor-arg value="false" />
	</bean>
	<bean id="TheSVNResource" class="net.shibboleth.ext.spring.resource.SVNResource">
		<constructor-arg ref="ClientMgr" />
		<constructor-arg ref="TheSVNURL" />
		<constructor-arg value="D:/testdir/dir" />
		<constructor-arg value="-1" />
		<constructor-arg value="TestResource.txt" />
	</bean>

Related Topic

The same underlying code is used when configuring Metadata to be loaded from SVN.  See SVNResourceConfiguration