Maven
What is a build tool?
Build tool is a program that automate the creation of executable program from source code.Building incorporate compiling, linking, and packaging the code into executable program.
Maven
Maven is build automation tool used primarily in Java projects. Maven can also used to build and manage projects written in c#, Ruby, Scala and other languages. The Maven project is hosted by Apache Software Foundation.
Maven addresses two aspects of building software: How software is build and its dependencies. Unlike earlier tools like Apache Ant, it uses conventions for the build procedure, and only exception need to be written down. An XML file describes the software project being built, its dependencies on other external modules and components, the build order, directories and required plugins. It comes with predefined targets for performing certain well defined tasks such as compilation of code and its packaging. Maven dynamically downloads Java libraries and Maven plugins form one or more repositories such as the Maven 2 central Repository, and stores them in a local cache. This local cache of downloaded artifacts can also be updated with artifacts created by local projects. Public repositories can also be updated.
Maven is built using a plugin based architecture that allows it to make use of any application controllable through standard input.
Maven Build Life Cycle.
- validate
- generate-sources
- process-sources
- generate-resources
- process-resources
- compile
- process-test-sources
- process-test-resources
- test-compile
- test
- package
- install
- deploy
Plugins
Most of Maven's functionality is in plugins. A plugin provides a set of goals that can be executed using the command mvn [plugin-name]:[goal-name].
There are Maven plugins for building, testing, source control management, running a web server and much more. Plugins are introduced and configured in a <plugins> section of a pom.xml file. Soem basic plugins are included in every project by default, and they have sensible default settings.
Plugins are primary way to handle Maven. Deploying a Maven plugin can be done by extending the org.apache.maven.plugin.AbstractMojo class.
Reference:https://en.wikipedia.org/wiki/Apache_Maven
No comments:
Post a Comment