InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is a 'Dependency Scope'? What are the different types of Dependency Scopes? |
|
Answer» The dependency scope pertains to all dependencies related to the present stage of the build. The following are the several sorts of dependence scopes:
|
|
| 2. |
What do you understand about the term ‘Super POM’? |
|
Answer» Any POM file has the ability to point to its parent POM. There is a system-wide POM file that is automatically considered as the parent POM file if the parent POM element is absent. The super POM is the name GIVEN to this POM file. Finally, the super POM is used to EXTEND all of the application POM files. The apex of the POM hierarchy is the super POM file. The super POM file CONTAINS all of the default configurations. All of the configurations defined in the super POM file will be inherited by even the SIMPLEST version of a POM file. You can alter any option you want by redefining the same section in your application POM file. |
|
| 3. |
What exactly is MOJO? |
|
Answer» Every Maven plain Old Java OBJECT (MOJO) is an executable GOAL, and a PLUGIN pertains to the distribution of these MOJOs. MOJO allows Maven to add functionalities that it doesn't already have. In Maven, a MOJO is a single unit of the TASK. |
|
| 4. |
How to generate javadocs in Maven? |
|
Answer» The MAVEN-javadoc PLUGIN is used by Maven to generate a project's JAVADOCS. To create javadocs, this plugin internally USES the JDK\bin\javadoce.exe command. The javadocs for the project are GENERATED when the project is deployed with the mvn install command. |
|
| 5. |
How would you refer to a property declared in your pom.xml file? |
|
Answer» In order to refer to a property declared in your pom.xml, the property name MAKES use of the names of the XML COMPONENTS that designate the VALUE, with "pom" being ACCEPTED as a synonym for the project (root) element. So ${pom.name} is the project's name, ${pom.version} is the project's version, ${pom.build.finalName} is the final name of the file generated when the built project is PACKAGED, and so on. |
|
| 6. |
What are the different types of Maven build profiles? In what ways can build profiles of maven be activated? |
|
Answer» The different types of Maven build profiles are:
Maven build profiles can be activated or TRIGGERED in the FOLLOWING ways: |
|
| 7. |
What are the locations where Maven dependencies are stored? |
|
Answer» MAVEN saves all of the JARs, dependency files, and other THINGS it downloads in the Maven local repository. All of the artifacts are kept locally in the Maven local repository, which is a folder on the local MACHINE. |
|
| 8. |
In Maven, what is a snapshot? |
|
Answer» A snapshot is a specific version of a PROJECT that shows the most recent development copy of the project being worked on. Maven always checks out a SNAPSHOT of the project in the REMOTE repository for each build. As a result, ANYTIME Maven discovers a newer SNAPSHOT of the project, it downloads and replaces the project's older .jar file in the local repository. |
|
| 9. |
What is Maven's inheritance order? |
|
Answer» In MAVEN, the ORDER of INHERITANCE is:
|
|
| 10. |
“Maven uses convention over configuration” - Why is it so? |
Answer»
|
|
| 11. |
What are Maven plugins used for? What are the types of Maven plugins? |
|
Answer» MAVEN Plugins are used for:
Maven plugins are DIVIDED into two categories:
|
|
| 12. |
What are the different phases of the default life cycle? |
|
Answer» The different phases of the default lifecycle are:
|
|
| 13. |
In Maven, what do you mean by Clean, Default, and Site? |
| Answer» | |
| 14. |
What command should one use to install JAR files in the Local Repository? |
| Answer» | |
| 15. |
What are the different types of Maven repositories? Discuss. |
|
Answer» The three types of repositories of MAVEN are:
Maven scans these repositories for dependencies. Maven looks in the Local repository first, then the Central repository, and finally the Remote repository if the Remote repository is defined in the POM.
|
|
| 16. |
What elements are used for creating a pom.xml file? |
|
Answer» The following elements are necessary for creating a pom.xml file:
Other Pom.xml File Elements
|
|
| 17. |
List a few differences between Maven and ANT. |
||||||||||||||
Answer»
|
|||||||||||||||
| 18. |
How does Maven work? |
|
Answer» Maven works in three steps:
|
|
| 19. |
Discuss the core concepts of Maven. |
|
Answer» The core concepts of Maven are:
|
|
| 20. |
When should one use Maven? |
|
Answer» The Maven Build Tool can be used in the following CONDITIONS:
|
|