Skip to content

Commit 88a98bd

Browse files
committed
[Build] Launch EnrichPom.java as source program in Maven publication
This leverages the ability to launch multi-file source-code programs add in Java-22 via JEP-458: - https://openjdk.org/jeps/458
1 parent 361fa66 commit 88a98bd

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

JenkinsJobs/Releng/publishToMaven.jenkinsfile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pipeline {
1010
label 'basic'
1111
}
1212
tools {
13-
jdk 'temurin-jdk21-latest'
13+
jdk 'temurin-jdk23-latest'
1414
maven 'apache-maven-latest'
1515
}
1616
environment {
@@ -71,20 +71,9 @@ pipeline {
7171
# - organization
7272
# - issue management
7373

74-
ENRICH_POMS_JAR=${WORKSPACE}/work/EnrichPoms.jar
75-
ENRICH_POMS_PACKAGE=org.eclipse.platform.releng.maven.pom
76-
77-
#TODO: Just launch as multi-file source-code program as soon as Java-22 or later is used: https://openjdk.org/jeps/458
78-
# build the jar:
79-
mkdir -p ${WORKSPACE}/work/bin
80-
javac -d "${WORKSPACE}/work/bin" $(find "${MAVEN_PUBLISH_BASE}/src" -name \\*.java)
81-
pushd "${WORKSPACE}/work/bin"
82-
jar --create --verbose --main-class=${ENRICH_POMS_PACKAGE}.EnrichPoms --file=${ENRICH_POMS_JAR} $(find * -name \\*.class)
83-
popd
84-
ls -l ${ENRICH_POMS_JAR}
85-
74+
enrichPomsSourceFile="${MAVEN_PUBLISH_BASE}/src/org/eclipse/platform/releng/maven/pom/EnrichPoms.java"
8675
set -x
87-
java -jar ${ENRICH_POMS_JAR} ${REPO}/org/eclipse/{platform,jdt,pde}
76+
java ${enrichPomsSourceFile} ${REPO}/org/eclipse/{platform,jdt,pde}
8877
set +x
8978

9079
echo "==== Add Javadoc stubs ===="

0 commit comments

Comments
 (0)