root/trunk/build/dirTools.xml

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

Fix dirTools after move of bwtools to separate project broke it.

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="org.bedework.project.bwtools"
16               location="${org.bedework.project.bedework}/../bwtools" />
17      
18     <property name="app.dest.classes"
19               location="${org.bedework.project.bwtools}/dist/tools/classes" />
20
21     <delete dir="${app.dest.classes}" />
22     <mkdir dir="${app.dest.classes}" />
23
24     <path id="run.classpath">
25       <fileset dir="${org.bedework.project.bwtools}/dist">
26          <include name="*.jar"/>
27       </fileset>
28         <fileset dir="${org.bedework.project.bwtools}/lib">
29            <include name="*.jar"/>
30         </fileset>
31       <pathelement location="${org.bedework.project.bwtools}/resources" />
32       <pathelement location="${app.dest.classes}" />
33     </path>
34
35     <copy todir="${app.dest.classes}"
36           file="${org.bedework.project.bwtools}/resources/log4j.xml" />
37
38     <pathconvert property="run.txt.classpath"
39                  refid="run.classpath"
40                  targetos="unix"  pathsep=":" />
41   </target>
42
43   <target name="initDir"
44           description="Build and run directory init">
45     <antfetch antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
46               target="initDir"
47               return="org.bedework.directory.init.status" >
48       <propertyset>
49         <propertyref prefix="org.bedework.directory."/>
50       </propertyset>
51       <property name="org.bedework.libcache.dir"
52                 location="${org.bedework.project.bedework}/libcache"/>
53     </antfetch>
54   </target>
55
56   <target name="initDirForQuickstart" depends="dirToolInit"
57           description="Build and run directory tool to initialise a quickstart system">
58     <java classname="org.bedework.tools.directory.DirTool"
59           fork="true"
60           failonerror="false"
61           resultproperty="org.bedework.dirtool.status" >
62       <classpath refid="run.classpath" />
63       <arg value="-clean-for-quickstart" />
64     </java>
65   </target>
66
67   <target name="addUser" depends="dirToolInit"
68           description="Run directory tools to add a user">
69     <java classname="org.bedework.tools.directory.DirTool"
70           fork="true"
71           failonerror="false"
72           resultproperty="org.bedework.dirtool.status" >
73       <classpath refid="run.classpath" />
74       <arg value="-addUser" />
75       <arg value="${org.bedework.directory.account}" />
76       <arg value="${org.bedework.directory.firstname}" />
77       <arg value="${org.bedework.directory.lastname}" />
78       <arg value="${org.bedework.directory.caladdr}" />
79       <arg value="${org.bedework.directory.password}" />
80     </java>
81   </target>
82
83   <target name="addGroup" depends="dirToolInit"
84           description="Build and run directory tools to add a group">
85     <java classname="org.bedework.tools.directory.DirTool"
86           fork="true"
87           failonerror="false"
88           resultproperty="org.bedework.dirtool.status" >
89       <classpath refid="run.classpath" />
90       <arg value="-addGroup" />
91       <arg value="${org.bedework.directory.group}" />
92       <arg value="${org.bedework.directory.group.member}" />
93     </java>
94   </target>
95
96   <target name="addGroupMember" depends="dirToolInit"
97           description="Build and run directory tools to add a group member">
98     <java classname="org.bedework.tools.directory.DirTool"
99           fork="true"
100           failonerror="false"
101           resultproperty="org.bedework.dirtool.status" >
102       <classpath refid="run.classpath" />
103       <arg value="-addGroupMember" />
104       <arg value="${org.bedework.directory.group}" />
105       <arg value="${org.bedework.directory.group.member}" />
106     </java>
107   </target>
108 </project>
Note: See TracBrowser for help on using the browser.