You need to publish Java artifacts: snapshots on every `main` build, releases on tags. Design with Nexus.
IntermediateScenarioIntegrations & delivery
Answer
Situation read → Two repositories with different policies.
What I'd do →
pom.xmldistributionManagementwithmaven-snapshotsandmaven-releasesURLs.- Pipeline: on
main,mvn -B deploywith-SNAPSHOTversion; on tagv1.4.0, set version fromTAG_NAME(mvn versions:set -DnewVersion=1.4.0) and deploy to releases. - Nexus: releases disallow redeploy, snapshots have cleanup policies.
- Credentials via settings.xml from Config File Provider with credential substitution.
Why → Immutable releases plus disposable snapshots is the standard Maven model.
Interview tip → Mention that redeploying a release returning 400 is a feature.
More on Integrations & delivery
The SonarQube quality gate step waits until timeout on every build, even though analysis completes. Design the correct integration.IntermediateDevelopers want to deploy to Kubernetes from Jenkins, but security does not want cluster-admin kubeconfigs in Jenkins. What do you propose?AdvancedTrivy blocks a release because of a HIGH CVE in a base image package with no fix available. Business wants to ship. What do you do?IntermediateImage builds take 9 minutes in Kubernetes pods because nothing is cached. How do you add caching with Kaniko?IntermediateA pipeline should promote the exact image that passed staging to production, not a rebuild. How do you guarantee it?IntermediateYour SonarQube analysis must decorate PRs with comments and fail PR builds on new issues only. How do you configure the pipeline?Advanced