A team needs to build the same Java app for multiple JDK versions.
BeginnerScenarioBuilds, Artifacts, Nexus, SonarQube and Testing
Answer
Situation read → Compatibility testing.
What I'd do →
- Use Maven toolchains or CI matrix (
jdk: [17, 21]), compiling with a fixed release flag (maven.compiler.release=17). - Run tests on each JDK; ship the artifact built on the baseline.
Why → release ensures API compatibility, and the matrix proves runtime behaviour.
Interview tip → Release only one artifact; test on many.
More on Builds, Artifacts, Nexus, SonarQube and Testing
A Maven project resolves dependencies from Maven Central on every build and a left-pad style outage would stop all builds.BeginnerYou must publish snapshot and release artifacts without overwriting a released version.IntermediateEvery merge to main should produce a unique semantic version automatically.IntermediateAn npm build is non-reproducible: different versions install on different days.BeginnerThe SonarQube quality gate must block merging PRs that add new bugs, vulnerabilities or uncovered code.IntermediateCoverage shows 0% in SonarQube although tests run in CI.Intermediate