build(ci): test once on JDK 17 in Jenkins, reserve Jetty ports for the showcase ITs - #1967
Merged
Merged
Conversation
…e showcase ITs Jenkins ran the suite on JDK 21 and again on JDK 17 with -Pcoverage, then re-compiled the tree three more times for install, deploy and the nightlies. GitHub Actions already covers JDK 17, 21, 25 and the Jakarta EE 11 profile, and the JaCoCo data had no consumer on Jenkins. Jenkins now runs one verify on JDK 17 and keeps only what GitHub cannot do: the snapshot deploy and the nightlies upload. The deploy also passes -DskipITs: failsafe 3.6.0 has no skipTests parameter, so the showcase integration tests were booting Jetty on every "skipped" invocation. The nightlies step builds only the assembly module; the preceding deploy has already installed every other module and the descriptors read the sibling target/ directories of the same workspace. The old "Build Source & JavaDoc" stage ran in its own Maven session, so its jars were never attached to the deploy; the snapshot repository has only the main jar and pom. Dropping it changes nothing that is published. The showcase integration tests bound Jetty to a fixed 8090/8999. disableConcurrentBuilds() serialises only builds of the same branch job, so main and a pull request landing on one agent collided, and the pre-start "stop" goal with the shared stop key could shut down the neighbouring build's server. build-helper now reserves free ports for the start/stop executions; the plugin-level 8090/8999 stay in place for an interactive jetty:run. The port properties are deliberately not declared under <properties>: a declared property is interpolated into plugin configuration at model-build time, before build-helper runs, and the default would win everywhere. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lukaszlenart
marked this pull request as ready for review
September 19, 2026 05:44
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Jenkinsfile— oneubuntuagent, JDK 17, four stages:verify -DskipAssemblydeploy -DskipTests -DskipITs -DskipAssemblymainpackage -DskipTests -DskipITs -pl assemblymainRemoved: the JDK 21 stage,
-Pcoverage, the separateinstall -DskipTests, the "Build Source & JavaDoc" stage and the second agent acquisition. Compiles onmaingo from 5 → 2 (+ the assembly module), full test runs from 2 → 1; a PR build is a singleverify. Emails,junitpublishing,cleanWs, timeout and polling are unchanged.apps/showcase/pom.xml—build-helper-maven-plugin:reserve-network-portgives the Jettystart/stopexecutions a free port pair instead of the fixed8090/8999; failsafe'shttp.portfollows. The plugin-level8090/8999stay, so an interactivemvn jetty:runis unchanged. Thestopgoal that ran beforestartis gone.Why
maven.yml) already runs JDK 17, 21, 25 and the Jakarta EE 11 profile; Sonar consumes the JaCoCo data there. Every Jenkins test run was a subset of that, and-Pcoverageon Jenkins had no consumer. What Jenkins uniquely does is the snapshot deploy and the nightlies upload.disableConcurrentBuilds()only serialises builds of the same branch job.mainand a PR landing on one agent both bound8090, and the pre-startstopgoal with the shared stop key could shut down the neighbouring build's Jetty mid-test.skipTestsparameter (onlyskip/skipITs), so every-DskipTestsinvocation was still booting Jetty and running the 60 showcase ITs. Hence-DskipITson the deploy and nightlies lines..jar+.pomtoday. Dropping it publishes exactly what was published before. If sources/javadoc in snapshots are wanted, the line issource:jar javadoc:jar deploy(goals before the phase, so they attach) at the cost of javadoc time on everymainbuild.deployinstalls every module, so the nightlies step only needs the assembly module; its descriptors read the siblingtarget/andsrc/directories of the same workspace.The port properties are deliberately not declared under
<properties>: a declared property is interpolated into plugin configuration at model-build time, beforebuild-helperruns, so the default wins everywhere. Only the executions reference the reserved names.Verified
mvn -pl apps/showcase verifywith8090and8999both held bync -l: Jetty on a reserved port, 60/60 ITs green, clean stop on the reserved stop port.verifyruns at once from two worktrees: distinct ports, both green, each stopping its own Jetty.mvn package -DskipTests -DskipITs -pl assemblyoffline after an install: all six zips built.verifypath is what this PR's Jenkins build exercises; the deploy/nightlies path only runs after merge tomain— watch the firstmainbuild.Out of scope, noted for later:
apps/rest-showcasehas IT classes but no failsafe execution, so they never run; and thesupport/struts-6-x-xJenkinsfile is separate (JDK 8) and untouched.🤖 Generated with Claude Code