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

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

Changes to the build process an adding some install scripts

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     <antfetch antfile="${bedework.build.file}" inheritrefs="true"
80               target="initDir"
81               return="org.bedework.directory.init.status" />
82   </target>
83
84   <target name="initDirForQuickstart" depends="run.init"
85           description="Build and run directory init">
86     <antfetch antfile="${bedework.build.file}" inheritrefs="true"
87               target="initDirForQuickstart"
88               return="org.bedework.directory.init.status" />
89   </target>
90
91   <target name="addUser" depends="run.init"
92           description="Build and run directory tools to add a user">
93     <ant antfile="${bedework.build.file}" inheritrefs="true"
94            target="addUser" />
95   </target>
96
97   <target name="addGroup" depends="run.init"
98           description="Build and run directory tools to add a group">
99     <ant antfile="${bedework.build.file}" inheritrefs="true"
100            target="addGroup" />
101   </target>
102
103   <target name="addGroupMember" depends="run.init"
104           description="Build and run directory tools to add a group member">
105     <ant antfile="${bedework.build.file}" inheritrefs="true"
106            target="addGroupMember" />
107   </target>
108
109   <!-- =================================================================
110        The "dirclient" target runs the directory server client which
111        provides a gui interface to the running directory.
112        ================================================================= -->
113
114   <target name="dirclient" depends="run.init"
115           description="Runs the directory client">
116     <echo message="Starting hsqldb DatabaseManager"/>
117     <echo message="Select type: HSQL Database Engine Server"/>
118     <echo message="Set the URL to jdbc:hsqldb:hsql://localhost:8887"/>
119     <java fork="true" dir="${basedir}"
120           classname="org.hsqldb.util.DatabaseManager">
121       <classpath>
122         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
123       </classpath>
124     </java>
125   </target>
126
127   <macrodef name="addBedeworkUser">
128     <attribute name="account"/>
129     <attribute name="firstName" default="first" />
130     <attribute name="lastName" default="last"/>
131     <attribute name="password" />
132     <sequential>
133       <var name="org.bedework.directory.account" value="@{account}" />
134       <var name="org.bedework.directory.firstname"  value="@{firstName}" />
135       <var name="org.bedework.directory.lastname"  value="@{lastName}" />
136       <var name="org.bedework.directory.password"  value="@{password}" />
137
138       <echo message="======== Add user ${org.bedework.directory.account} =======" />
139
140       <ant antfile="${bedework.build.file}" inheritrefs="true"
141              target="addUser" />
142     </sequential>
143   </macrodef>
144 </project>
Note: See TracBrowser for help on using the browser.