You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

package.xml 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <?xml version="1.0" ?>
  2. <!-- writen for Ant 1.5.1 -->
  3. <project name="Packaging AJ for AJDT" default="ajdtjars">
  4. <description>Takes an AJ build and spits out the jars for AJDT</description>
  5. <property name="pkg.working.dir" value="../aj-build/ajdttemp" />
  6. <property name="aspectj.lib.dir" value="../aj-build/dist/tools/lib"/>
  7. <property name="ajdt.output.dir" value="../aj-build/ajdtoutput"/>
  8. <target name="ajdtjars" depends="ajdejar,weaverjar,runtimejar"
  9. description="Run in the build folder, it will take the aj-build/ output and create AJDT jars">
  10. </target>
  11. <target name="ajdejar" description="Construct ajde.jar and ajdesrc.zip for the ajde plugin using an AJ build">
  12. <!-- copy and unpack an aspectjtools.jar -->
  13. <delete dir="${pkg.working.dir}"/>
  14. <copy file="${aspectj.lib.dir}/aspectjtools.jar" tofile="aspectjtools.jar" overwrite="true" />
  15. <mkdir dir="${pkg.working.dir}" />
  16. <unzip dest="${pkg.working.dir}" src="aspectjtools.jar" />
  17. <delete file="aspectjtools.jar"/>
  18. <!-- delete everything that isn't in the org.aspectj package -->
  19. <delete includeemptydirs="true">
  20. <fileset dir="${pkg.working.dir}">
  21. <exclude name="org/aspectj/**/*.*" />
  22. </fileset>
  23. </delete>
  24. <!-- delete everything which is going to be in aspectjweaver.jar -->
  25. <echo message="Removing files not required in ajde.jar since they're contained in aspectjweaver.jar"/>
  26. <delete includeemptydirs="true">
  27. <fileset dir="${pkg.working.dir}">
  28. <include name="org/aspectj/asm/**/*.*" />
  29. <include name="org/aspectj/weaver/**/*.*" />
  30. <include name="org/aspectj/apache/bcel/**/*.*" />
  31. <include name="org/aspectj/bridge/**/*.*" />
  32. <include name="org/aspectj/util/**/*.*" />
  33. </fileset>
  34. </delete>
  35. <!-- delete everything which is going to be in aspectjrt.jar -->
  36. <echo message="Removing files not required in ajde.jar since they're contained in aspectjrt.jar"/>
  37. <delete includeemptydirs="true">
  38. <fileset dir="${pkg.working.dir}">
  39. <!-- bug 118235: currently the commented out classes appear in both ajde.jar and aspectjrt.jar
  40. uncomment this if decide it should only live in aspectjrt.jar
  41. <include name="org/aspectj/internal/lang/annotation/**/*.*" />
  42. <include name="org/aspectj/internal/lang/reflect/**/*.*" /> -->
  43. <include name="org/aspectj/runtime/**/*.*" />
  44. <include name="org/aspectj/lang/**/*.*" />
  45. </fileset>
  46. </delete>
  47. <!-- construct the ajde.jar -->
  48. <zip destfile="ajde.jar">
  49. <fileset dir="${pkg.working.dir}" />
  50. </zip>
  51. <delete dir="${pkg.working.dir}" />
  52. <!-- build a src zip -->
  53. <unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/jdtcore-for-aspectj-src.zip"/>
  54. <unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/aspectjsrc.zip"/>
  55. <!-- delete everything that isn't in the org.aspectj package -->
  56. <delete includeemptydirs="true">
  57. <fileset dir="${pkg.working.dir}">
  58. <exclude name="org/aspectj/**/*.*"/>
  59. </fileset>
  60. </delete>
  61. <!-- delete everything which is going to be in aspectjweaversrc.zip -->
  62. <echo message="Removing files not required in ajdesrc.zip since they're contained in aspectjweaversrc.zip"/>
  63. <delete includeemptydirs="true">
  64. <fileset dir="${pkg.working.dir}">
  65. <include name="org/aspectj/asm/**/*.*" />
  66. <include name="org/aspectj/weaver/**/*.*" />
  67. <include name="org/aspectj/apache/bcel/**/*.*" />
  68. <include name="org/aspectj/bridge/**/*.*" />
  69. <include name="org/aspectj/util/**/*.*" />
  70. </fileset>
  71. </delete>
  72. <!-- delete everything which is going to be in aspectjrtsrc.zip -->
  73. <echo message="Removing files not required in ajdesrc.zip since they're contained in aspectjrtsrc.zip"/>
  74. <delete includeemptydirs="true">
  75. <fileset dir="${pkg.working.dir}">
  76. <!-- bug 118235: currently the commented out classes appear in both ajde.jar and aspectjrt.jar
  77. uncomment this if decide it should only live in aspectjrt.jar
  78. <include name="org/aspectj/internal/lang/annotation/**/*.*" />
  79. <include name="org/aspectj/internal/lang/reflect/**/*.*" /> -->
  80. <include name="org/aspectj/runtime/**/*.*" />
  81. <include name="org/aspectj/lang/**/*.*" />
  82. </fileset>
  83. </delete>
  84. <zip destfile="ajdesrc.zip">
  85. <fileset dir="${pkg.working.dir}"/>
  86. </zip>
  87. <delete dir="${pkg.working.dir}" />
  88. <copy file="ajde.jar" todir="${ajdt.output.dir}"/>
  89. <copy file="ajdesrc.zip" todir="${ajdt.output.dir}"/>
  90. <delete file="ajde.jar"/>
  91. <delete file="ajdesrc.zip"/>
  92. </target>
  93. <target name="weaverjar" description="Construct aspectjweaver.jar and aspectjweaversrc.zip for the aspectjweaver plugin using an AJ build">
  94. <!-- copy and unpack an aspectjweaver.jar into a local build directory -->
  95. <delete dir="${pkg.working.dir}"/>
  96. <copy file="${aspectj.lib.dir}/aspectjweaver.jar" tofile="aspectjweaver.jar" overwrite="true" />
  97. <mkdir dir="${pkg.working.dir}" />
  98. <unzip dest="${pkg.working.dir}" src="aspectjweaver.jar" />
  99. <delete file="aspectjweaver.jar"/>
  100. <!-- delete everything which shouldn't be included in the aspectjweaver.jar -->
  101. <echo message="Removing files not required in aspectjweaver.jar"/>
  102. <delete includeemptydirs="true">
  103. <fileset dir="${pkg.working.dir}">
  104. <exclude name="META-INF/*.*" />
  105. <exclude name="org/aspectj/apache/bcel/**/*.*" />
  106. <exclude name="org/aspectj/asm/**/*.*" />
  107. <exclude name="org/aspectj/bridge/**/*.*" />
  108. <exclude name="org/aspectj/util/**/*.*" />
  109. <exclude name="org/aspectj/weaver/**/*.*" />
  110. <exclude name="org/aspectj/org/objectweb/asm/**/*.*"/>
  111. </fileset>
  112. </delete>
  113. <!-- construct the aspectjweaver.jar directly in the org.aspectj.weaver plugin -->
  114. <zip destfile="aspectjweaver.jar">
  115. <fileset dir="${pkg.working.dir}" />
  116. </zip>
  117. <delete dir="${pkg.working.dir}" />
  118. <!-- build a src zip -->
  119. <unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/jdtcore-for-aspectj-src.zip"/>
  120. <unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/aspectjsrc.zip"/>
  121. <!-- delete everything that isn't in the org.aspectj package -->
  122. <delete includeemptydirs="true">
  123. <fileset dir="${pkg.working.dir}">
  124. <exclude name="org/aspectj/**/*.*"/>
  125. </fileset>
  126. </delete>
  127. <!-- delete everything which shouldn't be included in the aspectjweaversrc.zip -->
  128. <echo message="Removing files not required in aspectjweaversrc.zip"/>
  129. <delete includeemptydirs="true">
  130. <fileset dir="${pkg.working.dir}">
  131. <exclude name="org/aspectj/apache/bcel/**/*.*" />
  132. <exclude name="org/aspectj/asm/**/*.*" />
  133. <exclude name="org/aspectj/bridge/**/*.*" />
  134. <exclude name="org/aspectj/util/**/*.*" />
  135. <exclude name="org/aspectj/weaver/**/*.*" />
  136. </fileset>
  137. </delete>
  138. <zip destfile="aspectjweaversrc.zip">
  139. <fileset dir="${pkg.working.dir}"/>
  140. </zip>
  141. <delete dir="${pkg.working.dir}" />
  142. <copy file="aspectjweaver.jar" todir="${ajdt.output.dir}"/>
  143. <copy file="aspectjweaversrc.zip" todir="${ajdt.output.dir}"/>
  144. <delete file="aspectjweaver.jar"/>
  145. <delete file="aspectjweaversrc.zip"/>
  146. </target>
  147. <target name="runtimejar" description="Copy the aspectjrt.jar from an
  148. AJ build into the runtime plugin containing
  149. the src">
  150. <copy file="${aspectj.lib.dir}/aspectjrt.jar"
  151. tofile="aspectjrt.jar"
  152. overwrite="true" />
  153. <delete dir="${pkg.working.dir}" />
  154. <!-- build a src zip -->
  155. <unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/jdtcore-for-aspectj-src.zip"/>
  156. <unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/aspectjsrc.zip"/>
  157. <!-- delete everything which shouldn't be included in the aspectjrtsrc.zip -->
  158. <echo message="Removing files not required in aspectjrtsrc.zip"/>
  159. <delete includeemptydirs="true">
  160. <fileset dir="${pkg.working.dir}">
  161. <exclude name="org/aspectj/internal/lang/annotation/**/*.*" />
  162. <exclude name="org/aspectj/internal/lang/reflect/**/*.*" />
  163. <exclude name="org/aspectj/runtime/**/*.*" />
  164. <exclude name="org/aspectj/lang/**/*.*" />
  165. </fileset>
  166. </delete>
  167. <zip destfile="aspectjrtsrc.zip">
  168. <fileset dir="${pkg.working.dir}"/>
  169. </zip>
  170. <delete dir="${pkg.working.dir}" />
  171. <copy file="aspectjrt.jar" todir="${ajdt.output.dir}"/>
  172. <copy file="aspectjrtsrc.zip" todir="${ajdt.output.dir}"/>
  173. <delete file="aspectjrt.jar"/>
  174. <delete file="aspectjrtsrc.zip"/>
  175. </target>
  176. <!-- VERSION-STRING -->
  177. <!-- these property values will be overridden when called from the master build script -->
  178. <property name="ajde.version" value="9.9.9" />
  179. <property name="build.dir" value="build" />
  180. <property file="aspectjlib.properties" />
  181. <target name="init">
  182. <mkdir dir="${build.dir}" />
  183. <mkdir dir="dist" />
  184. </target>
  185. <target name="clean" depends="init">
  186. <delete dir="${build.dir}" />
  187. <delete dir="dist" />
  188. </target>
  189. <!--target name="packaged-plugin" depends="init" description="Create the plugin jar file from the assembled components in the build dir">
  190. <copy todir="${build.dir}" includeemptydirs="false">
  191. <fileset dir=".">
  192. <exclude name="*src.zip" />
  193. <exclude name="build.*" />
  194. <exclude name=".*" />
  195. <exclude name="*/*" />
  196. <exclude name="META-INF/MANIFEST.MF" />
  197. <exclude name="aspectjlib.properties" />
  198. <depth max="0" />
  199. </fileset>
  200. </copy>
  201. <copy file="META-INF/MANIFEST.MF" tofile="${build.dir}/META-INF/MANIFEST.MF">
  202. <filterset begintoken="9" endtoken="9">
  203. <filter token="2.2.2" value="${ajde.version}"/>
  204. </filterset>
  205. </copy>
  206. <copy todir="${build.dir}/doc">
  207. <fileset dir="doc" />
  208. </copy>
  209. <copy todir="${build.dir}/icons">
  210. <fileset dir="icons" />
  211. </copy>
  212. <zip destfile="dist/org.aspectj.ajde_${ajde.version}.jar">
  213. <fileset dir="build" />
  214. </zip>
  215. </target-->
  216. <target name="copy doc" description="This copies the aspectj docs into the org.eclipse.ajde
  217. plugin. By default, it only copies over any changes from the current version">
  218. <copy todir="doc" failonerror="false">
  219. <fileset dir="${aspectj.doc.dir}">
  220. <exclude name="examples" />
  221. </fileset>
  222. </copy>
  223. </target>
  224. </project>