Prev Next

DevOps / Maven Interview questions

Different types of dependency scope.

The element allows one of the 6 scopes: compile, provided, runtime, test, system and import.

Compile

default scope;it indicates what dependency is available in the classpath of the project.

Provided

indicates that the dependency is provided by JDK or web server or container at runtime.

Runtime

the dependency is not needed for compilation but is required during execution.

Test

indicates that the dependency is not required for normal usage of the application however it is only available for the test compilation and execution phases.

system

You need to provide the JAR which contains it explicitly.

import

Only used on the dependency of type pom in the . indicates that the specified POM gets replaced or imported with the dependencies in that POM.

More Related questions...

What are the minimum requirements for a POM? What is Apache Maven? How do you rename a maven project? Explain dependency:copy-dependencies goal. maven repository central. Maven artifact. Build phases in Maven. MOJO. Explain the highlevel directory structure of a maven project. What jar:jar goal does? Types of maven repository. Can we use different name for POM.xml? 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