Interview Prep/CI/CD/Builds, Artifacts, Nexus, SonarQube and Testing

The Maven build is slow on multi-module projects.

IntermediateScenarioBuilds, Artifacts, Nexus, SonarQube and Testing
Answer

Situation read → Serial modules and repeated work.

What I'd do →

  1. Build in parallel with mvn -T 1C -B verify.
  2. Skip unchanged modules with -pl and -amd (also-make-dependents) based on the change set.
  3. Separate fast unit tests from slow integration tests (Surefire vs Failsafe).
  4. Use the Maven daemon (mvnd) locally and a dependency proxy in CI.

Why → Parallelism and building only what is affected gives most of the gain.

Interview tip → -amd and -pl show Maven fluency.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Builds, Artifacts, Nexus, SonarQube and Testing