521 likes | 800 Views
This presentation on the Maven tutorial will help you understand everything essential to learn regarding Maven. The video will introduce to the basics of Maven, and why do we need to use Maven. The tutorial will help you understand some core concepts of Maven. Then we shall see the working of Maven Architecture and the Maven life cycle. Towards the end, we shall see a hands-on demo showing Maven's applicability. Now, let's get started.<br><br>The topics covered in the presentation are:<br>Why do we use Maven?<br>What is Maven?<br>Maven Repository<br>Basic Concepts of Maven<br>Maven Architecture<br>Maven Life Cycle<br>Advantages of Maven<br>Demo<br><br><br>Simplilearn's DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. Youu2019ll become en expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.<br><br>Why learn DevOps? <br>Simplilearnu2019s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands on and interactive approach. The Devops training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.<br><br>After completing the DevOps training course you will achieve hands on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:<br>An understanding of DevOps and the modern DevOps toolsets<br>The ability to automate all aspects of a modern code delivery and deployment pipeline using:<br>1. Source code management tools<br>2. Build tools<br>3. Test automation tools<br>4. Containerization through Docker<br>5. Configuration management tools<br>6. Monitoring tools<br><br>ud83dudc49Learn more at: https://bit.ly/2ytbV4J
E N D
Why do we use Maven ? Maven is chiefly used for Java-based projects. The tool helps in building the code downloading dependencies, The tool is used to build and manage any Java-based project. It simplifies the day to day work of Java Developers and helps them in their projects
Why do we use Maven ? Maven helps in getting the right JAR files for each project as there may be different versions of separate packages. To download dependencies it is no more needed to visit the official website of each software. It could now be easily done now by visiting “mvnrepository.com”
What Is Maven? • Maven is a popular open-source build tool developed by the Apache Group to build, publish, and deploy several projects at once • Maven is written in Java and is used to build projects written in C#, Scala, Ruby, etc. • The tool is used to build and manage any Java-based project. It simplifies the day to day work of Java Developers and helps them in their projects
What Is Maven? • Maven is a popular open-source build tool developed by the Apache Group to build, publish, and deploy several projects at once • Maven is written in Java and is used to build projects written in C#, Scala, Ruby, etc • The tool is used to build and manage any Java-based project. It simplifies the day to day work of Java Developers and helps them in their projects
What Is Maven? • Maven is a popular open-source build tool developed by the Apache Group to build, publish, and deploy several projects at once • Maven is written in Java and is used to build projects written in C#, Scala, Ruby, etc. • The tool is used to build and manage any Java-based project. It simplifies the day to day work of Java Developers and helps them in their projects
What Is Maven? • Maven is based on Project Object Model (POM) and focuses of simplification and standardization of the building process • In the process, it takes care of the following: • Builds • Dependencies • Reports • Distribution • Releases • Mailing list
Maven Repository a • Maven repositories refer to the directories of packaged JAR files that contain metadata. The metadata refers to the POM files relevant to each project. This metadata is what allows Maven to download dependencies • There are three types of repositories: • Local Repository • Remote Repository • Central Repository
Local Repository Central Repository Remote Repository Your PC Any server Internet
Local Repository Central Repository Remote Repository Local Repository refers to the machine of the developer where all the project material is saved. This repository contains all the dependency jars Your PC Any server Internet
Local Repository Central Repository The Remote Repository refers to the repository present on a web server which is used when Maven needs to download dependencies. This repository works same as the Central Repository. Whenever anything is needed from Remote Repository it is first downloaded to the Local Repository ad then it is used Remote Repository Your PC Any server Internet
Local Repository Central Repository Remote Repository Central Repository refers to the Maven community that comes into action when there is a need of dependencies, and those dependencies cannot be found in the Local Repository. Maven downloads the dependencies from here in the Local Repository whenever needed Your PC Any server Internet
Basic concepts of Maven Project Object Model (POM) • Project Object Model (POM) refers to the XML files that have all the information regarding project and configuration details • It has the description of the project, details regarding the versioning and configuration management of the project • The XML file is in the project home directory. Maven searches for the POM in the current directory when any task is to be executed
Basic concepts of Maven Project Object Model (POM) • Project Object Model (POM) refers to the XML files that have all the information regarding project and configuration details • It has the description of the project, details regarding the versioning and configuration management of the project • The XML file is in the project home directory. Maven searches for the POM in the current directory when any task is to be executed
Basic concepts of Maven Project Object Model (POM) • Project Object Model (POM) refers to the XML files that have all the information regarding project and configuration details • It has the description of the project, details regarding the versioning and configuration management of the project • The XML file is in the project home directory. Maven searches for the POM in the current directory when any task is to be executed
Basic concepts of Maven Dependencies and Repositories • Dependencies refer to the Java libraries that are needed for the project. Repositories refer to the directories of packaged JAR files • If the dependencies are not present in your local repository, then Maven downloads them from a central repository and stores them in the local repository
Basic concepts of Maven Dependencies and Repositories • Dependencies refer to the Java libraries that are needed for the project. Repositories refer to the directories of packaged JAR files • If the dependencies are not present in your local repository, then Maven downloads them from a central repository and stores them in the local repository
Basic concepts of Maven v Build Life Cycles, Phases and Goals • Build Life Cycles consist of a sequence of build phases, and each build phase consists of a sequence of goals • Each goal is responsible for a particular task • When a phase is run all the goals related to that phase and its plugins are also compiled
Basic concepts of Maven v Build Life Cycles, Phases and Goals • Build Life Cycles consist of a sequence of build phases, and each build phase consists of a sequence of goals • Each goal is responsible for a particular task • When a phase is run all the goals related to that phase and its plugins are also compiled
Basic concepts of Maven v Build Life Cycles, Phases and Goals • Build Life Cycles consist of a sequence of build phases, and each build phase consists of a sequence of goals • Each goal is responsible for a particular task • When a phase is run all the goals related to that phase and its plugins are also compiled
Basic concepts of Maven • Build Profiles refer to the set of configuration values, that are required to build a project using different configurations • Different build profiles are added to the POM files when enabling different builds • A build profile helps in customizing build for different environments Build Profiles
Basic concepts of Maven • Build Profiles refer to the set of configuration values, that are required to build a project using different configurations • Different build profiles are added to the POM files when enabling different builds • A build profile helps in customizing build for different environments Build Profiles
Basic concepts of Maven • Build Profiles refer to the set of configuration values, that are required to build a project using different configurations • Different build profiles are added to the POM files when enabling different builds • A build profile helps in customizing build for different environments Build Profiles
Basic concepts of Maven • Maven Plugin refers to the group of goals. These goals may or may not be of the same phase • The plugins are used to perform specific goal • Maven has its own standard plugins that can be used. If wanted, we can also implement our own in Java Build Plugins
Basic concepts of Maven • Maven Plugin refers to the group of goals. These goals may or may not be of the same phase • The plugins are used to perform specific goal • Maven has its own standard plugins that can be used. If wanted, we can also implement our own in Java Build Plugins
Basic concepts of Maven • Maven Plugin refers to the group of goals. These goals may or may not be of the same phase • The plugins are used to perform specific goal • Maven has its own standard plugins that can be used. If wanted, we can also implement our own in Java Build Plugins
Maven Architecture Pom File Maven Repository Dependencies Read pom.xml Plugins Maven Life cycles Phases and Goals Build profiles
Maven Architecture Pom File How does it work: • Read pom.xml file • Download dependencies defined in pom.xml into local repository from central repository • Create and generate a report according to the requirements, and execute life-cycles, phases, goals, plugins etc. Maven Repository Dependencies Read pom.xml Plugins Maven Life cycles Phases and Goals Build profiles
Maven Build Life Cycle • Maven life cycle is a collection of steps that are to be followed to build a project • There are three built-in build life cycles: • Default: handles project deployment • Clean: handles project cleaning • Site: handles the creation of project site’s documentation
Compile Maven Build Lifecyle Test-compile Test • Maven lifecycle is a collection of steps that are to be followed to build a project • There are three built-in build lifecycles: • Default: handles project deployment • Clean: handles project cleaning • Site: handles the creation of project site’s documentation Package The Build Life Cycle has different build phases or stages: Integration-test Verify Install Deploy
Advantages of Maven • Apache Maven helps manage all the processes, such as building, documentation, releasing, and distribution in project management • The tool simplifies the process of project building. It increases the performance of the project and the building process • The task of downloading Jar files and other dependencies is done automatically
Advantages of Maven • Apache Maven helps manage all the processes, such as building, documentation, releasing, and distribution in project management • The tool simplifies the process of project building. It increases the performance of the project and the building process • The task of downloading Jar files and other dependencies is done automatically
Advantages of Maven • Apache Maven helps manage all the processes, such as building, documentation, releasing, and distribution in project management • The tool simplifies the process of project building. It increases the performance of the project and the building process • The task of downloading Jar files and other dependencies is done automatically
Advantages of Maven • Maven provides easy access to all the required information • Maven makes it easy for the developer to build a project in different environments without worrying about the dependencies, processes, etc. • In Maven, it is easy to add new dependencies, you must write the dependency code in the pom file
Advantages of Maven • Maven provides easy access to all the required information • Maven makes it easy for the developer to build a project in different environments without worrying about the dependencies, processes, etc. • In Maven, it is easy to add new dependencies, you must write the dependency code in the pom file
Advantages of Maven • Maven provides easy access to all the required information • Maven makes it easy for the developer to build a project in different environments without worrying about the dependencies, processes, etc. • In Maven, it is easy to add new dependencies, you must write the dependency code in the pom file