- remove old stuff (manual creation of update site & meta data)
- re-introduce patch-content-xml.xsl to widen version requirement of our patch feature
(made xsl parametric for this purpose).
diff --git a/releng/build-scripts/build/p2helper.xml b/releng/build-scripts/build/p2helper.xml
index f94e8e5..74b78e4 100644
--- a/releng/build-scripts/build/p2helper.xml
+++ b/releng/build-scripts/build/p2helper.xml
@@ -10,64 +10,9 @@
-->
<project name="p2.helper">
- <!-- The following tasks prepare a local update site to install the OTDT from -->
- <target name="createLocalUpdateSite">
- <echo message="Creating local update site in ${otdtUpdatesDir}"/>
+ <target name="patchMetadata">
+ <echo message="Patching metadata in ${otdtUpdatesDir} to relax version requirement of our patch feature"/>
- <!-- Create the directory structure -->
- <mkdir dir="${otdtUpdatesDir}"/>
- <mkdir dir="${otdtUpdatesDir}/features"/>
- <mkdir dir="${otdtUpdatesDir}/plugins"/>
- <!-- Build the jar files -->
- <ant antfile="${builder}/customTargets.xml" target="allElements" dir="${otdtUpdatesDir}">
- <property name="genericTargets" value="${OTScriptDir}/p2helper.xml"/>
- <property name="target" value="updateSiteExport"/>
- </ant>
-<!-- better to do this from run.xml (outside eclipse) -->
-<!-- <antcall target="generateMetadata"/> -->
- </target>
-
- <target name="updateSiteExport">
- <condition property="isTestFeature">
- <contains string="${id}" substring="tests"/>
- </condition>
- <antcall target="doUpdateSiteExport"/>
- </target>
-
- <target name="doUpdateSiteExport" unless="isTestFeature">
- <echo message="Creating content for updateSite, feature ${id}"/>
-
- <ant antfile="build.xml" dir="${buildDirectory}/features/${id}/" target="build.update.jar">
- <property name="feature.destination" value="${otdtUpdatesDir}/features"/>
- <property name="plugin.destination" value="${otdtUpdatesDir}/plugins"/>
- </ant>
- </target>
-
- <target name="generateMetadata">
- <echo message="Generating metadata for features and plugins in ${otdtUpdatesDir}"/>
- <java
- inputstring=""
- dir="${baseLocation}"
- fork="true"
- classname="org.eclipse.equinox.launcher.Main"
- classpath="${baseLocation}/plugins/${org.eclipse.equinox.launcher_jar}">
- <arg value="-consoleLog"/>
- <arg value="-nosplash"/>
- <arg value="-application"/>
- <arg value="org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher" />
- <arg value="-source"/>
- <arg value="${otdtUpdatesDir}"/>
- <arg value="-metadataRepository" />
- <arg value="file:${otdtUpdatesDir}" />
- <arg value="-metadataRepositoryName" />
- <arg value="Object Teams Updates" />
- <arg value="-artifactRepository" />
- <arg value="file:${otdtUpdatesDir}" />
- <arg value="-append" />
- <!-- arg value="-compress" /-->
- <!-- don't categorize features at this stage! -->
- </java>
-
<!-- patch feature version in content.xml -->
<property name="patch-content.xsltFile" value="${OTScriptDir}/patch-content-xml.xsl" />
<property name="content.origFile" value="content.xml" />
@@ -76,6 +21,8 @@
<outputproperty name="method" value="xml"/>
<outputproperty name="encoding" value="UTF-8"/>
<outputproperty name="indent" value="yes"/>
+ <param name="version" value="${jdt.feature.version}"/>
+ <param name="versionnext" value="${jdt.feature.version.next}"/>
<mapper type="glob" from="${content.origFile}" to="${content.transFile}"/>
</xslt>
<move file="${otdtUpdatesDir}/${content.transFile}" tofile="${otdtUpdatesDir}/${content.origFile}" overwrite="yes"/>
diff --git a/releng/build-scripts/build/patch-content-xml.xsl b/releng/build-scripts/build/patch-content-xml.xsl
index 5706870..7c7bcd1 100644
--- a/releng/build-scripts/build/patch-content-xml.xsl
+++ b/releng/build-scripts/build/patch-content-xml.xsl
@@ -1,7 +1,9 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2004/07/xpath-functions" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" exclude-result-prefixes="xs fn xdt">
- <xsl:template match="@range[../@name='org.eclipse.jdt.feature.group' and starts-with(.,'[3.6.0.v20100308-1800')]">
- <xsl:attribute name="range">[3.6.0.v20100308-1800,3.6.0.v20100308-1801)</xsl:attribute>
+ <xsl:param name="version" />
+ <xsl:param name="versionrange" />
+ <xsl:template match="@range[../@name='org.eclipse.jdt.feature.group' and starts-with(.,concat('[','{$version}'))]">
+ <xsl:attribute name="range"><xsl:value-of select="concat('[','{$version}',',','{$versionnext}',')')" /></xsl:attribute>
</xsl:template>
<!-- Whenever you match any node or any attribute -->
<xsl:template match="node()|@*">
diff --git a/releng/build-scripts/build/run.properties b/releng/build-scripts/build/run.properties
index a70bc63..88fc2a3 100644
--- a/releng/build-scripts/build/run.properties
+++ b/releng/build-scripts/build/run.properties
@@ -27,6 +27,10 @@
run.eclipseScriptDir=plugins/org.eclipse.pde.build_3.6.0.v20100603/scripts
org.eclipse.equinox.launcher_jar=org.eclipse.equinox.launcher_1.1.0.v20100507.jar
+# for patching our patch feature to match this version with any suffix:
+jdt.feature.version=3.6.0.v20100526-0800
+jdt.feature.version.next=3.6.0.v20100526-0801
+
# SVN Support for PDE BUILD:
# (Note: this file must be provided in ${OTScriptDir}/lib)
svn.pde.build=org.eclipse.team.svn.pde.build_0.7.8.I20090525-1500.jar
diff --git a/releng/build-scripts/build/run.xml b/releng/build-scripts/build/run.xml
index 10607e6..63b89d5 100644
--- a/releng/build-scripts/build/run.xml
+++ b/releng/build-scripts/build/run.xml
@@ -301,7 +301,9 @@
<!-- arg value="-debug" / -->
</java>
<!-- At this point a local update site exists, thanks to p2gathering=true -->
-
+
+ <ant antfile="${OTScriptDir}/p2helper.xml" target="patchMetadata" dir="${otdtUpdatesDir}"/>
+
<property name="_hasCreatedOTDTEclipse" value="true" />
</target>