root/releases/bedework-3.8/build/quickstart/run-dir.xml

Revision 3333 (checked in by douglm, 2 years ago)

Move a number of property files into a common subdirectory of the configs.

Include the overrides first from the actual config and then the common properties.

Line 
1 <?xml version="1.0"?>
2
3 <!-- Run hsqldb for the bedework Calendar quickstart.
4
5      This is imported by the quickstart build.xml ensuring all changes to this file
6      appear in the repository.
7
8      Authors: Mike Douglass   douglm - rpi.edu
9 -->
10
11 <project name="quickstart-run-dir" default="dirstart" basedir=".">
12   <!-- This target normally overriden by the importing build.xml -->
13   <target name="init" />
14  
15   <!-- This target normally overriden by the importing build.xml -->
16   <target name="run.init" depends="init"/>
17
18   <!-- =================================================================
19        The "dirstart" target starts the directory server
20        ================================================================= -->
21
22   <target name="dirstart" depends="run.init"
23           description="starts the directory server">
24     <echo message="Starting directory in ${org.bedework.directory.dir}"/>
25     <java fork="true" dir="${org.bedework.directory.dir}"
26           classname="org.apache.directory.server.UberjarMain">
27       <classpath>
28         <fileset dir="${org.bedework.directory.dir}/lib">
29           <include name="**/*.jar"/>
30         </fileset>
31       </classpath>
32       <jvmarg value="-Dlog4j.configuration=file:conf/log4j.properties" />
33       <jvmarg value="-Dapacheds.log.dir=${org.bedework.directory.dir}/logs" />
34       <arg value="conf/server.xml"/>
35     </java>
36   </target>
37
38   <!-- =================================================================
39        The "dstool" target runs the directory server tool which
40        allows dump/restore and configuration.
41        ================================================================= -->
42
43   <target name="dstool" depends="run.init"
44           description="Runs the directory tool">
45     <echo message="Starting dstool"/>
46     <java fork="true" dir="${org.bedework.directory.dir}"
47           jar="${org.bedework.directory.dir}/bin/apacheds-tools.jar">
48       <arg value="install-path ${org.bedework.directory.dir}"/>
49       <arg value="--configuration" />
50       <arg value="--help" />
51     </java>
52   </target>
53
54   <!-- =================================================================
55        The "dirstop" target runs the directory server tool to shut down the
56        directory server.
57        ================================================================= -->
58
59   <target name="dirstop" depends="run.init"
60           description="Runs the directory tool">
61     <echo message="Starting dstool to shut down directory"/>
62     <java fork="true" dir="${org.bedework.directory.dir}"
63           jar="${org.bedework.directory.dir}/bin/apacheds-tools.jar">
64       <arg value="graceful" />
65       <arg line="--install-path ${org.bedework.directory.dir}"/>
66       <arg value="--configuration" />
67     </java>
68   </target>
69
70   <!-- =================================================================
71        Build and run the directory tools
72        ================================================================= -->
73
74   <target name="initDir" depends="run.init"
75           description="Build and run directory init">
76     <antfetch antfile="${bedework.build.file}" inheritrefs="true"
77               target="initDir"
78               return="org.bedework.directory.init.status" />
79   </target>
80
81   <target name="initDirForQuickstart" depends="run.init"
82           description="Build and run directory init">
83     <antfetch antfile="${bedework.build.file}" inheritrefs="true"
84               target="initDirForQuickstart"
85               return="org.bedework.directory.init.status" />
86   </target>
87
88   <target name="addUser" depends="run.init"
89           description="Build and run directory tools to add a user">
90     <ant antfile="${bedework.build.file}" inheritrefs="true"
91            target="addUser" />
92   </target>
93
94   <target name="addGroup" depends="run.init"
95           description="Build and run directory tools to add a group">
96     <ant antfile="${bedework.build.file}" inheritrefs="true"
97            target="addGroup" />
98   </target>
99
100   <target name="addGroupMember" depends="run.init"
101           description="Build and run directory tools to add a group member">
102     <ant antfile="${bedework.build.file}" inheritrefs="true"
103            target="addGroupMember" />
104   </target>
105
106   <!-- =================================================================
107        The "dirclient" target runs the directory server client which
108        provides a gui interface to the running directory.
109        ================================================================= -->
110
111   <target name="dirclient" depends="run.init"
112           description="Runs the directory client">
113     <echo message="Starting hsqldb DatabaseManager"/>
114     <echo message="Select type: HSQL Database Engine Server"/>
115     <echo message="Set the URL to jdbc:hsqldb:hsql://localhost:8887"/>
116     <java fork="true" dir="${basedir}"
117           classname="org.hsqldb.util.DatabaseManager">
118       <classpath>
119         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
120       </classpath>
121     </java>
122   </target>
123
124   <macrodef name="addBedeworkUser">
125     <attribute name="account"/>
126     <attribute name="firstName" default="first" />
127     <attribute name="lastName" default="last"/>
128     <attribute name="password" />
129     <sequential>
130       <var name="org.bedework.directory.account" value="@{account}" />
131       <var name="org.bedework.directory.firstname"  value="@{firstName}" />
132       <var name="org.bedework.directory.lastname"  value="@{lastName}" />
133       <var name="org.bedework.directory.password"  value="@{password}" />
134
135       <echo message="======== Add user ${org.bedework.directory.account} =======" />
136
137       <ant antfile="${bedework.build.file}" inheritrefs="true"
138              target="addUser" />
139     </sequential>
140   </macrodef>
141 </project>
Note: See TracBrowser for help on using the browser.