Project

General

Profile

Step 3 - First steps with Z2 on SVN » History » Version 4

Udo Offermann, 13.09.2012 14:50

1 1 Udo Offermann
h1. Step 4 - First steps with Z2 on SVN
2 2 Udo Offermann
3 4 Udo Offermann
[[Step 3 - First steps with Z2 on Git]] describes how to develop Z2 applications with Git using the Eclipse IDE. Z2 also supports SVN which we will shown you now.
4 2 Udo Offermann
The overall approach is the same: The single parts of the z2-environment - such as the core, base, add-ons, application - are stored in repositories, 
5 4 Udo Offermann
and Z2 loads the source code and 3rd party libraries on-demand from SVN using "SVNKit":http://svnkit.com/. In opposite to Git one will put the single z2-repositories 
6 2 Udo Offermann
(we call them _component repositories_, because they are the sources for the z2 components) into one SVN repository installation. 
7
8
h2. Prerequisites
9
10
You need a properly setup JDK 6 on Linux, Mac OS X or Windows - that's all.
11 1 Udo Offermann
A halfway modern system will do.
12
13 4 Udo Offermann
This how-to uses the "SVN":http://subversion.apache.org/ VCS (we're using SVN version 1.6 and 1.7). You can also run Z2 together with Git as described on [[Step 2 - Install and run in 5 minutes]] and [[Step 3 - First steps with Z2 on Git]].
14 1 Udo Offermann
15 4 Udo Offermann
For Eclipse-SVN integration we are using "Subclipse":http://subclipse.tigris.org/, which is also supported by the Z2 Eclipsoid plug-in. You can also use "Subversive":http://www.eclipse.org/subversive/ however there is no Eclipsoid-Subversive integration so far.
16
17
h2. Creating a home for Z2
18
19
The folder layout is a bit simpler with SVN because SVN workspace and Eclipse workspace can overlap. 
20
21
Create a folder called z2-base inside your favorite/home/development/what-ever directory and enter it. This will be the home for our Z2 installation and the Eclipse workspace:
22
23
<pre>
24
:dev$ mkdir z2-base
25
:dev$ cd z2-base
26
</pre>
27
28
h2. Cloning the Z2 core
29
30
Start Eclipse and choose z2-base as workspace. Go to the SVN repository perspective and add a new repository location "svn://z2-environment.net/z2-master/trunk/z2-base.core".
31
Right-click the new entry and choose "Checkout..." and simply click "finish" on first "Checkout from SVN" wizard page. The core will be downloaded into your Eclipse workspace and opened as project "core".
32
33
Switch back to the Java perspective and dive into the core project. You will see two _"z2_base*.launch"_ files - right-click the one that matches your OS and choose "Run As >" / "z2_base".
34
The Z2 server will be started inside a new window showing some log messages where the last one should be "... Completed worker process initialization".
35
36
In Eclipse go to menu "z2-environment" and choose "z2-Repositories View" - a new view should open inside the lower views-tab:
37
38
!z2-repositories_view_svn.png!