Professional Documents
Culture Documents
***What is Maven?
Maven is a build and project management tool that is generally used in frameworks
built in Java. It is developed by Apache Software Foundation.
Maven will be controlled by the Project Object Model (pom) file.
Before Maven, all dependencies nothing but JAR files have to be added to our
project manually.
Also, we needed to take care of the software upgrade in our project. Maven ensures
that project JARs and libraries are downloaded automatically.
Only the information relating to the versions of the software and the type of
dependencies need to be described in the pom .xml file.
***What is POM?
It is a XML file, it’s fundamental unit of work in Maven. Locate in the base
directory of the project as pom.xml. The POM contains information about the project
and various configuration detail used by
Maven to build the project(s). Some of the configuration that can be specified in
the POM are following:
project dependencies
plugins
goals
build profiles
project version
developers etc ...
Only one POM file will be there in each Maven project. Each POM files require the
project element and three mandatory fields: groupId, artifactId,version.
***What is repository?
A repository is a place i.e. directory where all the project jars, library jar,
plugins or any other project specific artifacts are stored and can be used by Maven
easily.
1. Local (on your machine). When running Maven build, then Maven automatically
downloads all the dependency jars into the local repository. First place to search.
2. Central (provided by Maven community). When Maven does not find any dependency
in local repository, it starts searching in central repository.
3. Remote. Own custom repository containing required libraries or other project
jars. Maven will go to this repository if the dependency not found at central
repository.
A Build Lifecycle is a well defined sequence of phases which define the order in
which the goals are to be executed. The individual steps are called phases and the
same phases are run for every
Maven build using the default life-cycle.
1. default(or build). This is the primary life cycle of Maven and It will handle
project build and deployment
2. clean. There are three phases:pre-clean, clean, post-clean [Removes any errors,
thereby cleaning the project, and removing the artifact produced from the previous
process of the build.]
3. site. Generally used to create fresh documentation to create reports, deploy
site etc. Phases: pre-site, site post-site, site-deploy
***What is Archtype?
A template of a project which is combined with some user input to produce a working
Maven project will be used as per Project Requirements.