From bfc8994ce4977500e55534df9fc4a8d4ed3ef54c Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 11 Apr 2026 11:42:23 +0200 Subject: [PATCH] [I/Y-Build] Unify temp directory and local Maven cache configuration Ensure all Maven builds use the same (workspace) local Maven cache. --- .gitignore | 3 --- JenkinsJobs/Builds/build.jenkinsfile | 19 +++++++++---------- cje-production/.gitignore | 6 ++++++ cje-production/buildproperties.txt | 1 - cje-production/gitCache/readme.txt | 1 - cje-production/siteDir/readme.txt | 1 - eclipse-platform-parent/pom.xml | 1 - 7 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 cje-production/.gitignore delete mode 100644 cje-production/gitCache/readme.txt delete mode 100644 cje-production/siteDir/readme.txt diff --git a/.gitignore b/.gitignore index f74826f609b..9f29877fc89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,10 @@ bin/ -TMP/m2repo/ settings.xml -setup.sh *~ *.bak workspace/ .metadata/ RemoteSystemsTempFiles/ -/apiAnalyzer-workspace/ eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/samples/*/doc-html /tools/ diff --git a/JenkinsJobs/Builds/build.jenkinsfile b/JenkinsJobs/Builds/build.jenkinsfile index e272d273396..0b492a59b26 100644 --- a/JenkinsJobs/Builds/build.jenkinsfile +++ b/JenkinsJobs/Builds/build.jenkinsfile @@ -31,16 +31,15 @@ pipeline { maven 'apache-maven-latest' } environment { - MAVEN_OPTS = '-Xmx4G' CJE_ROOT = "${WORKSPACE}/cje-production" SCRIPTS = "${WORKSPACE}/scripts" AGG_DIR = "${CJE_ROOT}/gitCache/eclipse.platform.releng.aggregator" + TEMP_DIR = "${CJE_ROOT}/tmp" logDir = "$CJE_ROOT/buildlogs" PRODUCTS_DIR = "${AGG_DIR}/products" SITES_DIR = "${AGG_DIR}/sites" PLATFORM_REPO_DIR = "${SITES_DIR}/eclipse-platform-repository/target/repository" - DROP_DIR = "${CJE_ROOT}/siteDir/eclipse/downloads/drops4" EQUINOX_DROP_DIR = "${CJE_ROOT}/siteDir/equinox/drops" // Download server paths @@ -48,6 +47,9 @@ pipeline { EP_ECLIPSE_UPDATES = "${EP_ROOT}/eclipse/updates" EP_ECLIPSE_DROPS = "${EP_ROOT}/eclipse/downloads/drops4" EP_EQUINOX_DROPS = "${EP_ROOT}/equinox/drops" + // Tool configurations + MAVEN_OPTS = "-Xmx4G -Dmaven.repo.local=${TEMP_DIR}/maven-repo" + JDK_JAVA_OPTIONS = "-Djava.io.tmpdir=${TEMP_DIR}" } stages { stage('Set up environment') { @@ -177,16 +179,15 @@ pipeline { environment { KEYRING = credentials('secret-subkeys-releng.asc') MAVEN_GPG_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase') - LOCAL_REPO = 'localMavenRepo' } steps { dir("${AGG_DIR}") { sh '''#!/bin/bash -xe source $CJE_ROOT/buildproperties.shsource - mkdir -p ${CJE_ROOT}/${TMP_DIR} + mkdir -p ${TEMP_DIR} mvn clean install -pl :eclipse-sdk-prereqs,:org.eclipse.jdt.core.compiler.batch \ - -Dmaven.repo.local=${LOCAL_REPO} -DlocalEcjVersion=99.99 \ + -DlocalEcjVersion=99.99 \ -DcompilerBaselineMode=disable -DcompilerBaselineReplace=none set -o pipefail @@ -197,8 +198,7 @@ pipeline { -Dcbi.jarsigner.continueOnFail=true \ -Dtycho.pgp.signer=bc -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" \ -Djgit.dirtyWorkingTree=error \ - -Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \ - -Dmaven.repo.local=${LOCAL_REPO} -Dcbi-ecj-version=99.99 \ + -Dcbi-ecj-version=99.99 \ -DbuildType=${BUILD_TYPE} -DbuildId=${BUILD_ID} -DbuildTimestamp=${TIMESTAMP} \ -e -T 1C \ 2>&1 | tee ${logDir}/mb220_buildSdkPatch.sh.log @@ -235,7 +235,6 @@ pipeline { java \ -DbuildDirectory=${DROP_DIR}/$BUILD_ID \ -DcomparatorRepo=${comparatorRepo} \ - -Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \ ${WORKSPACE}/scripts/releng/ComparatorSummaryExtractor.java comparatorLogMinimumSize=350 @@ -352,13 +351,13 @@ pipeline { # Generate repository reports mvn tycho-eclipse:eclipse-run@generate-repo-report -f eclipse-platform-parent \ - -Declipserun.workArea=${CJE_ROOT}/${TMP_DIR}/repo-report \ + -Declipserun.workArea=${TEMP_DIR}/repo-report \ -DreportRepoDir=${PLATFORM_REPO_DIR} \ -DreportOutputDir=${DROP_DIR}/${BUILD_ID}/buildlogs # Generate API-tools reports mvn tycho-eclipse:eclipse-run@generate-api-report -f eclipse-platform-parent \ - -Declipserun.workArea=${CJE_ROOT}/${TMP_DIR}/apitoolings-logs \ + -Declipserun.workArea=${TEMP_DIR}/apitoolings-logs \ -DgitRepoRoot=${AGG_DIR} \ -DbuildDirectory=${DROP_DIR}/${BUILD_ID} \ -DbuildId=$BUILD_ID \ diff --git a/cje-production/.gitignore b/cje-production/.gitignore new file mode 100644 index 00000000000..e62dc1f54a4 --- /dev/null +++ b/cje-production/.gitignore @@ -0,0 +1,6 @@ +# Contains the git cache and maven build runs from there +/gitCache/ +# Contains the build site directory structure +/siteDir/ +# Contains the temporary files of the build +/tmp/ diff --git a/cje-production/buildproperties.txt b/cje-production/buildproperties.txt index db3efd4dc91..28fe1099ef7 100644 --- a/cje-production/buildproperties.txt +++ b/cje-production/buildproperties.txt @@ -22,7 +22,6 @@ STREAM="4.40.0" STREAMMajor="4" STREAMMinor="40" STREAMService="0" -TMP_DIR="tmp" NEXT_JAVA_RELEASE_DATE="" PREVIOUS_RELEASE_VER="4.39" diff --git a/cje-production/gitCache/readme.txt b/cje-production/gitCache/readme.txt deleted file mode 100644 index ea427d90603..00000000000 --- a/cje-production/gitCache/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Holds the git cache and maven build runs from here diff --git a/cje-production/siteDir/readme.txt b/cje-production/siteDir/readme.txt deleted file mode 100644 index 365613465db..00000000000 --- a/cje-production/siteDir/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Holds the site directory structure diff --git a/eclipse-platform-parent/pom.xml b/eclipse-platform-parent/pom.xml index 55c72406c1f..9566a813746 100644 --- a/eclipse-platform-parent/pom.xml +++ b/eclipse-platform-parent/pom.xml @@ -557,7 +557,6 @@ -DpreviousBaseURL=https://download.eclipse.org/eclipse/downloads/drops4/${previousReleaseId}/eclipse-SDK-${previousReleaseVer}-win32-x86_64.zip -DpreviousBaselineName=Eclipse-SDK-${previousReleaseVer} -DpreviousBaselineFilename=eclipse-SDK-${previousReleaseVer}-win32-x86_64.zip - -Djava.io.tmpdir=${env.CJE_ROOT}/${env.TMP_DIR}