Skip to content

Commit

Permalink
[24] Try building the java24 patch on JDT infra
Browse files Browse the repository at this point in the history
- make wget silent
- invoke xslt processor via ant

Fixes eclipse-jdt/eclipse.jdt.core#3244
  • Loading branch information
stephan-herrmann committed Nov 8, 2024
1 parent e49a1ed commit 118ddef
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
12 changes: 7 additions & 5 deletions org.eclipse.jdt.releng/patchbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ JDT_VERSION_RANGE=${JDT_VERSION_RANGE:="[3.20.0.v${SDKTIMESTAMP},${JDT_VERSION_M
## Prepare eclipse for running the build:
if [ ! -e ${SDKFILE} ]
then
wget ${SDKURL}
wget -nv ${SDKURL}
fi
if [ ! -x eclipse/eclipse ]
then
Expand Down Expand Up @@ -89,10 +89,12 @@ ${BASE}/eclipse/eclipse -nosplash -application org.eclipse.equinox.p2.publisher.

cd work/buildRepo
mv content.xml content-ORIG.xml
xsltproc --nonet --nowrite \
--stringparam patchFeatureVersionRange "${JDT_VERSION_RANGE}" \
--stringparam patchFeatureIU org.eclipse.jdt.java24patch.feature.group ${BASE}/patchMatchVersion.xsl \
content-ORIG.xml > content.xml
#xsltproc --nonet --nowrite \
# --stringparam patchFeatureVersionRange "${JDT_VERSION_RANGE}" \
# --stringparam patchFeatureIU org.eclipse.jdt.java24patch.feature.group ${BASE}/patchMatchVersion.xsl \
# content-ORIG.xml > content.xml
ant -f ${BASE}/patchMatchVersion.xml -DpatchFeatureVersionRange="${JDT_VERSION_RANGE}" -DBASE=${BASE}


jar cf content.jar content.xml
jar cf artifacts.jar artifacts.xml
Expand Down
19 changes: 19 additions & 0 deletions org.eclipse.jdt.releng/patchbuild/patchMatchVersion.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<project name="patchMetadata" default="main">

<target name="main">
<echo message="Patching metadata in ${BASE}/work/buildRepo to relax version requirement of our patch feature"/>

<!-- patch feature version in content.xml -->
<property name="patch-content.xsltFile" value="${BASE}/patchMatchVersion.xsl" />
<property name="content.origFile" value="content-ORIG.xml" />
<property name="content.transFile" value="content.xml" />
<xslt basedir="${BASE}/work/buildRepo" destdir="${BASE}/work/buildRepo" includes="${content.origFile}" style="${patch-content.xsltFile}" force="true">
<outputproperty name="method" value="xml"/>
<outputproperty name="encoding" value="UTF-8"/>
<outputproperty name="indent" value="yes"/>
<param name="patchFeatureVersionRange" expression="${patchFeatureVersionRange}"/>
<param name="patchFeatureIU" expression="org.eclipse.jdt.java25patch.feature.group"/>
<mapper type="glob" from="${content.origFile}" to="${content.transFile}"/>
</xslt>
</target>
</project>

0 comments on commit 118ddef

Please sign in to comment.