root/releases/bedework-3.7/build/dirTools.xml

Revision 2770 (checked in by douglm, 3 years ago)

Make sure we preserve libraries in quickstart for the directory tools

Fix dirTools.xml to use them

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      Load the deployment configuration from the properties file. We also load
5      the run time options and define some properties based on some of the
6      values found there
7      =================================================================== -->
8 <project name="dirTools" basedir="." default="">
9
10   <!-- =================================================================
11        Build and run the directory tools
12        ================================================================= -->
13
14   <target name="dirToolInit" >
15     <property name="app.dest.classes"
16               location="${org.bedework.project.bedework}/dist/tools/classes" />
17
18     <delete dir="${app.dest.classes}" />
19     <mkdir dir="${app.dest.classes}" />
20
21     <path id="run.classpath">
22       <fileset dir="${org.bedework.project.bedework}/dist/tools">
23          <include name="*.jar"/>
24       </fileset>
25       <pathelement location="${org.bedework.project.bwtools}/resources" />
26       <pathelement location="${app.dest.classes}" />
27     </path>
28
29     <copy todir="${app.dest.classes}"
30           file="${org.bedework.project.bwtools}/resources/log4j.xml" />
31
32     <pathconvert property="run.txt.classpath"
33                  refid="run.classpath"
34                  targetos="unix"  pathsep=":" />
35   </target>
36
37   <target name="initDir"
38           description="Build and run directory init">
39     <antfetch antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
40               target="initDir"
41               return="org.bedework.directory.init.status" >
42       <propertyset>
43         <propertyref prefix="org.bedework.directory."/>
44       </propertyset>
45       <property name="org.bedework.libcache.dir"
46                 location="${org.bedework.project.bedework}/libcache"/>
47     </antfetch>
48   </target>
49
50   <target name="initDirForQuickstart" depends="dirToolInit"
51           description="Build and run directory tool to initialise a quickstart system">
52     <java classname="org.bedework.tools.directory.DirTool"
53           fork="true"
54           failonerror="false"
55           resultproperty="org.bedework.dirtool.status" >
56       <classpath refid="run.classpath" />
57       <arg value="-clean-for-quickstart" />
58     </java>
59   </target>
60
61   <target name="addUser" depends="dirToolInit"
62           description="Run directory tools to add a user">
63     <java classname="org.bedework.tools.directory.DirTool"
64           fork="true"
65           failonerror="false"
66           resultproperty="org.bedework.dirtool.status" >
67       <classpath refid="run.classpath" />
68       <arg value="-addUser" />
69       <arg value="${org.bedework.directory.account}" />
70       <arg value="${org.bedework.directory.firstname}" />
71       <arg value="${org.bedework.directory.lastname}" />
72       <arg value="${org.bedework.directory.caladdr}" />
73       <arg value="${org.bedework.directory.password}" />
74     </java>
75   </target>
76
77   <target name="addGroup" depends="dirToolInit"
78           description="Build and run directory tools to add a group">
79     <java classname="org.bedework.tools.directory.DirTool"
80           fork="true"
81           failonerror="false"
82           resultproperty="org.bedework.dirtool.status" >
83       <classpath refid="run.classpath" />
84       <arg value="-addGroup" />
85       <arg value="${org.bedework.directory.group}" />
86       <arg value="${org.bedework.directory.group.member}" />
87     </java>
88   </target>
89
90   <target name="addGroupMember" depends="dirToolInit"
91           description="Build and run directory tools to add a group member">
92     <java classname="org.bedework.tools.directory.DirTool"
93           fork="true"
94           failonerror="false"
95           resultproperty="org.bedework.dirtool.status" >
96       <classpath refid="run.classpath" />
97       <arg value="-addGroupMember" />
98       <arg value="${org.bedework.directory.group}" />
99       <arg value="${org.bedework.directory.group.member}" />
100     </java>
101   </target>
102 </project>
Note: See TracBrowser for help on using the browser.