What is Maven?
Before going into What is Maven? Let’s see the purpose.
We all work in different project, though all projects share enough of the same characteristics in its general approach to project management. On a very high level all projects need to be built, tested, packaged, documented and deployed. Of course there is infinite differences in each of the above mentioned steps, but this differences still occurs within the model of a well defined path and it is this path that Maven attempts to present to everyone in a clear way. The easiest way to make a path clear is to provide people with a set of patterns that can be shared by anyone involved in a project.
- A model for a project so you could look in one place for everything that pertained to the project
- A standard directory structure so you didn’t have to go fishing around for libraries, sources and documentation
With above purpose in mind, lets see what it is.?
What is Maven?
At first glance it appears to be many things, but in a nutshell Maven is an attempt to apply patterns to a project’s build infrastructure in order to promote comprehension and productivity by providing a clear path in the use of best practices. It is essentially a project management and comprehension tool and as such provides a way to help with managing:
Maven’s primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:
- Making the build process easy – While using Maven doesn’t eliminate the need to know about the underlying mechanisms, It does provide a lot of shielding from the details.
- Providing a uniform build system – Allows a project to build using its project object model (Everything is POM) and a set of plugins that are shared by all projects using Maven, providing a uniform build system. Once you familiarize yourself with how one Maven project builds you automatically know how all projects build saving you immense amounts of time when trying to navigate many projects.
- Providing quality project information
- Change log document created directly from source control
- Cross referenced sources
- List of mailing lists managed by the project
- Dependency list
- Unit test reports including coverage and all of which will be transparent to users of Maven.
- Providing guidelines for best practices development – For example, specification, execution, and reporting of unit tests are part of the normal build cycle using Maven.
- Allowing transparent migration to new features – provides an easy way for clients to update their installations so that they can take advantage of any changes that been made to Maven itself.Installation of new or updated plugins from third parties or Maven itself has been made trivial for this reason.
Maven’s project infrastructure looks the same and work the same at project modeling which will be too flexible. Maven will save people time by being able to find things in the same place.
Next challenge is we would have noticed all the JARs that we were depending on were stored in CVS before. We had many copies of same JARs laying around which is a waste of space, every time the version of same JAR changed you had to update the copies of JARs in each of the projects, but more importantly without some declarative statement of your dependencies there is no way you could perform any analysis. People tend to miss the point entirely regarding a declarative dependency use.
Maven was implemented to employ standard Java-like inheritance in the model used and find a way to create a repository for things you need to build. So that was time to introduce repository for artifacts.
Maven can provide benefits for your build process by employing standard conventions and practices to accelerate your development cycle while at the same time helping you achieve a higher rate of success.
Check out other posts related to Maven