Project

General

Profile

How to Subversion » History » Revision 8

Revision 7 (Henning Blohm, 05.07.2015 21:35) → Revision 8/10 (Henning Blohm, 30.08.2015 17:49)

h1. How to use Z2 with Subversion 

 h2. Principles 

 Instead of using Git as component repository storage, you can instead use the "Subversion Source Control Management System":http://subversion.apache.org/. Using This page describes how to setup your a Z2-system inside your own Subversion (or SVN for short) backed component repository is very similar server. If want to any other component repository. Essentially you: 

 # Declare repositories as *com.zfabrik.svncr* components, rather than for example *com.zfabrik.gitcr* components. The reference at http://www.z2-environment.eu/v22doc#subversionComponentRepositories describes the details. 
 # Have the typical component repository structure consisting of modules know how Z2 and components at where your repository URL point to. In contrast SVN are working together you should refer to Git, with Subversion you may have as many component repositories in one Subversion repository as you like. 

 Please also check out [[Step 4 - First steps with Z2 on SVN|First steps with Z2 on SVN]]. 

 All Git repositories hosted on this site are also available as Subversion repositories. See [[Repositories]] for more details. 

 h2. Configuring Setting up your own Z2 for Subversion access 

 There server is one pre-requisite however. You need to configure z2 for Subversion repository access. Starting after version 2.3, Z2 no longer provides the SVNKit libraries, in order to have a simpler license regime (only Apache 2 and compatible). quite easy. this guide will show you  

 You may use z2 with two different access methods: 

 * JavaHL: Using the JavaHL API requires you # how to install a native library setup your own SVN server and a wrapper API on copy the operating system you run Z2 on. The good news is that OS packages are available - at least for linux-style systems. This approach means there is no code with problematic license required in Z2. 

 * SVNKit: If the SVNKit license (check out http://www.svnkit.com/licensing.html) is acceptable for your use-case you may simply modify your z2 core in a way to make use of SVNkit as z2-environment.net Subversion access API. SVNKit is a pure-Java implementation, requires no further OS modification, and is somewhat faster than JavaHL. 


 h2. Configuring for JavaHL 

 In the example of recent Ubuntu releases, installing JavaHL means to run  

 <pre><code class="bash">  
 sudo apt-get install libsvn-java content into it 
 </code></pre> 

 After that, you will have  

 # a native library @libsvnjavahl-1.so@ in @/usr/lib/x86_64-linux-gnu/jni/lib@  
 # a wrapper API jar @/usr/share/java/svn-javahl.jar@ 

 If these paths differ, configure your configuration change needs to be adapted accordingly. In order to make sure Z2 can load these libraries, we need to set the @java.library.path@ configuration for the VMs as well as we need to adapt the z2 classpath. It is simplest to apply both configurations in the file @run/bin/launch.properties@ of your z2 <home> installation. 

 In new Z2-SVN server so that file you will find a @home.vmopts@ property that may look like this: 

 <pre><code class="bash"> 
 home.vmopts=\ 
	 -Xms32M -Xmx64M -cp z.jar \ 
	 -Dcom.sun.management.config.file=management.properties \ 
	 -Djava.util.logging.config.file=logging.properties \ 
	 -Dcom.zfabrik.home.concurrency=5 \ 
	 -Dcom.zfabrik.home.layout=environment/home \ 
	 -Dcom.zfabrik.dev.local.workspace=../../../../../.. \ 
	 -Dcom.zfabrik.mode=development \ 
	 -Dcom.zfabrik.hubcr.mode=relaxed \ 
	 -Dcom.zfabrik.system.id=z2_core 
 </code></pre> 

 Using not longer the paths from above, change this to (changes in bold): 

 <pre><code class="bash"><notextile> 
 home.vmopts=\ 
	 -Xms32M -Xmx64M -cp z.jar:</notextile>*/usr/share/java/svn-javahl.jar*<notextile> \ 
     </notextile>*-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/*<notextile> \ 
	 -Dcom.sun.management.config.file=management.properties \ 
	 -Djava.util.logging.config.file=logging.properties \ 
	 -Dcom.zfabrik.home.concurrency=5 \ 
	 -Dcom.zfabrik.home.layout=environment/home \ 
	 -Dcom.zfabrik.dev.local.workspace=../../../../../.. \ 
	 -Dcom.zfabrik.mode=development \ 
	 -Dcom.zfabrik.hubcr.mode=relaxed \ 
	 -Dcom.zfabrik.system.id=z2_core 
 </code></pre> 

 Done. At first attempt, Z2 will report  

 <pre> 
 Found JavaHL support. Will use JavaHL repository access 
 </pre> 

 h2. Configuring for SVNKit 

 Assuming license restrictions repositories on z2-environment.net are acceptable for you: 

 # Go to www.svnkit.com and download a recent standalone distribution, 
 # Expand the *lib* folder of the svnkit distribution into the already present folder @run/local/com.zfabrik.boot.svnaccess.svnkit/java/bin.api/lib@ of your Z2 <home> installation. This folder is there for exactly the purpose of holding the SVNKit libraries, if needed. 

 *Please make sure the libraries are really in that folder rather than some nested folder that may have been created during extraction.* 

 Done. At first attempt, Z2 will report  

 <pre> 
 Found SVNKit support. Will use SVNKit repository access. 
 </pre> 

 Note: If present, SVNKit will be used with preference over JavaHL.