build_SE.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project basedir="schema"
  3. xmlns:p5build_SE="http://biuro.biall-net.pl/build_SE.xsd"
  4. name="p5build_SE" default="save_build_properties">
  5. <description>
  6. for main purposes to provide properties for another builds eg: dita-ot
  7. </description>
  8. <!-- main properties controlled by licence -->
  9. <!-- @2018 property correct structure -->
  10. <include file="${basedir}/build_SE_basedir/build.p5build_SE.PRODUCT.xml"/>
  11. <include file="schema/build_SE_basedir/build.p5build_SE.PRODUCT.xml" optional="true"/>
  12. <include file="${basedir}/build_SE_basedir/build.p5build_SE.SYSTEM.xml" as="SYSTEM"/>
  13. <include file="${basedir}/build.p5build.GLOBALS.xml"/>
  14. <!--<property name="p5build_SE.PRODUCT.name" value="p5build_SE"/>
  15. <property name="p5build_SE.PRODUCT.vendor-domain" value="pl.procesy5"/>
  16. <property name="p5build_SE.PRODUCT.name.PROCESY5.basedir" value="${basedir}/build_SE_basedir"/>
  17. <property name="p5build_SE.PRODUCT.name.PROCESY5.temp" value="${p5build_SE.PRODUCT.name.PROCESY5.basedir}/temp"/>-->
  18. <!-- EOF @2018 property correct structure -->
  19. <!-- TODO in build_resource_ant.xml <property name="dita.dir" value="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/>-->
  20. <!-- task to maintain properties -->
  21. <include file="${basedir}/build_SE_basedir/build_SE.fail_if_user_is_not_root.xml" as="uid"/>
  22. <include file="${basedir}/build_SE_basedir/build_SE.check_OS.xml" as="check_OS"/>
  23. <target name="p5build_SE:LaunchDaemons.test" description="To detect if system is capable of LaunchDaemons like OSX Server - TODO to better check it universally">
  24. <condition property="p5build_SE.LaunchDaemons.test" taskname="p5build_SE:OSX_SERVER.cond">
  25. <and>
  26. <available file="/Library/LaunchDaemons/" />
  27. <available file="${bin.launchctl}" />
  28. </and>
  29. </condition>
  30. <echo>#61 $os.name= ${os.name} $p5build_SE.LaunchDaemons test $p5build_SE.LaunchDaemons.test=${p5build_SE.LaunchDaemons.test} against /Library/LaunchDaemons/ ${p5build_SE.LaunchDaemons} to insstall psuis:addToLaunchctl </echo>
  31. </target>
  32. <target name="p5build_SE:OSX_SERVER.cond" depends="p5build_SE:LaunchDaemons.test,p5build_SE:OSX_SERVER.ok,p5build_SE:OSX_SERVER.fail" description="to detect if it is osx server and get its properties"/>
  33. <target name="p5build_SE:OSX_SERVER.ok" if="p5build_SE.LaunchDaemons.test" description="to detect if it is osx server and get its properties">
  34. <property name="p5build_SE.LaunchDaemons" value="/Library/LaunchDaemons/"/>
  35. <echo>#86 set $p5build_SE.LaunchDaemons = ${p5build_SE.LaunchDaemons} </echo>
  36. </target>
  37. <target name="p5build_SE:OSX_SERVER.fail" unless="p5build_SE.LaunchDaemons.test" description="to detect if it is osx server and get its properties">
  38. <echo>#72 THIS IS NOT p5build_SE:OSX_SERVER ! </echo>
  39. </target>
  40. <target name="p5build_SE:OSX_SERVER:launchctl.load.plist">
  41. <input addproperty="OSX_SERVER.plistFile"/>
  42. <input addproperty="addToLaunchctl.plistFile.installed.touch_if_ok" id="addToLaunchctl.plistFile.installed.touch_if_ok"/>
  43. <!--<local name="OSX_SERVER.launchctl.load.error"/>-->
  44. <echo>#87 z psuis.addToLaunchctl.plistFile.installed = ${psuis.addToLaunchctl.plistFile.installed}</echo>
  45. <exec executable="${bin.launchctl}" outputproperty="OSX_SERVER.launchctl.load.error" failifexecutionfails="false">
  46. <arg line="load ${OSX_SERVER.plistFile}"/>
  47. </exec>
  48. <echo> #94 check for errors: ${OSX_SERVER.launchctl.load.error} </echo>
  49. <antcall target="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.cond">
  50. <param name="OSX_SERVER.launchctl.load.error" value="${OSX_SERVER.launchctl.load.error}"/>
  51. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  52. <param name="addToLaunchctl.plistFile.installed.touch_if_ok" value="${addToLaunchctl.plistFile.installed.touch_if_ok}"/>
  53. <param name="addToLaunchctl.plistFile.installed.touch_if_ok.2" value="${addToLaunchctl.plistFile.installed.touch_if_ok}"/>
  54. </antcall>
  55. </target>
  56. <target name="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.cond" depends="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.test,p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok,p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.fail,p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_first_time">
  57. <input addproperty="OSX_SERVER.launchctl.load.error"/>
  58. <input addproperty="OSX_SERVER.plistFile"/>
  59. <!--<input addproperty="addToLaunchctl.plistFile.installed.touch_if_ok"/>-->
  60. <!--<antcall target="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.test">
  61. <param name="OSX_SERVER.launchctl.load.error" value="${OSX_SERVER.launchctl.load.error}"/>
  62. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  63. </antcall>
  64. <antcall target="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok">
  65. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  66. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  67. </antcall>
  68. <antcall target="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.fail">
  69. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  70. <param name="OSX_SERVER.launchctl.load.error" value="${OSX_SERVER.launchctl.load.error}"/>
  71. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  72. </antcall>
  73. <antcall target="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_first_time">
  74. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  75. <param name="OSX_SERVER.launchctl.load.error" value="${OSX_SERVER.launchctl.load.error}"/>
  76. <param name="OSX_SERVER.plistFile" value="${OSX_SERVER.plistFile}"/>
  77. </antcall>-->
  78. </target>
  79. <target name="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.test">
  80. <!--<input addproperty="addToLaunchctl.plistFile.installed.touch_if_ok"/>-->
  81. <echo>#124
  82. addToLaunchctl.plistFile.installed.touch_if_ok = ${addToLaunchctl.plistFile.installed.touch_if_ok}
  83. testing error OSX_SERVER.launchctl.load.error = ${OSX_SERVER.launchctl.load.error}
  84. </echo>
  85. <condition property="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.test" taskname="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.cond">
  86. <contains string="${OSX_SERVER.launchctl.load.error}" substring="service already loaded"/>
  87. </condition>
  88. <condition property="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_first_time" taskname="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.cond">
  89. <equals arg2="${OSX_SERVER.launchctl.load.error}" arg1=""/>
  90. </condition>
  91. <condition property="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_next_time" taskname="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.cond">
  92. <or>
  93. <equals arg2="${OSX_SERVER.launchctl.load.error}" arg1=""/>
  94. <contains string="${OSX_SERVER.launchctl.load.error}" substring="service already loaded"/>
  95. </or>
  96. </condition>
  97. </target>
  98. <target name="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok" if="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.test">
  99. <input addproperty="OSX_SERVER.plistFile"/>
  100. <!--<input addproperty="addToLaunchctl.plistFile.installed.touch_if_ok"/>-->
  101. <exec executable="${bin.launchctl}" outputproperty="OSX_SERVER.launchctl.load.error">
  102. <arg line="unload ${OSX_SERVER.plistFile}"/>
  103. </exec>
  104. <exec executable="${bin.launchctl}" outputproperty="OSX_SERVER.launchctl.load.error">
  105. <arg line="load ${OSX_SERVER.plistFile}"/>
  106. </exec>
  107. <echo>
  108. #142
  109. OSX_SERVER.plistFile = ${OSX_SERVER.plistFile}
  110. {addToLaunchctl.plistFile.installed.touch_if_ok} = ${addToLaunchctl.plistFile.installed.touch_if_ok}
  111. </echo>
  112. <touch file="${addToLaunchctl.plistFile.installed.touch_if_ok}"/>
  113. <chmod file="${addToLaunchctl.plistFile.installed.touch_if_ok}" perm="777"/>
  114. </target>
  115. <target name="p5build_SE:OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.fail" unless="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_next_time" >
  116. <input addproperty="OSX_SERVER.plistFile"/>
  117. <input addproperty="OSX_SERVER.launchctl.load.error"/>
  118. <!--<input addproperty="addToLaunchctl.plistFile.installed.touch_if_ok"/>-->
  119. <echo>#122 There was another error than "service already loaded" and not tried to reload :
  120. OSX_SERVER.plistFile = ${OSX_SERVER.plistFile}
  121. OSX_SERVER.launchctl.load.error = ${OSX_SERVER.launchctl.load.error}
  122. p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.test = ${p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.test}
  123. p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_first_time = ${p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_first_time}
  124. addToLaunchctl.plistFile.installed.touch_if_ok = ${addToLaunchctl.plistFile.installed.touch_if_ok}
  125. </echo>
  126. </target>
  127. <target name="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_first_time" if="p5build_SE.OSX_SERVER:launchctl.load.plist.unload_and_load_if_loaded.ok_first_time" >
  128. <input addproperty="OSX_SERVER.plistFile"/>
  129. <input addproperty="OSX_SERVER.launchctl.load.error"/>
  130. <!--<input addproperty="addToLaunchctl.plistFile.installed.touch_if_ok"/>-->
  131. <echo>#144 installed first time
  132. OSX_SERVER.plistFile = ${OSX_SERVER.plistFile}
  133. OSX_SERVER.launchctl.load.error = ${OSX_SERVER.launchctl.load.error}
  134. {addToLaunchctl.plistFile.installed.touch_if_ok} = ${addToLaunchctl.plistFile.installed.touch_if_ok}
  135. </echo>
  136. <touch file="${addToLaunchctl.plistFile.installed.touch_if_ok}"/>
  137. <chmod file="${addToLaunchctl.plistFile.installed.touch_if_ok}" perm="777"/>
  138. </target>
  139. <target name="p5build_SE.fail_if_user_is_root.check" >
  140. <property environment="env"/>
  141. <condition property="p5build_SE.fail_if_user_is_root.check" taskname="p5build_SE.fail_if_user_is_root.cond">
  142. <equals arg1="${env.USER}" arg2="root" />
  143. </condition>
  144. <echo> tested {env.USER} = ${env.USER}</echo>
  145. </target>
  146. <target name="p5build_SE.fail_if_user_is_root.cond" depends="p5build_SE.fail_if_user_is_root.check,p5build_SE.fail_if_user_is_root.ok,p5build_SE.fail_if_user_is_root.fail"/>
  147. <target name="p5build_SE.fail_if_user_is_root.ok" if="p5build_SE.fail_if_user_is_root.check" >
  148. <echo> OK user is not root ;-) </echo>
  149. </target>
  150. <target name="p5build_SE.fail_if_user_is_root.fail" unless="p5build_SE.fail_if_user_is_root.check" description="To fail command if the user is root">
  151. <fail> Current user is root - which was unantended</fail>
  152. </target>
  153. <target name="p5build_SE.fail_if_user_is_root" depends="p5build_SE.fail_if_user_is_root.cond" description="To fail command if the user is root"/>
  154. <target name="save_build_properties" depends=" SYSTEM.build_SE.SYSTEM ,build_SE.install_dirs,install_dirs.chmod,install_dirs.symlink,build_SE_read_procesy5_file_properties,build_SE_read_procesy5_default_db_properties,p5build_SE:OSX_SERVER.cond">
  155. <echo level="warning">#221 TODO TO REMOVE PROPERTIES !!! will properties to write ${build_SE.properties} and ${build_SE.properties.xml}</echo>
  156. <!-- <echoproperties destfile="${p5build_SE.properties}"/>
  157. <echoproperties destfile="${p5build_SE.properties.xml}" format="xml"/>
  158. <chmod file="${p5build_SE.properties}" perm="777" failonerror="false"/>
  159. <chmod file="${p5build_SE.properties.xml}" perm="777"/>
  160. <chown file="${p5build_SE.properties}" owner="${p5build_SE.SYSTEM.local-user}" failonerror="false" failifexecutionfails="false"/>
  161. <chown file="${p5build_SE.properties.xml}" owner="${p5build_SE.SYSTEM.local-user}" failonerror="false" failifexecutionfails="false"/> -->
  162. </target>
  163. <target name="build_SE.install_dirs">
  164. <echo level="verbose">#232 will make dir="${p5build_SE.basedir}" dir="${p5build_SE.temp}" and owner="${p5build_SE.SYSTEM.local-user}"
  165. $p5build_SE.INSTALL_ROOT.basedir = ${p5build_SE.INSTALL_ROOT.basedir}
  166. $p5build_SE.INSTALL_ROOT.configuration.dir = ${p5build_SE.INSTALL_ROOT.configuration.dir} </echo>
  167. <mkdir dir="${p5build_SE.basedir}"/>
  168. <mkdir dir="${p5build_SE.temp}"/>
  169. <mkdir dir="${p5build_SE.INSTALL_ROOT.basedir}"/>
  170. <mkdir dir="${p5build_SE.INSTALL_ROOT.configuration.dir}"/>
  171. <!-- TODO check if created - than chmod once -->
  172. <!--<antcall target="install_dirs.chmod"/>-->
  173. </target>
  174. <target name="install_dirs.chmod">
  175. <!--<chown owner="${p5build_SE.SYSTEM.local-user}" failonerror="false" failifexecutionfails="false" type="dir">
  176. <fileset dir="${p5build_SE.INSTALL_ROOT.configuration.dir}" />
  177. <fileset dir="${p5build_SE.INSTALL_ROOT.basedir}"/>
  178. <fileset dir="${p5build_SE.temp}"/>
  179. <fileset dir="${p5build_SE.basedir}"/>
  180. </chown>-->
  181. <chown owner="${p5build_SE.SYSTEM.local-user}" file="${p5build_SE.INSTALL_ROOT.basedir}" failonerror="false" failifexecutionfails="false" type="dir"/>
  182. <chown owner="${p5build_SE.SYSTEM.local-user}" file="${p5build_SE.INSTALL_ROOT.configuration.dir}" failonerror="false" failifexecutionfails="false" type="dir"/>
  183. <chown owner="${p5build_SE.SYSTEM.local-user}" file="${p5build_SE.temp}" failonerror="false" failifexecutionfails="false" type="dir"/>
  184. <chown owner="${p5build_SE.SYSTEM.local-user}" file="${p5build_SE.basedir}" failonerror="false" failifexecutionfails="false" type="dir"/>
  185. <!--<antcall target="build_SE.install_dirs.symlink"/>-->
  186. </target>
  187. <target name="install_dirs.symlink">
  188. <echo>#266 Symlink created for ${p5build_SE.INSTALL_ROOT.temp.symlink} , ${p5build_SE.INSTALL_ROOT.configuration.dir}, ${p5build_SE.INSTALL_ROOT.repository}</echo>
  189. <symlink resource="${p5build_SE.INSTALL_ROOT.temp}" link="${p5build_SE.INSTALL_ROOT.temp.symlink}" failonerror="false"/>
  190. <symlink resource="${p5build_SE.INSTALL_ROOT.configuration.dir}" link="${p5build_SE.INSTALL_ROOT.configuration.dir.symlink}" failonerror="false"/>
  191. <symlink resource="${p5build_SE.INSTALL_ROOT.repository}" link="${p5build_SE.INSTALL_ROOT.repository.symlink}" failonerror="false"/>
  192. </target>
  193. <target name="build_SE_read_procesy5_file_properties_check" description="Detect if there are procesy5_config.folders.server configured (in Procesy5 installation folder) ">
  194. <condition property="build_SE_read_procesy5_file_properties_check" taskname="build_SE_read_procesy5_file_properties">
  195. <available file="${procesy5_config.folders.server}" />
  196. <!--<available file="${procesy5_config}" />-->
  197. </condition>
  198. <!--<antcall target="build_SE_read_procesy5_file_properties_failed"/>-->
  199. </target>
  200. <target unless="build_SE_read_procesy5_file_properties_check" name="build_SE_read_procesy5_file_properties_failed" description="echo inform that there is not config exists">
  201. <echo> INFORM : propbably not installed in Procesy5 environment - not detected ${procesy5_config.folders.server} file</echo>
  202. </target>
  203. <target if="build_SE_read_procesy5_file_properties_check" name="build_SE_read_procesy5_file_properties" depends="build_SE_read_procesy5_file_properties_check,build_SE_read_procesy5_file_properties_failed,build_SE.install_dirs" description="TO read from procesy5_config.folders and procesy5_config.folders.server further do another direction this in install">
  204. <!--<loadfile property="procesy5_config.folders_loadfile" srcfile="${procesy5_config.folders}"/>-->
  205. <loadfile property="procesy5_config.folders.server_loadfile" srcfile="${procesy5_config.folders.server}"/>
  206. <mkdir dir="${build_SE_basedir.temp}"/>
  207. <tempfile property="procesy5_config.folders_loadfile_xml" destdir="${build_SE_basedir.temp}" prefix="procesy5_config.folders_loadfile_xml" suffix=".xml" deleteonexit="yes" />
  208. <echoxml file="${procesy5_config.folders_loadfile_xml}">
  209. <procesy5_config>
  210. <!--<procesy5_config.folders>${procesy5_config.folders_loadfile}</procesy5_config.folders>-->
  211. <procesy5_config.folders.server>${procesy5_config.folders.server_loadfile}</procesy5_config.folders.server>
  212. </procesy5_config>
  213. </echoxml>
  214. <chown file="${procesy5_config.folders_loadfile_xml}" owner="${p5build_SE.SYSTEM.local-user}" failonerror="false" failifexecutionfails="false"/>
  215. <xslt basedir="./" style="${procesy5_config.folders.xsl}" in="${procesy5_config.folders_loadfile_xml}" destdir="./" out="${procesy5_config.folders.properties.xml}" force="false">
  216. <factory name="net.sf.saxon.TransformerFactoryImpl">
  217. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  218. </factory>
  219. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  220. <param name="basedir" expression="${basedir}"/>
  221. <param name="p5build_SE.build_procesy5_config.folders.properties" expression="${p5build_SE.build_procesy5_config.folders.properties}"/>
  222. <!--<param name="webRootUrl" expression="${webRootUrl}" />-->
  223. <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
  224. <!--<param name="basedir" expression="${basedir}"/>-->
  225. </xslt>
  226. <!--<exec executable="open"><arg file="${procesy5_config.folders.properties.xml}"/></exec>-->
  227. <xslt basedir="./" style="${procesy5_config.folders.xsl}" in="${procesy5_config.folders.properties.xml}" destdir="./" out="${p5build_SE.build_procesy5_config.folders.properties.xml}" force="yes">
  228. <factory name="net.sf.saxon.TransformerFactoryImpl">
  229. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  230. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/build_SE.xsd}build_procesy5_config.folders.properties.xml"/>
  231. </factory>
  232. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  233. <param name="basedir" expression="${basedir}"/>
  234. <param name="p5build_SE.build_procesy5_config.folders.properties" expression="${p5build_SE.build_procesy5_config.folders.properties}"/>
  235. <!--<param name="webRootUrl" expression="${webRootUrl}" />-->
  236. <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
  237. <!--<param name="basedir" expression="${basedir}"/>-->
  238. </xslt>
  239. <!--<exec executable="open"><arg file="${p5build_SE.build_procesy5_config.folders.properties.xml}"/></exec>-->
  240. <ant antfile="${p5build_SE.build_procesy5_config.folders.properties.xml}"/>
  241. <loadproperties srcfile="${p5build_SE.build_procesy5_config.folders.properties}"/>
  242. <echo> #300 loaded $p5build_SE.build_procesy5_config.folders.... BI_audit_KW_requested_COLUMN.mount_point ${procesy5_config.folders.properties.xml} from ${p5build_SE.build_procesy5_config.folders.properties}; antfile ${p5build_SE.build_procesy5_config.folders.properties.xml}
  243. and also build with properties to default $p5build_SE.build_procesy5_config.folders.IN7_DZIENNIK_KORESP_COLUMN.mount_point = ${p5build_SE.build_procesy5_config.folders.IN7_DZIENNIK_KORESP_COLUMN.mount_point}
  244. $p5build_SE.build_procesy5_config.folders.properties = ${p5build_SE.build_procesy5_config.folders.properties}
  245. $p5build_SE.build_procesy5_config.folders.root_points.mount_point = ${p5build_SE.build_procesy5_config.folders.root_points.mount_point}
  246. </echo>
  247. <chown file="${procesy5_config.folders.properties.xml}" owner="${p5build_SE.SYSTEM.local-user}" failonerror="false" failifexecutionfails="false"/>
  248. </target>
  249. <!-- default_db -->
  250. <target name="build_SE_read_procesy5_default_db_properties_check" description="Detect if there are procesy5_config.folders.server configured (in Procesy5 installation folder) ">
  251. <condition property="build_SE_read_procesy5_default_db_properties_check" taskname="build_SE_read_procesy5_default_db_properties">
  252. <available file="${procesy5_config.default_db.server}" />
  253. </condition>
  254. <!--<antcall target="build_SE_read_procesy5_default_db_properties_failed"/>-->
  255. </target>
  256. <target unless="build_SE_read_procesy5_default_db_properties_check" name="build_SE_read_procesy5_default_db_properties_failed" description="echo inform that there is not config exists">
  257. <echo> INFORM : propbably not installed in Procesy5 environment - not detected ${procesy5_config.default_db.server} file</echo>
  258. </target>
  259. <target if="build_SE_read_procesy5_default_db_properties_check" name="build_SE_read_procesy5_default_db_properties" depends="build_SE_read_procesy5_default_db_properties_check,build_SE_read_procesy5_default_db_properties_failed,build_SE.install_dirs" description="TO read from procesy5_config.folders and procesy5_config.folders.server further do another direction this in install">
  260. <!--<loadfile property="procesy5_config.folders_loadfile" srcfile="${procesy5_config.folders}"/>-->
  261. <loadfile property="procesy5_config.default_db.server_loadfile" srcfile="${procesy5_config.default_db.server}"/>
  262. <tempfile property="procesy5_config.default_db_loadfile_xml" destdir="${build_SE_basedir.temp}" prefix="procesy5_config.default_db_loadfile_xml" suffix=".xml" deleteonexit="yes"/>
  263. <echoxml file="${procesy5_config.default_db_loadfile_xml}">
  264. <procesy5_config>
  265. <!--<procesy5_config.folders>${procesy5_config.folders_loadfile}</procesy5_config.folders>-->
  266. <procesy5_config.default_db.server>${procesy5_config.default_db.server_loadfile}</procesy5_config.default_db.server>
  267. </procesy5_config>
  268. </echoxml>
  269. <xslt basedir="./" style="${procesy5_config.default_db.xsl}" in="${procesy5_config.default_db_loadfile_xml}" destdir="./" out="${procesy5_config.default_db.properties.xml}" force="false" >
  270. <factory name="net.sf.saxon.TransformerFactoryImpl">
  271. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  272. </factory>
  273. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  274. <param name="procesy5_config.default_db.properties" expression="${procesy5_config.default_db.properties}"/>
  275. <param name="basedir" expression="${basedir}"/>
  276. <!--<param name="webRootUrl" expression="${webRootUrl}" />-->
  277. <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
  278. <!--<param name="basedir" expression="${basedir}"/>-->
  279. </xslt>
  280. <xslt basedir="./" style="${procesy5_config.default_db.xsl}" in="${procesy5_config.default_db.properties.xml}" destdir="./" out="${p5build_SE.build_procesy5_config.default_db.properties.xml}" force="false" failonerror="true">
  281. <factory name="net.sf.saxon.TransformerFactoryImpl">
  282. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  283. <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/build_SE.xsd}build_procesy5_config.default_db.properties.xml"/>
  284. </factory>
  285. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  286. <param name="procesy5_config.default_db.properties" expression="${procesy5_config.default_db.properties}"/>
  287. <param name="basedir" expression="${basedir}"/>
  288. <param name="p5build_SE.build_procesy5_config.default_db.properties" expression="${p5build_SE.build_procesy5_config.default_db.properties}"/>
  289. <!--<param name="webRootUrl" expression="${webRootUrl}" />-->
  290. <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
  291. <!--<param name="basedir" expression="${basedir}"/>-->
  292. </xslt>
  293. <ant antfile="${p5build_SE.build_procesy5_config.default_db.properties.xml}"/>
  294. <loadproperties srcfile="${p5build_SE.build_procesy5_config.default_db.properties}"/>
  295. <echo> #342 loaded $procesy5_config.default_db.properties.xml ${procesy5_config.default_db.properties.xml} from ${p5build_SE.build_procesy5_config.default_db.properties}; antfile ${p5build_SE.build_procesy5_config.default_db.properties.xml}
  296. and also build with properties to default database = p5build_SE.procesy5_config.default_db.server.type = ${p5build_SE.procesy5_config.default_db.server.type}
  297. $procesy5_config.default_db.properties.xml = ${procesy5_config.default_db.properties.xml}
  298. </echo>
  299. <loadfile property="procesy5_config.default_db.properties.xml.file" srcfile="${procesy5_config.default_db.properties.xml}"/>
  300. <!--<echo>#60 reading $procesy5_config.default_db.properties.xml ${procesy5_config.default_db.properties.xml.file}
  301. ${procesy5_config.default_db.properties.xml.file}
  302. </echo>-->
  303. </target>
  304. <target name="procesy5_root_build_save_procesy5_file_properties" description="TODO in install licence task"/>
  305. </project>