build.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project basedir="." name="procesy5_status" default="procesy5_status" >
  3. <description>TODO do kontroli kondycji systemu komunikacja - do podlaczenia pod API aby mozna było po tym requestowac</description>
  4. <property name="temp" value="temp_procesy5_status"/>
  5. <property name="out" value="out"/>
  6. <property name="storage_free.xml" value="${temp}/storage_free.xml" />
  7. <property name="procesy5_status" value="${temp}/procesy5_status"/>
  8. <property name="procesy5_status.xml" value="${out}/procesy5_status.xml"/>
  9. <property name="empty.xml" value="empty.xml"/>
  10. <!--<tempfile property="storage_free" deleteonexit="false" destdir="${temp}"/>-->
  11. <property name="procesy5_status.xsl" value="procesy5_status.xsl"/>
  12. <target name="create_dirs">
  13. <mkdir dir="${temp}"/>
  14. <mkdir dir="${out}"/>
  15. </target>
  16. <target name="storage_free" depends="create_dirs">
  17. <exec executable="df" outputproperty="storage_free" >
  18. <arg line=" -mT hfs"/>
  19. </exec>
  20. <!--<echo file="${storage_free}"> Testowa zawartosc do zapisania</echo>-->
  21. <!--<loadfile srcfile="${storage_free}" property="loadfile"/>-->
  22. <echoxml file="${storage_free.xml}">
  23. <storage_free.xml>${storage_free}</storage_free.xml>
  24. </echoxml>
  25. <!--<loadfile srcfile="${storage_free.xml}" property="loadfile.xml"/>-->
  26. <echo> storage_free ${loadfile}
  27. xml:
  28. ${storage_free}
  29. </echo>
  30. </target>
  31. <target name="procesy5_status" depends="storage_free" description="sprawdzenie kondycji systemu">
  32. <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
  33. <xslt basedir="./"
  34. in="${empty.xml}"
  35. style="${procesy5_status.xsl}"
  36. destdir="./"
  37. out="${procesy5_status.xml}" >
  38. <factory name="net.sf.saxon.TransformerFactoryImpl">
  39. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  40. <attribute name="http://saxon.sf.net/feature/initialTemplate" value="build_procesy5_status" />
  41. </factory>
  42. <param name="temp"
  43. expression="${temp}"/>
  44. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  45. </xslt>
  46. <loadfile srcfile="${procesy5_status.xml}" property="result"/>
  47. <echo>RAPORT Z DZIALANIA:</echo>
  48. <echo>${result}</echo>
  49. </target>
  50. </project>