Maven Guide Pdf

Maven Guide Pdf Rating: 4,8/5 9964 votes

What is Maven?

Convexity Maven A Commentary by Harley Bassman November 15, 2018 “A Guide for the Perplexed” Moshe ben Maimon (Maimonides) 1135 - 1204 Maimonides published “The Guide for the Perplexed” in 1190 as an effort to reconcile Aristotelian Philosophy with the theology of the Hebrew Bible. ZTE Maven 3 manual user guide is a pdf file to discuss ways manuals for the ZTE Maven 3. In this document are contains instructions and explanations on everything from setting up the device for the first time for users who still didn’t understand about basic function of the phone.

  • Project generated sites: Maven generates a website or a PDF file using the same metadata as for the build process.You can include any documentation to this site and the standard report about the state of development of the project.Examples of this information can be seen at the bottom of the left-hand navigation of this site under the “Project Information” and “Project Reports” sub menus.
  • A more formal definition ofApache Maven: Maven is a project management tool which encompasses a project object model, a set of standards, a project lifecycle, a dependency management system, and logic for executing plugin goals at defined phases in a lifecycle.

Apache Maven is project management tool which is following the concept of a project object model (POM). Mavan can manage project’s build and documentation from a central place. Maven 1 actually was started as a sub project of Apache Turbine in 2002 (by Sonatype’s Jason van Zyl). It was released in July 2004 as v1.0. Maven 2 was released in Oct 2005. It was a complete rewrite of the previous project. It was not backward compatible.
Maven 3 was released in October 2010. It is same as Maven 2 but more stable. This article explores the very basic concepts needed for the beginners who want to learn and get started with the Maven. Before the popularity of using Maven, most of the projects used Ant Script for the projects build which is used only for the build purpose.

If you have any questions, please post it in the comments section. If you are interested in receiving the future articles on Java topics, please subscribe here.

Maven Definition

Definition of Maven from the Maven site(http://maven.apache.org/):
“Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.

Maven is an open source software engineering platform. The intent of Maven is to make intra-project development highly manageable in the hopes of providing more time for cross-project development. You may say it as sharing of project development knowledge. The core functionality of Maven is automated project building, distribution and website creation.

Maven features

  • Dependency System: Superior dependency management including automatic updating, dependency closures (also known as transitive dependencies). Maven encourages the use of a central repository of JARs and other dependencies. Maven has a mechanism which helps your project’s clients to download any required JARs for building your project from a central JAR repository.This allows reuse of JARs across projects for Maven users.This also helps in dealing with backward compatibility issues.
  • Multi-module builds: Able to easily work with multiple projects at the same time
  • Consistent project structure: Consistent structure across all projects means no ramp up time for new developers coming onto a project
  • Consistent build model: Maven is able to build any number of projects into predefined output types such as a JAR, WAR, or distribution based on metadata about the project, without the need to do any scripting in most cases.
  • Plugin oriented: The Maven functionality is implemented in terms of plugins.
  • Project generated sites: Maven generates a website or a PDF file using the same metadata as for the build process.You can include any documentation to this site and the standard report about the state of development of the project.Examples of this information can be seen at the bottom of the left-hand navigation of this site under the “Project Information” and “Project Reports” sub menus.

Comparison of Maven with Apache ANT:

Major differences between Maven and ANT are:

  1. Maven is description of a project whereas ANT is development of a build script per project.
  2. Maven follows conventions like a common project directory structure whereas ANT needs to be told about the exactly where to find the source and where to put the output.
  3. Maven has invocation of defined goals (targets) whereas in ANT script you have invocation of project specific targets.
  4. Maven has build life cycle, standard project layout where as ANT doesn’t and it has too complex scripts(You have to define goals and goal dependencies). You have to attach a sequence of tasks to each goal manually.
  5. Maven has reusable plugins, repositories whereas ANT scripts are not reusable.
  6. Maven is declarative.All you have to do is create a pom.xml file and put your source in the default directory. Maven takes care of the rest.ANT is procdeural which means you need to tell it to compile,copy and then compress.

Maven POM

POM stands for Project Object Model.It describes following data about a project:

  1. Metadata: Location of Directories, Developers/Contributors, Dependencies, Repositories
  2. Dependencies (Transitive Dependencies), Inheritance, and Aggregation
  3. Key Elements
    • Project
    • Model Version
    • Group ID
    • Packaging
    • Artifact ID
    • Version
    • Name
    • URL
    • Description
    • Plugins
    • Profiles (Alternate build configurations)

(Note:Transitive Dependencies definition- A dependency that should be included when declaring project itself is a dependency.Example: ProjectA depends on ProjectB. If ProjectC depends on ProjectA then ProjectB is automatically included. Only compile and run time scopes are transitive)

POM has four categories

  1. General project information-this includes project information like name,URL for project,sponsor organization,list of developers,license for the project.
  2. Build settings-This include customization of default Maven build behaviour.
  3. Build environment-This inlcudes profiles that can be used and activated for working in different environments(example development server,production server).
  4. POM relationships-This includes inheritance of POM settings of parent projects.

Standard Directory Layout
Yu yu hakusho online games.

Maven Guide Pdf Download

Install Maven

  1. Download the latest Maven from http://maven.apache.org/download.cgi.
    • The installed file is:apache-maven-3.0-bin.zip
    • Extract the archive to the directory you wish to install Maven.We have extracted to the following folder:
    • C:toolsapache-maven-3.0
  2. Test Maven
    In order to test Maven setup,you need Java installed/configured on your machine.Assuming you have JDK installed at C:Program FilesJavajdk1.7.0_11bin, execute the following commands which sets your System Environment with Java and Maven paths.
  3. Verify Maven installation
    Open the command prompt and execute the following command:

    This should give the current installed version of Maven.

Basic User specific Maven Configuration

Now that you have installed Maven, it is a good idea to setup the .m2 directory, where Maven creates its local repository. To create .m2 directory, assuming “Manisha” is logged in user, open the command console and execute the following command, to create the .m2 directory.

Maven The Definitive Guide Pdf

The settings.xml file(under the .m2 directory) contains user-specific configuration for authentication, repositories,and other information to customize the behavior of Maven. Sample settings file is:

Summary

In this article we saw basic overview about Apache Maven, its installation and basic configuration.The next article would deal with creating a simple Java project using Maven. I would write the series of tutorials on Apache Maven and how to use Apache Maven in your projects. If you have any questions, please post it in the comments section. If you are interested in receiving the future articles on Java topics, please subscribe here.

Related posts:

Comments are closed.