Prev Next

DevOps / Maven Interview questions

Explain the difference phases in Maven build Lifecycle.

Maven build lifecycle is defined by a list of build phases, where a build phase represents a stage in the lifecycle.

The default lifecycle comprises of the following phases.

validate - validates the project is correct and all necessary information is available.

compile - compile the source code of the project.

test - tests the compiled source code using a suitable unit testing framework. These tests does not require the code to be packaged or deployed.

package - take the compiled code and package it to its distributable format, for example, JAR.

verify - runs any checks on results of integration tests to ensure desired quality criteria are met.

install - installs the package into the local repository, for using it as a dependency in other projects locally.

deploy - performed in the build environment, copies the final package to the remote repository for sharing and collaboration with other members of the team and projects.

More Related questions...

What jar:jar goal does? What are the minimum requirements for a POM? maven repository central. Explain dependency:copy-dependencies goal. Explain the highlevel directory structure of a maven project. Build phases in Maven. Maven artifact. What is Apache Maven? Types of maven repository. MOJO. Can we use different name for POM.xml? How do you rename a maven project? How do I skip the tests? How can I run a single unit test? Maven plugin. POM. Different types of dependency scope. What makes a fully qualified name for the artifact? what uniquely identifies an artifact? Maven Repository. Why Maven is used? Where do we find .class files of a Maven project? Super POM. Transitive Dependency. What is Maven's order of inheritance? How do I find the Installed maven Version? Difference between compile and install. Find details on the dependencies for the project. What is a Maven project's fully qualified artifact name? Order by which Maven searches for the dependency. groupId. artifactId. Maven snapshot. Explain the difference phases in Maven build Lifecycle. How do I specify packaging/distributable format in Maven? How Maven searches for dependency JAR? Explain how Maven uses Convention over Configuration? How to run unit tests using Maven? How do I run a Single Test using Maven? How to run a single test method using maven. Difference between Gradle and Maven. How do I install a 3rd party jar into the Maven repository? Explain the advantages of using Maven. Drawbacks of using Maven. What is a Maven BOM file? What is the purpose of dependency-reduced-pom.xml generated by the shade plugin?
Show more question and Answers...


Comments & Discussions