root/trunk/build/quickstart/run-dir.xml

Revision 1944 (checked in by douglm, 5 years ago)

Changes to get an install script working

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