carbidecpp20devenv/plugins/org.eclipse.pde.build_3.4.1.R34x_v20080805/scripts/genericTargets.xml
changeset 1 82d1d1de1a01
equal deleted inserted replaced
-1:000000000000 1:82d1d1de1a01
       
     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 <property name="generateJnlp" value="false"/>
       
    22 <property name="signJars" value="false"/>
       
    23 <property name="generateFeatureVersionSuffix" value="false" />
       
    24 <property name="generateVersionsLists" value="true" />
       
    25 <property name="groupConfigurations" value="false"/>
       
    26 <property name="pluginPath" value=""/>
       
    27 <property name="filteredDependencyCheck" value="false"/>
       
    28 <property name="filterP2Base" value="false"/>
       
    29 
       
    30 <!-- ===================================================================== -->
       
    31 <!-- Fetch a single element (feature, plugin, fragment) -->
       
    32 <!-- ===================================================================== -->
       
    33 <target name="fetchElement" description="Checking out source from repository..." depends="init">
       
    34 	<mkdir dir="${buildDirectory}/features"/>
       
    35 	<mkdir dir="${buildDirectory}/plugins"/>
       
    36 	<eclipse.fetch
       
    37 		elements="${type}@${id}"
       
    38 		buildDirectory="${buildDirectory}"
       
    39 		directory="${buildDirectory}/directory.txt"
       
    40 		fetchTag="${fetchTag}"
       
    41 		configInfo="${configs}"
       
    42 		baseLocation="${baseLocation}"
       
    43 		pluginPath="${pluginPath}"
       
    44 	/>
       
    45 	
       
    46 	<!-- Run generated fetch script -->
       
    47 	<ant antfile="${buildDirectory}/fetch_${id}.xml">
       
    48 		<!-- ************  should not have to spec these  *************** -->
       
    49 		<property name="featureOnly" value="true"/>
       
    50 		<property name="featureAndPlugins" value="true"/>
       
    51 		<property name="featuresRecursively" value="true"/>
       
    52 	</ant>
       
    53 </target>
       
    54 
       
    55 <!-- ===================================================================== -->
       
    56 <!-- Clean previously built elements -->
       
    57 <!-- ===================================================================== -->
       
    58 <target name="cleanElement" description="Scrubbing features and plugins of old jars..." depends="init">
       
    59 <echo message="${elementPath}"/>
       
    60 	<ant antfile="build.xml" dir="${elementPath}" target="clean"/>
       
    61 </target>
       
    62 
       
    63 <!-- ===================================================================== -->
       
    64 <!-- Generate a build.xml file for an element -->
       
    65 <!-- ===================================================================== -->
       
    66 <target name="generateScript" description="Generating build scripts..." depends="init">
       
    67 	<eclipse.buildScript 
       
    68 		elements="${type}@${id}" 
       
    69 		buildDirectory="${buildDirectory}"
       
    70 		configInfo="${configs}"
       
    71 		baseLocation="${baseLocation}"
       
    72 		buildingOSGi="${buildingOSGi}"
       
    73 		outputUpdateJars="${outputUpdateJars}"
       
    74 		archivesFormat="${archivesFormat}"
       
    75 		product="${product}"
       
    76 		forceContextQualifier="${forceContextQualifier}"
       
    77 		generateJnlp="${generateJnlp}"
       
    78 		signJars="${signJars}"
       
    79 		generateFeatureVersionSuffix="${generateFeatureVersionSuffix}"
       
    80 		significantVersionDigits="${significantVersionDigits}"
       
    81 		generatedVersionLength="${generatedVersionLength}"
       
    82 		generateVersionsLists="${generateVersionsLists}"
       
    83 		groupConfiguration="${groupConfigurations}"
       
    84 		pluginPath="${pluginPath}"
       
    85 		filteredDependencyCheck="${filteredDependencyCheck}"
       
    86 		platformProperties="${platformProperties}"
       
    87 		filterP2Base="${filterP2Base}"
       
    88 	/>
       
    89 </target>
       
    90 
       
    91 <!-- ===================================================================== -->
       
    92 <!-- Run build.xml for a single element-->
       
    93 <!-- ===================================================================== -->
       
    94 <target name="processElement" description="Processing build scripts..." depends="init">
       
    95 	<ant antfile="build.xml" dir="${elementPath}" target="build.jars">
       
    96 		<property name="target" value="build.jars"/>
       
    97 	</ant>
       
    98 </target>
       
    99 
       
   100 <!-- **********************
       
   101 1) the gather targets do more than just gather.  These are packaging targets.
       
   102 We need to continue ot separate the two concepts (gather and package) as 
       
   103 the packaging is different if we wanted to create an update site packaging
       
   104 (for example).  The gathers are commented out for now as the new generated
       
   105 scripts do not seem to have them.
       
   106 
       
   107 2) do we really need the ws and os properties?  In all cases?  Do they have to be 
       
   108 set here?
       
   109 -->
       
   110 
       
   111 <!-- ===================================================================== -->
       
   112 <!-- Gather items listed in bin.includes -->
       
   113 <!-- ===================================================================== -->
       
   114 <target name="gatherBinaries" description="Gathering binary distribution..." depends="init">
       
   115 	<!-- ant antfile="build.xml" dir="${elementPath}" target="gather.bin.parts"/ -->
       
   116 	<ant antfile="build.xml" dir="${elementPath}" target="zip.distribution">
       
   117 		<property name="os" value="${os}" />
       
   118 		<property name="ws" value="${ws}" />	
       
   119 	</ant>
       
   120 </target>
       
   121 
       
   122 <!-- ===================================================================== -->
       
   123 <!-- Gather source for a build element -->
       
   124 <!-- ===================================================================== -->
       
   125 <target name="gatherSources" description="Gathering source distribution..." depends="init">
       
   126 	<!--suspect:  this call is required to create the *.src.zip inside each plugin-->
       
   127 	<ant antfile="build.xml" dir="${elementPath}" target="build.sources">
       
   128 		<property name="os" value="${os}" />
       
   129 		<property name="ws" value="${ws}" />	
       
   130 	</ant>
       
   131 	<ant antfile="build.xml" dir="${elementPath}" target="zip.sources">
       
   132 		<property name="os" value="${os}" />
       
   133 		<property name="ws" value="${ws}" />	
       
   134 	</ant>
       
   135 </target>
       
   136 
       
   137 <!-- ===================================================================== -->
       
   138 <!-- Gather log files for an element -->
       
   139 <!-- Suspect: We just unzip these right away -->
       
   140 <!-- ===================================================================== -->
       
   141 <target name="gatherLogs" description="Gathering build logs..." depends="init">
       
   142 	<ant antfile="build.xml" dir="${elementPath}" target="zip.logs" >
       
   143 		<property name="buildDirectory" value="${buildDirectory}" />
       
   144 	</ant>
       
   145 </target>
       
   146 
       
   147 <!-- ===================================================================== -->
       
   148 <!-- Default target                                                        -->
       
   149 <!-- ===================================================================== -->
       
   150 <target name="noDefault">
       
   151 	<echo message="This file must be called with explicit targets" />
       
   152 </target>
       
   153 
       
   154 <!-- ===================================================================== -->
       
   155 <!-- Assemble one build element -->
       
   156 <!-- ===================================================================== -->
       
   157 <target name="assembleElement" description="Assembling the build..." depends="init">
       
   158 	<ant antfile="assemble.${id}.all.xml" dir="${buildDirectory}"/>
       
   159 </target>
       
   160 
       
   161 <!-- ===================================================================== -->
       
   162 <!-- Package one build element -->
       
   163 <!-- ===================================================================== -->
       
   164 <target name="packageElement" description="Packaging the build..." depends="init">
       
   165 	<ant antfile="package.${id}.all.xml" dir="${buildDirectory}"/>
       
   166 </target>
       
   167 	
       
   168 <!-- ===================================================================== -->
       
   169 <!-- Miscellaneous helper targets -->
       
   170 <!-- ===================================================================== -->
       
   171 <target name="init">
       
   172 	<condition property="elementPath" value="${buildDirectory}/plugins/${id}">
       
   173 		<equals arg1="${type}" arg2="fragment" />
       
   174 	</condition>
       
   175 	<property name="elementPath" value="${buildDirectory}/${type}s/${id}" />
       
   176 </target>
       
   177 
       
   178 </project>