Skip to content
$ lynuxpro

INTERVIEW PREP

Interview questions

570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.

Showing 1–6 of 6 questions

Learn Maven & Build Tools →
1.What happens when you run mvn package?Beginner

Maven runs every lifecycle phase up to package in order: validate, compile, test, then package. Each phase runs the plugin goals bound to it, producing the jar in target/.

2.What are dependency scopes?Beginner

compile (default, everywhere), provided (compile only, the runtime supplies it), runtime (not for compiling), test (tests only), and system/import. Scope controls the classpath and whether the dependency is packaged.

3.What is a POM file?Beginner

pom.xml describes a Maven project: its coordinates (groupId, artifactId, version), dependencies, plugins, packaging and build settings. Maven reads it to know what to download and how to build.

4.What are Maven coordinates?Beginner

groupId:artifactId:version (plus packaging and classifier) uniquely names an artifact, for example org.springframework:spring-core:6.1.2. Repositories store artifacts by these coordinates.

5.What are the main phases of the Maven lifecycle?Beginner

validate, compile, test, package, verify, install and deploy. Running a phase runs every phase before it, so mvn install also compiles, tests and packages.

6.What is the difference between mvn install and mvn deploy?Beginner

install copies the built artifact into your local repository (~/.m2) so other local projects can use it. deploy uploads it to a remote repository like Artifactory or Nexus for everyone.