Maven is a type of automated tool designed for understanding how software is built using a programming language and how it is dependent on the various codes and functionalities of the basic language. Its basic concepts and components tell you about all the key steps which are involved in the process of web-based application development using these tools and how to manage them.
Below are few major features of Maven
Q1. List few difference between Apache Ant and Maven?
Apache Ant:
Maven:
Q2. List few advantages of Maven?
The advantages of Maven are:
Q3. What mvn clean do?
Maven clean is used to clean phase in the clean lifecycle by deleting the output of a build by deleting the build directory.
Q4. What information does POM file contains?
A POM file or Project Object Model file is an XML file that contains information about the project and configuration details used by Maven to build the project.
Q5. What is a Maven Repository?
Maven Repository is basically a directory consists of all the project jars, library jar, plugins or any other project-specific artifacts that can be used by Maven easily.
Q6. How many types of Repository are available in Maven?
There are two types of Repositories available in Maven. These two repositories are:
Q7. What M2_HOME variable stores?
M2_HOME is a variable used in maven to locate maven 2. It basically tells the program where to find Maven installation.
Q8. What are the elements of a project's coordinates in Maven?
The elements of a project's coordinates in Maven are:
Q9. What are the different Maven build lifecycles?
There are three built-in Maven build lifecycles:
Q10. List the phases of the default lifecycle in Maven?
The phases of the default lifecycle in Maven are:
Q11. What is an archetype?
An Archetype is a Maven project templating toolkit which is consists of a very simple artifact, that contains the project prototype and creates project structure as per its template.
Q12. How to add a dependency in Maven Project?
We can add a dependency in Maven Project with the help of the following steps:
Step 1 - Right-click the utility project, and select Maven>Add Dependency.
Step 2 - Type a dependency name in the Enter groupID… field to search for a dependency.
Step 3 - Select the dependency, and click OK.
Step 4 - Expand the utility project, right-click the pom.xml file, and select Run As>Maven Install to install the file into the local repository.
Step 5 - View the Console. When it displays “Build Success,” the utility project is available for reference by other projects.
Q13. What is Maven and what can it be used for?
Maven is a powerful project management tool that is based on POM or project object model which is used for building and managing any Java-based project, dependency, and documentation.
Q14. What is dependency exclusion in Maven?
Exclusions are set on a specific dependency in your POM or project object model and are targeted at a specific groupId and artifactId.
Q15. What is the difference items in Repository-Manager and SCM?
SCM stands for Supply chain management which is the centralized management of the flow of goods and services and includes all processes that transform raw materials into final products.
Q16. What does the SNAPSHOT designator in a version indicate?
The SNAPSHOT designator in a version indicates that a project is in a state of development.
Q17. What are transitive dependencies?
A transitive dependency is indirectly formed by two functional dependencies. For e.g. X -> Z is a transitive dependency if the following three functional dependencies hold true:
Q18. What is the default Logging level in maven?
simpleLogger. defaultLogLevel represents the default log level in Maven.
Q19. How to run multiple profiles in maven in CLI?
To run multiple profiles in maven in CLI we can activate command line: mvn groupId:artifactId:goal.
Valid name is required.
Valid name is required.
Valid email id is required.
Sharad Jaiswal
My name is Sharad Jaiswal, and I am the founder of Conax web Solutions. My tech stacks are PHP, NodeJS, Angular, React. I love to write technical articles and programming blogs.