What is Maven
Maven is a project management and comprehension tool. Maven provides developers a complete build lifecycle framework. Development team can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.
What are the aspects Maven manages?
Maven provides developers ways to manage following:
What are the phases of a Maven Build Lifecycle?
Phases | Description |
validate | validate the project is correct and all necessary information is available |
compile | compile the source code of the project. |
test | test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed |
package | take the compiled code and package it in its distributable format, such as a JAR |
Integration-test | process and deploy the package if necessary into an environment where integration tests can be run |
verify | run any checks to verify the package is valid and meets quality criteria |
install | install the package into the local repository, for use as a dependency in other projects locally |
deploy | done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects. |
What is difference between Snapshot and Version?
In case of Version, if Maven once downloaded the mentioned version say data-service:1.0, it will never try to download a newer 1.0 available in repository. To download the updated code, data-service version is be upgraded to 1.1.
In case of SNAPSHOT, Maven will automatically fetch the latest SNAPSHOT (data-service:1.0-SNAPSHOT) everytime app-ui team build their project.
What are the advantages of Maven?
What it does?
Maven simplifies the above mentioned problems. It does mainly following tasks.
It makes a project easy to build
It provides uniform build process (maven project can be shared by all the maven projects)
It provides project information (log document, cross referenced sources, mailing list, dependency list, unit test reports etc.)
It is easy to migrate for new features of Maven
Apache Maven helps to manage
What features should a build tool have?
A build tool should have:
What is a transitive dependency in Maven?
Transitive dependency in Maven means that it is not necessary to discover and specify the libraries that our own dependencies require, Maven includes them automatically.
What is the difference between version and SNAPSHOT ?
Maven will download always the specified version. In case of SNAPSHOT Maven will download the latest SNAPSHOT.
What is a Mojo?
A mojo is a Maven plain Old Java Object . Mojo is associated with a Maven goal. A custom plugin is a set of related Mojos (or goals) in a single plugin artifact.
What does the Maven command mvn clean do?
This command erase the target directory with all the build data before starting the building process.
You liked the article?
Like : 0
Vote for difficulty
Current difficulty (Avg): Medium
1/15
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.
Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox