Hello,

For my usage I modified DAVConfig to make it enable to get repository path 
value from sevlet deployement configuration.

I added below declaration in web.xml file to define the 
java:comp/env/url/SVNPathJNDI url resource

<resource-ref>
<description>svn path</description>
<res-ref-name>url/SVNPathJNDI</res-ref-name>
<res-type>java.net.URL</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Using jetty as web application server I declared JNDI resource in deployement 
context
  <New id="repositoryFolder" class="org.eclipse.jetty.plus.jndi.Resource">
  <Arg>url/SVNPathJNDI</Arg>
  <Arg>
  <New class="java.net.URL">
  <Arg type="java.lang.String">file:///C:/tmp/svn_repo/svnroot</Arg>
  </New>
  </Arg>
  </New>
My feeling is that svnkit-dav is not "ready to deploy" and needs some 
development arround it to use it.

Best regards
Luc

Attachment: DAVConfig.java
Description: Binary data

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
	<display-name>DAV Subversion Servlet</display-name>
	<servlet>
		<servlet-name>websvn</servlet-name>
		<servlet-class>org.tmatesoft.svn.core.internal.server.dav.DAVServlet</servlet-class>
		<!-- <init-param> -->
		<!-- <param-name>SVNPath</param-name> <param-value>c:/tmp/svn-test-work/local_tmp/repos</param-value> -->
		<!-- </init-param> -->
		<!--<init-param> -->
		<!--<param-name>AuthzSVNAccessFile</param-name> -->
		<!--<param-value>/var/svn/access_conf</param-value> -->
		<!--</init-param> -->
	</servlet>
	<servlet-mapping>
		<servlet-name>websvn</servlet-name>
		<url-pattern>/svnroot/*</url-pattern>
	</servlet-mapping>

	<resource-ref>
		<description>svn path</description>
		<res-ref-name>url/SVNPathJNDI</res-ref-name>
		<res-type>java.net.URL</res-type>
		<res-auth>Application</res-auth>
		<res-sharing-scope>Shareable</res-sharing-scope>
	</resource-ref>

	<!-- <security-constraint> <display-name>DAV SVNKit Security Constraint</display-name> 
		<web-resource-collection> <web-resource-name>svnkit1</web-resource-name> 
		<url-pattern>/svn-test-work/repositories/*</url-pattern> </web-resource-collection> 
		<auth-constraint> <role-name>tomcat</role-name> </auth-constraint> </security-constraint> 
		<security-constraint> <display-name>DAV SVNKit Security Constraint</display-name> 
		<web-resource-collection> <web-resource-name>svnkit2</web-resource-name> 
		<url-pattern>/svn-test-work/local_tmp/repos/*</url-pattern> </web-resource-collection> 
		<auth-constraint> <role-name>tomcat</role-name> </auth-constraint> </security-constraint> 
		<login-config> <auth-method>BASIC</auth-method> <realm-name>SVNKit Repository 
		Realm</realm-name> </login-config> <security-role> <role-name>tomcat</role-name> 
		</security-role> -->
</web-app>
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.tmatesoft.svnkit</groupId>
	<artifactId>svnkit-dav</artifactId>
	<version>1.7.0-alpha2</version>
	<packaging>jar</packaging>

	<properties>
		<!-- to avoid: [WARNING] Using platform encoding to copy filtered resources, 
			i.e. build is platform dependent! -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.tmatesoft.svnkit</groupId>
			<artifactId>svnkit</artifactId>
			<version>1.7.0-alpha2</version>
		</dependency>
		<dependency>
			<groupId>org.tmatesoft.sqljet</groupId>
			<artifactId>sqljet</artifactId>
			<version>1.0.4</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

		</plugins>
	</build>

</project>

Reply via email to