選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

build.xml 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!-- ====================================================================== -->
  2. <!-- Copyright (c) 2005 Contributors -->
  3. <!-- All rights reserved. -->
  4. <!-- This program and the accompanying materials are made available -->
  5. <!-- under the terms of the Eclipse Public License v1.0 -->
  6. <!-- which accompanies this distribution and is available at -->
  7. <!-- http://www.eclipse.org/legal/epl-v10.html -->
  8. <!-- -->
  9. <!-- Contributors: (See CVS checkin's) -->
  10. <!-- ====================================================================== -->
  11. <project name="eclipse.plugins" default="eclipse.plugins" basedir=".">
  12. <import file="${basedir}/../build/build-properties.xml" />
  13. <target name="info">
  14. <echo>
  15. Assembles the Eclipse plugins.
  16. Relies on ../build/build-properties.xml for some definitions, and
  17. the build must have produced the AspectJ distribution already.
  18. Define $${build.version.eclipse.plugins} to avoid "9.9.9" for
  19. "DEVELOPMENT" (the default).
  20. </echo>
  21. </target>
  22. <target name="init-eclipse-plugins" depends="init-properties">
  23. <property name="ep.dir"
  24. location="${aspectj.modules.dir}/eclipse.plugin"
  25. />
  26. <condition property="build.version.eclipse.plugins"
  27. value="9.9.9"
  28. >
  29. <equals arg1="DEVELOPMENT" arg2="${build.version.long}" />
  30. </condition>
  31. <condition property="build.version.eclipse.plugins"
  32. value="${build.version.long}"
  33. >
  34. <not>
  35. <equals arg1="DEVELOPMENT"
  36. arg2="${build.version.long}"
  37. />
  38. </not>
  39. </condition>
  40. <jar-property name="ep.aspectjrt.jar"
  41. location="${aj.dist.dir}/tools/lib/aspectjrt.jar"
  42. />
  43. <property name="ep.eclipse.dist.dir"
  44. location="${aj.dist.dir}/ide/eclipse"
  45. />
  46. </target>
  47. <target name="eclipse.plugins"
  48. depends="do-rt,do-source,do-ajde,do-doc"
  49. />
  50. <target name="do-rt" depends="init-eclipse-plugins">
  51. <property name="name.rt" value="org.aspectj.aspectjrt" />
  52. <mkdir dir="${ep.eclipse.dist.dir}/${name.rt}" />
  53. <copy todir="${ep.eclipse.dist.dir}/${name.rt}"
  54. file="${ep.aspectjrt.jar}"
  55. />
  56. <build-eclipse-plugin name="${name.rt}" />
  57. </target>
  58. <target name="do-source" depends="init-eclipse-plugins">
  59. <property name="name.source"
  60. value="org.aspectj.ajde.source"
  61. />
  62. <clean-dir dir="${ep.eclipse.dist.dir}/${name.source}/src" />
  63. <copy todir="${ep.eclipse.dist.dir}/${name.source}/src"
  64. file="${aspectj.modules.dir}/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip"
  65. />
  66. <!-- verify source dirs included:
  67. grep 'kind="src"' */.classpath | sed '/testsrc/d;/path="\//d;s|\/.*path="|\/|;s|".*||'
  68. -->
  69. <zip destfile="${ep.eclipse.dist.dir}/${name.source}/src/aspectjsrc.zip"
  70. >
  71. <fileset dir="${aspectj.modules.dir}/ajbrowser/src" />
  72. <fileset dir="${aspectj.modules.dir}/ajde/src" />
  73. <fileset dir="${aspectj.modules.dir}/ajdoc/src" />
  74. <fileset dir="${aspectj.modules.dir}/asm/src" />
  75. <fileset dir="${aspectj.modules.dir}/aspectj5rt/java5-src"
  76. />
  77. <fileset dir="${aspectj.modules.dir}/aspectj5rt/src" />
  78. <fileset dir="${aspectj.modules.dir}/bridge/src" />
  79. <fileset dir="${aspectj.modules.dir}/loadtime/src" />
  80. <fileset dir="${aspectj.modules.dir}/loadtime5/java5-src"
  81. />
  82. <fileset dir="${aspectj.modules.dir}/org.aspectj.ajdt.core/src"
  83. />
  84. <fileset dir="${aspectj.modules.dir}/org.aspectj.lib/src"
  85. />
  86. <fileset dir="${aspectj.modules.dir}/runtime/src" />
  87. <fileset dir="${aspectj.modules.dir}/taskdefs/src" />
  88. <fileset dir="${aspectj.modules.dir}/util/src" />
  89. <fileset dir="${aspectj.modules.dir}/weaver/src" />
  90. </zip>
  91. <build-eclipse-plugin name="${name.source}" />
  92. </target>
  93. <target name="do-ajde" depends="init-eclipse-plugins">
  94. <property name="name.ajde" value="org.aspectj.ajde" />
  95. <jar-property name="ep.aspectjtools.jar"
  96. location="${aj.dist.dir}/tools/lib/aspectjtools.jar"
  97. />
  98. <clean-dir dir="${ep.eclipse.dist.dir}/${name.ajde}" />
  99. <copy todir="${ep.eclipse.dist.dir}/${name.ajde}">
  100. <fileset file="${ep.aspectjrt.jar}" />
  101. <fileset file="${ep.aspectjtools.jar}" />
  102. </copy>
  103. <jar destfile="${ep.eclipse.dist.dir}/${name.ajde}/ajde.jar">
  104. <zipfileset src="${ep.aspectjtools.jar}"
  105. includes="org/aspectj/**"
  106. />
  107. <!-- TODO dangerous assumption: only org.aspectj? not org.eclipse or org.osgi? -->
  108. </jar>
  109. <build-eclipse-plugin name="${name.ajde}" />
  110. </target>
  111. <target name="do-doc" depends="init-eclipse-plugins">
  112. <available property="ep.docs.available"
  113. file="${aj.dist.dir}/docs/doc/examples/build.xml"
  114. />
  115. <fail unless="ep.docs.available"
  116. message="no doc in ${aj.dist.dir}"
  117. />
  118. <property name="name.doc" value="org.aspectj.ajde.doc" />
  119. <clean-dir dir="${ep.eclipse.dist.dir}/${name.doc}/doc" />
  120. <copy todir="${ep.eclipse.dist.dir}/${name.doc}/doc">
  121. <fileset dir="${aj.dist.dir}/docs/doc" />
  122. </copy>
  123. <build-eclipse-plugin name="${name.doc}" />
  124. </target>
  125. <macrodef name="build-eclipse-plugin">
  126. <attribute name="name" />
  127. <sequential>
  128. <mkdir dir="${ep.eclipse.dist.dir}/@{name}" />
  129. <copy todir="${ep.eclipse.dist.dir}/@{name}">
  130. <fileset dir="${ep.dir}/@{name}" />
  131. </copy>
  132. <replace file="${ep.eclipse.dist.dir}/@{name}/plugin.xml"
  133. token="build.version.eclipse.plugins"
  134. value="${build.version.eclipse.plugins}"
  135. />
  136. <jar destfile="${ep.eclipse.dist.dir}/@{name}_${build.version.eclipse.plugins}.jar"
  137. >
  138. <fileset dir="${ep.eclipse.dist.dir}/@{name}" />
  139. </jar>
  140. </sequential>
  141. </macrodef>
  142. </project>