Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.70 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3.  
  4. -->
  5. <project name="all" default=""
  6. xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ivytasks="antlib:de.bayern.ihv.ivytasks">
  7.  
  8. <property name="common.dir" value="${basedir}/common" />
  9. <property name="wkspace.dir" value="${basedir}" />
  10. <property name="projects.dir" value="${basedir}/projects" />
  11.  
  12.  
  13. <import file="${common.dir}/common.xml"/>
  14.  
  15. <target name="build-list" depends="load-ivy">
  16. <ivy:buildlist reference="build-path" onMissingDescriptor="skip" >
  17. <fileset dir="${projects.dir}">
  18. <include name="*/build.xml" />
  19. <exclude name="framework/build.xml" />
  20. <exclude name="converter/build.xml" />
  21. </fileset>
  22. </ivy:buildlist>
  23. </target>
  24.  
  25.  
  26. <target name="jboss-start" description="--> Startet den JBoss">
  27. <subant target="jboss-start" buildpath="${projects.dir}/ihv-deploy" />
  28. </target>
  29.  
  30. <target name="jboss-stop" description="--> Stoppt den JBoss">
  31. <subant target="jboss-stop" buildpath="${projects.dir}/ihv-deploy" />
  32. </target>
  33.  
  34. <target name="jboss-clean-install" description="--> Loescht den JBoss und installiert ihn neu">
  35. <subant target="jboss-clean-install" buildpath="${projects.dir}/ihv-deploy" />
  36. </target>
  37.  
  38.  
  39. <!-- nur Interne Verwendung am Hudson: es wird geprüft, ob das Deployment schon fertig ist -->
  40. <target name="deploy-check">
  41. <subant target="deploy-check" buildpath="${projects.dir}/ihv-deploy" />
  42. </target>
  43.  
  44. <target name="init-test-db" >
  45. <subant target="init-test-db" buildpath="${projects.dir}/ihv-setup" inheritall="false" />
  46. <!--echo message="Aufruf bitte im Verzeichnis ${projects.dir}/ihv-setup mit ant init-test-db durchfuehren!" /-->
  47. </target>
  48.  
  49. <target name="test" depends="load-ivy" >
  50. <echo message="Die Shared-Tests werden ausgeführt" />
  51. <subant target="test" buildpath="${projects.dir}/ihv-shared" />
  52. <echo message="Die Client-Tests werden ausgeführt" />
  53. <subant target="test" buildpath="${projects.dir}/ihv-client" />
  54. <echo message="Die Server-Tests werden ausgeführt" />
  55. <subant target="test" buildpath="${projects.dir}/ihv-server" />
  56.  
  57. <if>
  58. <equals arg1="${env.development}" arg2="true" />
  59. <then>
  60. <exec executable="${wkspace.dir}/show-test-reports.bat" >
  61. <arg value="/c" />
  62. <arg value="show-test-reports.bat" />
  63. <arg value="-p" />
  64. </exec>
  65. </then>
  66. <else>
  67. <echo message="Datei konnte nicht ausgeführt werden!" />
  68. </else>
  69. </if>
  70. </target>
  71.  
  72. <target name="jasper" description="--> Uebersetzt Server und Client Reports 'on-the-fly'">
  73. <subant target="jasper" buildpath="${projects.dir}/ihv-server"/>
  74. <subant target="jasper" buildpath="${projects.dir}/ihv-client"/>
  75. </target>
  76.  
  77. <target name="jasper-server" description="--> Uebersetzt Server Reports 'on-the-fly'">
  78. <subant target="jasper" buildpath="${projects.dir}/ihv-server"/>
  79. </target>
  80.  
  81. <target name="jasper-client" description="--> Uebersetzt Client Reports 'on-the-fly'">
  82. <subant target="jasper" buildpath="${projects.dir}/ihv-client"/>
  83. </target>
  84.  
  85. <target name="clean-cache" description="--> Loescht den Ivy-Cache">
  86. <delete dir="${ivy.default.ivy.user.dir}" />
  87. </target>
  88.  
  89. <target name="dist" depends="install" description="--> Uebersetzt, packt und installiert alle Projekte" />
  90.  
  91. <target name="report" depends="build-list">
  92. <subant target="report" buildpathref="build-path" />
  93. </target>
  94.  
  95. <target name="clean-local" depends="build-list">
  96. <subant target="clean-local" buildpathref="build-path" />
  97. </target>
  98.  
  99. <target name="install" depends="build-list" description="--> Uebersetzt, packt und installiert alle Projekte">
  100. <subant target="install" buildpathref="build-path" />
  101. </target>
  102.  
  103. <target name="release" depends="build-list"
  104. description="--> Uebersetzt, packt und veröffentlicht alle Projekte">
  105. <subant target="release" buildpathref="build-path"/>
  106. </target>
  107.  
  108. <target name="clean" depends="build-list" description="--> Bereinigt alle Projekte">
  109. <subant target="clean" buildpathref="build-path"/>
  110. </target>
  111.  
  112. <target name="deploy" description="--> Deployed das lokale IHV.EAR im lokalen JBoss">
  113. <subant target="deploy" buildpath="${projects.dir}/ihv-deploy" />
  114. </target>
  115.  
  116. <target name="create-module" description="--> Legt ein neues Modul an (ant create-module -Dname=ihv-modul)" >
  117. <fail unless="name" message="Der Name des neuen Moduls muss angegeben werden" />
  118. <mkdir dir="${projects.dir}/${name}" />
  119. <copy todir="${projects.dir}/${name}" >
  120. <fileset dir="${common.dir}/module-template">
  121. <include name="**/*" />
  122. </fileset>
  123. </copy>
  124. <replace dir="${projects.dir}/${name}" token="${module.name}" value="${name}" />
  125. <echo message="${line.separator}use.${name}.revision=" append="true" file="${common.dir}/dependency-template.properties" />
  126. <echo message="${line.separator}use.${name}.revision=" append="true" file="${user.dependency.file}" />
  127. </target>
  128.  
  129. <target name="install-module" depends="load-ivy, common.-setup-environment" description="--> install modules from one to another repository">
  130. <!--setproxy proxyhost="www-proxy" proxyport="8080" proxyuser="b3fritschep" proxypassword=""/-->
  131.  
  132. <ivy:install organisation="${org}" module="${module}" revision="${rev}" from="${from}" to="${to}" transitive="true"/>
  133. </target>
  134.  
  135. <target name="show-schemaupdate" description="--> Vergleicht die aktuelle Datenbank-Struktur mit der aktuellen BIDL-Struktur">
  136. <subant target="show-schemaupdate" buildpath="${projects.dir}/ihv-bidl" />
  137. </target>
  138.  
  139. <!-- =================================================================================================
  140. TARGET: rename
  141.  
  142. Es wird mit dem Parameter -Dnewname der neue Modulname übergeben und mit -Doldname
  143. dar alte Modulname erstetzt.
  144.  
  145. Aufruf des Targets erfolgt mit ant rename -Dnewname=ihv-new -Doldname=ihv-modul
  146. ============================================================================================= -->
  147.  
  148. <target name="findbugs" description="--> Ueberpruefen des aktuellen Quelltext auf Fehler" >
  149. <subant target="findbugs" buildpath="${projects.dir}/support"/>
  150. </target>
  151.  
  152. <target name="checkstyle" description="--> Prueft den aktuellen Quelltext mit Checkstyle" >
  153. <subant target="checkstyle" buildpath="${projects.dir}/support"/>
  154. </target>
  155.  
  156. <target name="javadoc" depends="build-list" description="--> Generieren einer Java-Dokumentation" >
  157. <subant target="javadoc" buildpath="${projects.dir}/support" />
  158. </target>
  159.  
  160. <target name="build-server-only" depends="load-ivy" description="--> Es wird nur der Server und abhängige Projekte gebaut." >
  161. <ivy:buildlist reference="build-path" onMissingDescriptor="skip" >
  162. <fileset dir="${projects.dir}">
  163. <include name="ihv-shared/build.xml" />
  164. <include name="ihv-bidl/build.xml" />
  165. <include name="ihv-server/build.xml" />
  166. <include name="ihv-ear/build.xml" />
  167. </fileset>
  168. </ivy:buildlist>
  169.  
  170. <subant target="install" buildpathref="build-path" />
  171. </target>
  172.  
  173. <target name="clean-build-all" description="--> Es werden das lokale Repository, der IVY-Cache und alle Build Ergebnisse geloescht und danach neu aufgebaut (verhaelt sich wie 'ant clean clean-local clean-cache dist').">
  174. <antcall target="clean"/>
  175. <antcall target="clean-local"/>
  176. <antcall target="clean-cache"/>
  177. <antcall target="dist"/>
  178. </target>
  179.  
  180. <target name="clean-build-run-tests" description="-->Es werden das lokale Repository, der IVY-Cache und alle Build Ergebnisse geloescht, danach alles kompiliert, deployed sowie Shared-, Client- und Servertests ausgefuehrt." >
  181. <antcall target="jboss-stop" />
  182. <antcall target="clean-build-all" />
  183. <antcall target="deploy" />
  184. <echo message="3 Minuten Pause" />
  185. <antcall target="jboss-start" />
  186. <sleep minutes="3"/>
  187. <echo message="INIT-TEST-DB wird ausgeführt" />
  188. <antcall target="init-test-db" />
  189. <echo message="Test werden ausgeführt" />
  190. <subant target="test" buildpath="${projects.dir}/ihv-shared" />
  191. <subant target="test" buildpath="${projects.dir}/ihv-client" />
  192. <echo message="jboss wird heruntergefahren" />
  193. <antcall target="jboss-stop" />
  194. <subant target="test" buildpath="${projects.dir}/ihv-server" />
  195. </target>
  196.  
  197. <target name="view-javahelp-administration">
  198. <subant target="view-javahelp-administration" buildpath="${projects.dir}/ihv-client" />
  199. </target>
  200.  
  201. <target name="view-javahelp-anmeldung">
  202. <subant target="view-javahelp-anmeldung" buildpath="${projects.dir}/ihv-client" />
  203. </target>
  204.  
  205. <target name="view-javahelp-benutzerverwaltung">
  206. <subant target="view-javahelp-benutzerverwaltung" buildpath="${projects.dir}/ihv-client" />
  207. </target>
  208.  
  209. <target name="view-javahelp-mbs">
  210. <subant target="view-javahelp-mbs" buildpath="${projects.dir}/ihv-client" />
  211. </target>
  212.  
  213. <target name="view-javahelp-reste">
  214. <subant target="view-javahelp-reste" buildpath="${projects.dir}/ihv-client" />
  215. </target>
  216.  
  217. <target name="view-javahelp-ihv">
  218. <subant target="view-javahelp-ihv" buildpath="${projects.dir}/ihv-client" />
  219. </target>
  220.  
  221. <target name="coverage" description="Führt eine komplette Code-Coverage durch">
  222. <antcall target="jboss-stop" />
  223. <antcall target="jboss-clean-install" />
  224. <antcall target="clean-build-all" />
  225. <subant target="cobertura-instrument" buildpath="${projects.dir}/support"/>
  226. <subant buildpath="${projects.dir}/ihv-ear">
  227. <target name="clean"/>
  228. <target name="install"/>
  229. </subant>
  230. <subant buildpath="${projects.dir}/ihv-deploy">
  231. <target name="clean"/>
  232. <target name="deploy"/>
  233. </subant>
  234. <antcall target="jboss-start" />
  235. <sleep minutes="3"/>
  236. <echo message="INIT-TEST-DB wird ausgeführt" />
  237. <antcall target="init-test-db" />
  238. <antcall target="jboss-stop" />
  239. <sleep minutes="3"/>
  240. <delete failonerror="false" file="${jboss.dir}/bin/lff/cobertura.ser"/>
  241. <antcall target="jboss-start" />
  242. <sleep minutes="3"/>
  243. <echo message="Test werden ausgeführt" />
  244. <subant target="test" buildpath="${projects.dir}/ihv-shared" />
  245. <subant target="test" buildpath="${projects.dir}/ihv-client" />
  246. <subant target="test" buildpath="${projects.dir}/ihv-server" />
  247. <echo message="jboss wird heruntergefahren" />
  248. <antcall target="jboss-stop" />
  249. <sleep minutes="3"/>
  250. <subant target="cobertura-merge" buildpath="${projects.dir}/support"/>
  251. <subant target="cobertura-report" buildpath="${projects.dir}/support"/>
  252. </target>
  253.  
  254. <target name="pmd">
  255. <subant target="pmd" buildpath="${projects.dir}/support" />
  256. </target>
  257.  
  258. <target name="cpd">
  259. <subant target="cpd" buildpath="${projects.dir}/support" />
  260. </target>
  261.  
  262.  
  263. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement