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