Adding the pluginbuilder files that are used in the nightly build process.
[phpeclipse.git] / utilities / pluginbuilder / build-files / postBuild.xml
diff --git a/utilities/pluginbuilder/build-files/postBuild.xml b/utilities/pluginbuilder/build-files/postBuild.xml
new file mode 100644 (file)
index 0000000..ad52150
--- /dev/null
@@ -0,0 +1,55 @@
+<project name="Run as part of postBuild" default="main">
+    
+    <target name="main">
+        <property name="UpdateSiteStagingLocation" value="${buildResultsDirectory}/updateSite"/>
+        <antcall target="-generateUpdateSite"/>
+    </target>
+    
+    <!--======================================================-->
+    <!-- UpdateSite Export target, to be called from allElements  -->
+    <!-- ==================================================== -->
+    <target name="updateSiteExport">
+        <ant antfile="build.xml" dir="${buildDirectory}/features/${id}/" target="build.update.jar">
+            <property name="feature.destination" value="${UpdateSiteStagingLocation}/features"/>
+            <property name="plugin.destination" value="${UpdateSiteStagingLocation}/plugins"/>
+        </ant>
+    </target>
+    
+    <target name="-generateUpdateSite">
+        <!-- Create the directory structure -->
+        <mkdir dir="${UpdateSiteStagingLocation}"/>
+        <mkdir dir="${UpdateSiteStagingLocation}/features"/>
+        <mkdir dir="${UpdateSiteStagingLocation}/plugins"/>
+        <!-- Build the jar files -->
+        <ant antfile="${builder}/customTargets.xml" target="allElements">
+            <property name="genericTargets" value="${builder}/postBuild.xml"/>
+            <property name="target" value="updateSiteExport"/>
+        </ant>
+        <!-- site.xml files for integration and release builds are handled elsewhere -->
+        <antcall target="-createNightlyBuildSiteXml"/>
+        <delete dir="${buildDirectory}/temp.updatesite"/>
+    </target>
+    
+    <target name="-createNightlyBuildSiteXml" if="isNightlyBuild">
+        <echo file="${UpdateSiteStagingLocation}/site.xml">&lt;?xml
+            version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+            &lt;site&gt; &lt;description&gt; PHPEclipse nightly
+            builds. &lt;/description&gt; 
+               &lt;feature url=&quot;features/net.sourceforge.phpeclipse.feature_${version.full}.jar&quot; id=&quot;net.sourceforge.phpeclipse.feature&quot;
+            version=&quot;${version.full}&quot;&gt; 
+               &lt;category name=&quot;PHPEclipseNightlyBuilds&quot;/&gt; 
+               &lt;/feature&gt;
+               &lt;feature url=&quot;features/net.sourceforge.phpeclipse.debug.feature_${version.full}.jar&quot; id=&quot;net.sourceforge.phpeclipse.debug.feature&quot;
+                           version=&quot;${version.full}&quot;&gt; 
+                               &lt;category name=&quot;PHPEclipseNightlyBuilds&quot;/&gt; 
+                               &lt;/feature&gt;
+               &lt;feature url=&quot;features/net.sourceforge.phpeclipse.xdebug.feature_${version.full}.jar&quot; id=&quot;net.sourceforge.phpeclipse.xdebug.feature&quot;
+                                           version=&quot;${version.full}&quot;&gt; 
+                                               &lt;category name=&quot;PHPEclipseNightlyBuilds&quot;/&gt; 
+                                               &lt;/feature&gt;
+            &lt;category-def name=&quot;PHPEclipseNightlyBuilds&quot;
+            label=&quot;PHPEclipse Nightly Builds&quot;&gt; &lt;/category-def&gt;
+            &lt;/site&gt; </echo>
+    </target>
+    
+</project>
\ No newline at end of file