Maven, Git & SDLC interview questions
35 Maven, Git & SDLC interview questions with answers, from junior to mid level.
Foundations
- What is version control and why do teams use it?
- What is Git?
- What is a Git repository (repo)?
- What is a Git commit?
- What is a Git branch?
- Which sequence is the everyday Git flow to save and share a change?
- What is
pom.xmlin a Maven project? - In a standard Maven project, where do the source code and the test code go?
- What does
mvn cleando? - What is a 'build' in software?
- Explain Git and GitHub to a beginner.
Core
- What is Maven used for in a Java project?
- What do the Maven coordinates
groupId,artifactIdandversionidentify? - Which is the correct order of the main Maven default lifecycle phases?
- What is the difference between
mvn packageandmvn install? - What is the difference between Git and GitHub?
- Git has three main areas on your machine. Which list is correct?
- What is the difference between
git fetchandgit pull? - What is a pull request (PR) / merge request?
- What is the purpose of a
.gitignorefile? - What are the main phases of the Software Development Life Cycle (SDLC)?
- Explain the basic Git workflow you use every day with a team.
Intermediate
- What do the Maven dependency scopes
compile,provided,runtimeandtestmean? - What is a transitive dependency?
- What is a
-SNAPSHOTversion in Maven? - What do
<parent>and<dependencyManagement>(BOM) help with in a pom? - What is the difference between Maven Surefire and Failsafe plugins?
- What is the difference between
git resetandgit revertfor undoing a commit? - What does
git stashdo? - What does
git cherry-pick <commit>do? - What is a typical difference between Git Flow and trunk-based development?
- What is a good commit message and commit size?
- Describe the Maven build lifecycle and how you would fix a dependency conflict.
- Explain Agile and Scrum to someone who has never worked in a team.