home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Eclipse SDK / eclipse-SDK-3.1.1-win32.exe / eclipse / plugins / org.eclipse.pde.build_3.1.0 / scripts / genericTargets.xml < prev    next >
Encoding:
Text File  |  2005-09-29  |  6.6 KB  |  158 lines

  1. <project name="Generic Build Targets" default="noDefault">
  2.  
  3. <!-- Properties that must be passed to this script:
  4.     buildDirectory
  5.     id
  6.     type
  7.     ignoreTagInfo
  8.     recursiveGeneration
  9.     workingDirectory
  10.     configInfo
  11. -->
  12.  
  13. <!-- ===================================================================== -->
  14. <!-- Setup default values -->
  15. <!--   configs : by default build a platform-independent configuration -->
  16. <!--   fetchTag : by default use the CVS tags as spec'd in directory.txt -->
  17. <!-- ===================================================================== -->
  18. <property name="configs" value="*,*,*"/>
  19. <property name="fetchTag" value=""/>
  20. <property name="buildingOSGi" value="true"/>
  21. <!-- ===================================================================== -->
  22. <!-- Fetch a single element (feature, plugin, fragment) -->
  23. <!-- ===================================================================== -->
  24. <target name="fetchElement" description="Checking out source from repository..." depends="init">
  25.     <mkdir dir="${buildDirectory}/features"/>
  26.     <mkdir dir="${buildDirectory}/plugins"/>
  27.     <eclipse.fetch
  28.         elements="${type}@${id}"
  29.         buildDirectory="${buildDirectory}"
  30.         directory="${buildDirectory}/directory.txt"
  31.         fetchTag="${fetchTag}"
  32.         configInfo="${configs}"
  33.         baseLocation="${baseLocation}"
  34.     />
  35.     
  36.     <!-- Run generated fetch script -->
  37.     <ant antfile="${buildDirectory}/fetch_${id}.xml">
  38.         <!-- ************  should not have to spec these  *************** -->
  39.         <property name="featureOnly" value="true"/>
  40.         <property name="featureAndPlugins" value="true"/>
  41.         <property name="featuresRecursively" value="true"/>
  42.     </ant>
  43. </target>
  44.  
  45. <!-- ===================================================================== -->
  46. <!-- Clean previously built elements -->
  47. <!-- ===================================================================== -->
  48. <target name="cleanElement" description="Scrubbing features and plugins of old jars..." depends="init">
  49. <echo message="${elementPath}"/>
  50.     <ant antfile="build.xml" dir="${elementPath}" target="clean"/>
  51. </target>
  52.  
  53. <!-- ===================================================================== -->
  54. <!-- Generate a build.xml file for an element -->
  55. <!-- ===================================================================== -->
  56. <target name="generateScript" description="Generating build scripts..." depends="init">
  57.     <eclipse.buildScript 
  58.         elements="${type}@${id}" 
  59.         buildDirectory="${buildDirectory}"
  60.         configInfo="${configs}"
  61.         baseLocation="${baseLocation}"
  62.         buildingOSGi="${buildingOSGi}"
  63.         outputUpdateJars="${outputUpdateJars}"
  64.         archivesFormat="${archivesFormat}"
  65.         product="${product}"
  66.         forceContextQualifier="${forceContextQualifier}"
  67.     />
  68. </target>
  69.  
  70. <!-- ===================================================================== -->
  71. <!-- Run build.xml for a single element-->
  72. <!-- ===================================================================== -->
  73. <target name="processElement" description="Processing build scripts..." depends="init">
  74.     <ant antfile="build.xml" dir="${elementPath}" target="build.jars">
  75.         <property name="target" value="build.jars"/>
  76.     </ant>
  77. </target>
  78.  
  79. <!-- **********************
  80. 1) the gather targets do more than just gather.  These are packaging targets.
  81. We need to continue ot separate the two concepts (gather and package) as 
  82. the packaging is different if we wanted to create an update site packaging
  83. (for example).  The gathers are commented out for now as the new generated
  84. scripts do not seem to have them.
  85.  
  86. 2) do we really need the ws and os properties?  In all cases?  Do they have to be 
  87. set here?
  88. -->
  89.  
  90. <!-- ===================================================================== -->
  91. <!-- Gather items listed in bin.includes -->
  92. <!-- ===================================================================== -->
  93. <target name="gatherBinaries" description="Gathering binary distribution..." depends="init">
  94.     <!-- ant antfile="build.xml" dir="${elementPath}" target="gather.bin.parts"/ -->
  95.     <ant antfile="build.xml" dir="${elementPath}" target="zip.distribution">
  96.         <property name="os" value="${os}" />
  97.         <property name="ws" value="${ws}" />    
  98.     </ant>
  99. </target>
  100.  
  101. <!-- ===================================================================== -->
  102. <!-- Gather source for a build element -->
  103. <!-- ===================================================================== -->
  104. <target name="gatherSources" description="Gathering source distribution..." depends="init">
  105.     <!--suspect:  this call is required to create the *.src.zip inside each plugin-->
  106.     <ant antfile="build.xml" dir="${elementPath}" target="build.sources">
  107.         <property name="os" value="${os}" />
  108.         <property name="ws" value="${ws}" />    
  109.     </ant>
  110.     <ant antfile="build.xml" dir="${elementPath}" target="zip.sources">
  111.         <property name="os" value="${os}" />
  112.         <property name="ws" value="${ws}" />    
  113.     </ant>
  114. </target>
  115.  
  116. <!-- ===================================================================== -->
  117. <!-- Gather log files for an element -->
  118. <!-- Suspect: We just unzip these right away -->
  119. <!-- ===================================================================== -->
  120. <target name="gatherLogs" description="Gathering build logs..." depends="init">
  121.     <ant antfile="build.xml" dir="${elementPath}" target="zip.logs" >
  122.         <property name="buildDirectory" value="${buildDirectory}" />
  123.     </ant>
  124. </target>
  125.  
  126. <!-- ===================================================================== -->
  127. <!-- Default target                                                        -->
  128. <!-- ===================================================================== -->
  129. <target name="noDefault">
  130.     <echo message="This file must be called with explicit targets" />
  131. </target>
  132.  
  133. <!-- ===================================================================== -->
  134. <!-- Assemble one build element -->
  135. <!-- ===================================================================== -->
  136. <target name="assembleElement" description="Assembling the build..." depends="init">
  137.     <ant antfile="assemble.${id}.all.xml" dir="${buildDirectory}"/>
  138. </target>
  139.  
  140. <!-- ===================================================================== -->
  141. <!-- Package one build element -->
  142. <!-- ===================================================================== -->
  143. <target name="packageElement" description="Packaging the build..." depends="init">
  144.     <ant antfile="package.${id}.all.xml" dir="${buildDirectory}"/>
  145. </target>
  146.     
  147. <!-- ===================================================================== -->
  148. <!-- Miscellaneous helper targets -->
  149. <!-- ===================================================================== -->
  150. <target name="init">
  151.     <condition property="elementPath" value="${buildDirectory}/plugins/${id}">
  152.         <equals arg1="${type}" arg2="fragment" />
  153.     </condition>
  154.     <property name="elementPath" value="${buildDirectory}/${type}s/${id}" />
  155. </target>
  156.  
  157. </project>
  158.