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
- reconcile requirements of metadata generation
  - update the feature jar with feature.properties & license.html
  - only use binary input to generate checksums
  - use a new output directory to please the metadata generator
- add JCP disclaimer to license

Fixes eclipse-jdt/eclipse.jdt.core#3244
  • Loading branch information
stephan-herrmann committed Jan 16, 2025
1 parent 3df92cd commit 18b78c9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 30 deletions.
43 changes: 15 additions & 28 deletions org.eclipse.jdt.releng/patchbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,47 +74,34 @@ ls -lR buildRepo

cd ${BASE}


# use feature jar to create artifacts.xml with checksums:
cd work/features
mv org.eclipse.jdt.java24patch ..
# add signing here:
cp ${BASE}/work/buildRepo/features/org.eclipse.jdt.java24patch_* .
# update the generated feature jar with two files missed during the above build:
cd src/org.eclipse.jdt.java24patch
jar -uf ${BASE}/work/buildRepo/features/org.eclipse.jdt.java24patch_* feature.properties license.html
# add signing of the feature jar here
cd -


# add general metadata (from buildRepo to buildRepo2):
${BASE}/eclipse/eclipse -nosplash -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
-artifactRepository file:${BASE}/work/buildRepo \
-metadataRepository file:${BASE}/work/buildRepo \
-source ${BASE}/work

# restore exploded feature to generated content.xml with property substitutions:
rm work/org.eclipse.jdt.java24patch_*.jar
mv work/org.eclipse.jdt.java24patch work/features
cd work/features/org.eclipse.jdt.java24patch
unzip -o ${BASE}/work/buildRepo/features/org.eclipse.jdt.java24patch_* feature.xml
ls -l
cd -
-artifactRepository file:${BASE}/work/buildRepo2 \
-metadataRepository file:${BASE}/work/buildRepo2 \
-source ${BASE}/work/buildRepo

${BASE}/eclipse/eclipse -nosplash -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
-metadataRepository file:${BASE}/work/buildRepo \
-source ${BASE}/work
ls -l work/buildRepo
ls -l work/buildRepo2

# finally create category metadata
# add category metadata
${BASE}/eclipse/eclipse -nosplash -application org.eclipse.equinox.p2.publisher.CategoryPublisher \
-metadataRepository file:${BASE}/work/buildRepo \
-metadataRepository file:${BASE}/work/buildRepo2 \
-categoryDefinition file:${BASE}/src/category.xml
ls -l work/buildRepo
ls -l work/buildRepo2

cd work/buildRepo
cd work/buildRepo2
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
ant -f ${BASE}/patchMatchVersion.xml -DpatchFeatureVersionRange="${JDT_VERSION_RANGE}" -DBASE=${BASE}
ls -l work/buildRepo
ant -f ${BASE}/patchMatchVersion.xml -DpatchFeatureVersionRange="${JDT_VERSION_RANGE}" -DBASE=${BASE} -DREPODIR=${BASE}/work/buildRepo2
ls -l


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

<target name="main">
<echo message="Patching metadata in ${BASE}/work/buildRepo to relax version requirement of our patch feature"/>
<echo message="Patching metadata in ${REPODIR} 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">
<xslt basedir="${REPODIR}" destdir="${REPODIR}" 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"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ https://www.eclipse.org/legal/epl-2.0/\n\
\n\
SPDX-License-Identifier: EPL-2.0\n\
\n\
This is an implementation of an early-draft specification developed under the Java\n\
Community Process (JCP) and is made available for testing and evaluation purposes\n\
only. The code is not compatible with any specification of the JCP.\n\
\n\
Contributors:\n\
IBM Corporation and others - initial API and implementation\n
################ end of copyright property ####################################
Expand Down

0 comments on commit 18b78c9

Please sign in to comment.