Maven for DevOps Engineers | AR Shankar | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Maven for DevOps Engineers

teacher avatar AR Shankar

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

34 Lessons (2h 38m)
    • 1. L0 MAVEN Maven Introduction

      1:10
    • 2. L1 MAVEN Topics covered in this course

      2:48
    • 3. L2 MAVEN What is Maven

      4:37
    • 4. L3 MAVEN How maven helps to DevOps Engineer

      2:02
    • 5. L5 MAVEN Setup Maven Environment

      1:12
    • 6. L6 MAVEN Java installation on Windows

      4:59
    • 7. L7 MAVEN Eclipse installation

      2:56
    • 8. L8 MAVEN Create 1st maven project

      3:49
    • 9. L9 MAVEN Maven Coordinates

      6:48
    • 10. L10 MAVEN Default directory structure

      2:44
    • 11. L11 MAVEN Steps involved to build a java project

      2:23
    • 12. L12 MAVEN Maven Goals

      5:41
    • 13. L13 MAVEN Maven Goals in Action

      7:21
    • 14. L14 MAVEN What is Pom

      4:55
    • 15. L15 MAVEN About This Section

      1:58
    • 16. L16 MAVEN Maven Repositories

      6:03
    • 17. L17 MAVEN Deploy goal for local repository

      3:23
    • 18. L18 MAVEN Push Maven project onto Github

      8:23
    • 19. L19 MAVEN Create a EC2 Instance

      3:45
    • 20. L20 MAVEN Prerequisites to setup Maven

      5:04
    • 21. L21 MAVEN Setup Maven

      3:34
    • 22. L22 MAVEN Build maven project on Linux

      10:17
    • 23. L23 MAVEN Comman Maven Goals

      2:55
    • 24. L24 MAVEN Create a Project with Maven archetype

      6:04
    • 25. L25 MAVEN Plugins and Dependencies in pom

      8:54
    • 26. L26 MAVEN Settings

      2:33
    • 27. L27 MAVEN Tomcat Server configurations

      4:46
    • 28. L28 MAVEN Deploy war on tomcat server

      9:38
    • 29. L29 MAVEN Maven in DevOps Workflow

      0:45
    • 30. L30 MAVEN Jenkins Installation full

      6:50
    • 31. L31 MAVEN Add Maven build server as a salve to Jenkins

      6:45
    • 32. L32 MAVEN Build jenkins job on slave node

      7:24
    • 33. L33 MAVEN Build a war file on Maven build server

      4:18
    • 34. L34 MAVEN DevOps engineer career path

      1:39
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

37

Students

--

Projects

About This Class

There are many courses about maven which talk about the activities of a developer on Maven.

This course more talks about how to use Maven as a DevOps Engineer.

You will be learning

How a Developer use Maven

Activates of a DevOps Engineer on Maven

Build projects on Maven

Setup and Integration of Maven with Jenkins.

Meet Your Teacher

Teacher Profile Image

AR Shankar

Teacher

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. L0 MAVEN Maven Introduction: Magnesium or not the word you used to build automation tool for Java projects. That's the reason there are many courses which talks about Marvin as a developer, paint off for you. Apart from developer, DevOps in the unit also use Marvin, but there is no clear information about what kind of activity C, a DevOps engineer can take it off. Well, using Marin that motivates me to create this madman course. Welcome to my new course, Marvin for DevOps engineers. In this course I'm going to talk about Marvin as a DevOps engineer point of view. By enrolling to this course, you are going to learn how we are dollar per use mapping activities of your DevOps engineer, our Marin, nothing but what kind of activities he can take it, building Java projects using Marin. And also you are going to learn how to set up Marin and integrating mapping method Jenkins hope these concepts help you to use Marvin efficiently in your DevOps workflow. In next lecture, we are going to see concepts which do we cover as part of this trend. And thanks for watching, and I'm excited to see you in the course. 2. L1 MAVEN Topics covered in this course: Hello folks. In this lecture we are going to see what adult topics do we cover as part of this training. First one is introduction section. Here we are going to see what is Marvin and how mapping helps to your DevOps in it and the resources. What do we need to follow these quotes? In next section, we are going to prepare Marvin in weldment on Windows. Here we are going to see installation of Java and installation of Eclipse. And we are not going to install Marvin over here way because whenever we install Eclipse where default, my van comes. Next, we are going to seek create your first American project. And the Maven Coordinates default directory structure of your Maven project, steps involved in building your Java project. Next, Marvin goals under Class 2 building first Maven project. In next section we are going to talk about Marvin goals and the repositories. Here we talk about palm dot xml, trans to Dependency Map and repositories and pushing Marvin project onto GitHub. In next section we are going to deal Marin on Linux. Here we need your Linux system for that. I'm going to use AWS Cloud. So preparing him Marvin server. Next setup Mac and on Linux. Building Marvin project on Linux commonly used them having goals. Creating your project with Maren architect next to settings.py XML under class 2, deploying an application on Tomcat server. Whatever application we build over here that we are willing to deploy an Tomcat server. In next section, we're going to see magnum DevOps workflow. In this section, we are going to see how we can use mapping in continuous integration. Here we need it Jenkins server. So I'm going to set up Jenkins server again on AWS Cloud. Then we will add Marvin server as Asian to the Jenkins and building a Java project on agent, nothing but unmanned server. In this section we are going to see DevOps learning path under some additional resources. What courses you can learn, uh, next, as part of your DevOps journey and bonus lecture about coupon courts have our other courses and creating an AWS account to which you don't know while doing this course, you may come here and check out how to create an AWS account, install Git Bash, installed mobile x term, and install Tomcat. These installations are needed to practice this course, but most of the people already setup this. That's the reason instead of adding in-between. Now Farber course, I kept it as a separate section. So if you are really not aware of this, you can come over here and check out, alright, that's all for this lecture. See you in the next lecture. 3. L2 MAVEN What is Maven: Hello folks, thanks for enrolling for my course faster. Let's start with what is mapping. Before giving you a generic definition about Marvin, let's see what is Mab an official definition? Mapping is a software project management and competence in tool based on the concept of Project Object Model, p wm. Our palm man can manage your project build reporting under documentation from your central piece of information. Overall, it is going to take a concept of POME, our Project Object Model, and it helps us to manage project, to build reporting under documentation from your central piece of definition. Before understanding more deeply about this definition, let's go on to understand what your dollar per does doing the regular basis so that we can comfort a conclusion that how Marvin helps to your dollar per, which eventually becomes our definition. Let's go and see what are the day-to-day activities of your typical developer. I help collector quite common day-to-day activities of your dollar, but that is usually they start writing the code in his favorite IDE, then compile the code locally, tested. Once it is textured, then he created a package and deploy it in your local applications or in case if he has a local application server, just to, to validate the code is working on his local system. Once that is done, you will be pushing the working code onto the source code repository, our source code management. This is the quite common activities. What he do. But the challenge over here is while writing his application code are while working on the project, it is quite common behavior that we use some third-party libraries or packages. So whenever we want to compile, test, and create a package, we need to make sure that all the relevant packages are available to build our code. Otherwise it doesn't work right? So as a dollar per, i need to manually download all the packages which are required to run my application. Let's assume that I have downloaded and I compiled it and it's working fine and I can able to deploy it. But the problem here is in the last step again, I cannot push the R packages into the source code repository, write the name itself. It is saying that source code management, like GitHub or Bitbucket, it maintains only source code. We don't push all the third party libraries, okay, now some other one to compile it and deploy it into some other systems. How does it possible? It is difficult, right? Let's assume that you have given the EU or packages as well as part of your source code, go okay, the other party are, other team members are even I can sit there watching it, could able to build it and he deployed it. After some period of time, you started developing few other features where you need to pull the, again, latest celebrities are third-party packages into your application. Again, it became a problem that you need to download the latest packages onto your local system while doing testing. Also, you need to provide the same packages to the pupil, whoever using these code, it is quite a difficult problem, right? Instead of that one, how it will be if I give you a single file which tells about that what is the packages are required, are, what are the libraries are required to run this application and at that file itself can able to identify under downloaded those packages. Yes. That is where man comes into the picture. So Marvin can able to download all the third-party libraries which are required for your application. And it also do the compilation taste and even deployment of the applications. Not only that one, if there is any updates in the third-party libraries are packages which you are using, then you just need to update that file. It automatically downloads whenever you are compiling or testing your code. It's good, right? So Mab and can help us that building our application with the all the required packages with minimal efforts. Sharing only source code for the community are people who ever want to use your application along with other file which mentions that what libraries does it required? That file we call Desert palm dot xml. Anyway, we are going to talk about palm dot xml more detail in the later sessions. For now. Yes, ma'am. And can help it dollar per to build, deploy, test his code efficiently. Now, you may ask that how does it work in the DevOps engineer level that we are going to discuss in the next lecture. Thanks for watching and see you there. 4. L3 MAVEN How maven helps to DevOps Engineer: In previous lecture, we were talking about mapping how it will be useful at the dollar per level. It helps him that compile the code, downloading all the dependencies and building the code, and even packaging the code. But how does it work at the DevOps engineer level? Now let's see that once dollar per is tested his code and if it is working when obviously you need to check in his quote into the source code management. In this example, just consider that a good piazza source code management. Once it is pushed. As a DevOps engineer, again, you need to take that code and we need to build the artifacts out of your trade. Artifacts, nothing but the outcome of the source code. So whenever you are doing that, even you need to know that what Amdahl dependencies does it required? Once you have taken those dependencies, you need to build it. Once you build it, you need to run unit test cases. Once that is done, you may use it as your deployment as well. Then who will do all the stuff? That is where Marvin comes into the picture. So mapping helps even at DevOps environment level, to download the dependencies, build the unit, test, and deploy the applications. So anyway, we are going to see how we are going to use Maren at the dollar per level and also DevOps engineer level. Whenever we are working at a developer level, I'm going to use Marvin with the eclipse. So we will be installing Eclipse in our local system in the sense I am going to install on my laptop. And we'll start writing some Java applications. Don't worry, I'm not going to read any complicated code. We can get the sum templates. I'm using those templates and we'll see how your developer is going to use the marvin then with the help of that one as a DevOps engineer, what we can do at the DevOps environment level. I'll read that cell for this lecture. In next lecture I'm going to talk about what resources do you need and where do you get help if you struck up some there. Thanks for watching and see you there. 5. L5 MAVEN Setup Maven Environment: Hello folks. In this section we are going to see how to prepare Marvin in weldment on Windows. We have already seen what topics do we cover over here. But to let see, why do we need each of these topic. First, we are going to install Java. Then install Eclipse. Eclipse is one of the widely used id tool for Java. That's the reason we are using Eclipse so that we can feel how the developers can create the Magen projects. Then by using Eclipse, we are going to create our first Maven project. Don't worry, we don't require any coding skills. There are some pre-defined templates, those we are going to use it then mapping coordinates while building our Maven project, it asks for some coordinates. We are trying to understand what are those coordinates. Then default directory structure. Whenever we create a Maven project, how does it looks like? Then steps involved in the building your Java project. Like how do we compile, test to build and deploy to build our project? We should know about Marvin goals. Here we are going to talk about Marvin goals. At last, we are going to build our first Maven project. These are the concepts we are going to cover in this section. So let's jump into next lecture to install Java. 6. L6 MAVEN Java installation on Windows: Hello folks, welcome back. In this lecture we are going to see how to install Java. As we discussed, we need to Eclipse and Mammon to proceed with our course. But without Java, it is not possible to execute. Our Marvin commands are even Eclipse. So we are going to install Java on our Windows system. To install Java, first, we need to download Java packages. For that. Just such a Java JDK download, which will take us to the article.com website. And here we can download our Java SE Packages. Click on the first link. Here we can see the latest version of Java or the time of recording this video. We have Java SE 15. Now we should download it for Windows read, we need to go to Oracle JDK download page to download it for Windows. So click over here and if we scroll down here, we have Java packages for different operating systems. We are going to choose Windows 64-bit because my operating system is Windows 10 at this moment. Let's download it. While downloading, we should accept the license agreement. So click on this checkbox to download the JDK packages. It to take say well to get it downloaded, we'll wait until it gets download. Alright, download has been successfully completed. Let's open this one in the folder and start installing the Java. So this is the packages which we just downloaded. Let's double-click on this one to install it, you should have admin privileges to install this Java packages. I'm already admin on these accounts, So there is no issue, I meant to say on this system. Alright, so this is the welcome, deserted to setup our Java. Let's go. Nothing to change over here. In this space, we can change the Java installation path. By default it is picking up C drive Program Files, Java. Let it be in the same location. If you wish to chain, you can choose the option. I'll read our setup of java has been completed successfully. Let's close it. Once the installation is completed, you can see the Java packages under C drive, Program Files. Java. This is where Java installation has been done. And if you click on this one, you can see the bin calm and a few other directories. Now we need to set up our Java environment variables to make it work across the system. For that, we should go to this PC properties directly. We can right-click on this PC and go to properties and advanced system settings and environment variables to come over here we have another method that is just such a control panel and System and Security, didn't systems. This is also brings us into the same place. Either way we can come over here and go to at once the system settings, environment variables. This is where we need to setup system variables. Whenever we set up system variables, this particular application will be accessible across the system with respect to or whatever he was a reward. So we are going to setup over here to setup first we need to update the path of our Java. I meant to say where it has been installed. So edit the path and we need to copy the location where we have installed a Java. If you remember, this is where we have installed, but to set up path, we need to do that as well. So I'm going in Serbian till here, I'm copying. So add new pop and pecan. Okay. We need to set up one more environment variable that is Java and Oscar home. For that, we need to create a new system variable. So click on New Java, underscore home under the path of Java where it has been installed. This term we need not to do the bin because it is still JDK level. Okay? I don't know. Okay. That's it. I can say we have configured our system variables to validate it whether it is working prime are not. Just go to command prompt, execute java was shunned command. You can see here the Java version script.js No.2 has been installed. It is working well and one more command we can execute is Java C. Java see nothing but compilation of the Java application. We haven't provided any application. So it is giving that you need to include few more parameters. In a way, it is saying that our Java installation has been successful and working fine. In next video, we are going to see how to install Eclipse. Thanks for watching and see you in the next video. 7. L7 MAVEN Eclipse installation: Hello folks, In previous lecture we have installed the Java. Now it's time to install Eclipse. For the people who doesn't know about Eclipse. Eclipse is one of the widely used an IUD tool for the Java developers. So they will write their code, compile it, and even deployed by using the Eclipse, there are multiple plug-ins. But in our case, I just want to show how the dollar per is going to work with the eclipse and how we can use mapping. That is the reason we are using Eclipse. So we need to download Eclipse for our system. So go to the Download button. And at the time of recording this video, we have 20 2012 version of Eclipse IDEs available. Again, click on Download button, which will take some student next phase. Yep. From here we can download the eclipse executable files. Let's download it. It takes a while to get you to download, will wait until it get completes. All read about eclipse download has been successfully completed. Now let me open where it has been downloaded. And to install Eclipse, just to double-click on this one. Of course, we have already installed the Java, so the installation process, it should be smooth. So this is the first time wizard. Well, installing Eclipse, we can choose four of each application we are going to install Eclipse. In our case, we are using it for Java dollar per share. So let's click on the first option itself in the cluster wizard, it looks for the Java, so we have already installed Java. It is picking up the Java installation path, nothing to change over here. And also it is installing the eclipse under Users directory that is waxy. And this is the path. Now let's proceed with the installation. Installation has been completed successfully. Now let's launch it. Now. It is looking for the workspace where it can store the projects which we create an Eclipse ID. This is the default location, but I don't want to create a under a different location. Let me create the new folder. So I'm creating a new folder and I will name it as IT projects. And choose this folder. I'll read from now onwards, all the projects which we create an eclipse will be stored over here. And let's launch it. This is the default welcome because either we can close it or minimize it. So let me minimize it. And this is where we can minimize. And we can create a new Java project by choosing this option R else File New, and we can create the projects. Anyway, we are going to see how we can create new projects in our next lecture. Thanks for watching and see you in the next video. 8. L8 MAVEN Create 1st maven project: So far we have seen how to install Java and Eclipse. Now it's time to create our foster Maven project. Before that, let's understand how these console looks. So there are various options over here and the disease Package Explorer, nothing but once we help create our projects, we can see the list of the projects over here. We can explore the content of the huge pack is at each project. And here, whenever we work on any file, that file get opens over here and here, is there any bugs in the code, the output of the code, whenever we execute that program, we can see that. Now you should see the Package Explorer. There are few options where we can create different kind of projects. But in our case, we need to create a Maven project rate for the two we should go into the File New. And here we need to choose the project, but there are various options we couldn't able to find the Maren option so far that we can go to others. Here, we can search for Marvin. That is, they are mere VN, sorry. So Marvin project, if I select the Manhattan Project and click Next, okay, In this result, we can able to choose the workspace location. If you remember, we have 2s and a workspace as under users where luck See, then projects, right? So that is the default workspace location. If you wish to change that one, we can choose by choosing the browser and we can change. But at this moment, let it be in the same location. So I'm just canceling it. And the next one is here. Create a simple project. In case if you are good at developing your Java application, maybe you can choose this option. Whenever you choose this option, just to create a directory structure. And you need to write your own programs. But I'm not your developer and I don't have that much skilled, so I'm skipping this level, which means that I'm going to use the archetypes selection. So if you choose this option, it is going to skip the archetype selection. If you don't select, it is going to display the archetypes. Now, click on Next. Here we can see we stop the archetypes. Whatever is available or not is propagating. Yeah. Here you can see list off the architects. But what is archetype? If you search in the Google same thing. So I'll just search it for what is archetype and Marvin. And if you click architect in shot, archetype is a Maven project or Template Toolkit, which means that it is like a template which comes with the default directory structure as well as some default application. With that application, we can do our changes. It is like here's some example projects kind of thing. So in our case in eBay, we need that. That is the reason we are going with the archetype. If you need more information, please go through this document and here, there is a way out of the reject command how we can create architect through the command line. I'm just going to pass this one until we are working with Marvin on Linux systems. There we are going to execute it, but go back. And here we are going to select a map in, Okay, Madeline, archetype and Quickstart. Here I'm selecting the map and archetype Quickstart artifact ID and group IDs are two dot, apache dot Marvin, archetypes and Watson is one dot-dot-dot or the time of recording this video, the Watson off the archetype is one dot for click Next. In this result, we need to provide Marvin coordinates. So here we should provide group or the artifact ID and version. Before providing this information, we need to see how others are using that we are going to discuss in our next lecture. Thanks for watching and see you there. 9. L9 MAVEN Maven Coordinates: We are still in the process of creating our foster Maven project. Here it is asking for some information that these group ID, artifact ID Watson unpack this information, we call it as a Maven Coordinates. Let's see what Mab and coordinates and how to use these information are, how to provide this information. I just searched for Marvin coordinates. The first link is talking about palm references. Still we haven't to discuss the boat palm dot XML file, but let's go and see what mapping coordinates information is provided over here. And if you see Maven Coordinates, and if I click over here, Just ignore about the pump for now, but we can see what they're talking about. Group od helps us to different set E We're project from the other projects. Okay, that is, this is generally unique among us to an organization Aria project. It will be default. Usually group ID is provided the company you are L in the reverse format. So here you can see here ahrq dot apache dot Marvin, which means that the reverse of the URL up this one, okay, that is how usually we do the group AD, but it is not mandatory that we should provide our group ID like this. It can be without the URL up the company still, that can be possible. Next one is artifact ID artefact to Eddie is like your name off your package. Once we have generated the artifact out of our code, then what is the name we should do? That is artifact. Artifact ID should be unique in our project, okay, you should not use the same artifact ID, but group ID can be same in the all the projects which are dollar per by the same organization. Next version, whenever we are updating our code, keep on changing the Watson's read. Whenever we released the new features, then we are going to use the latest version. So that is how the group ID artifact ID and version works. Packaging is, so packaging nothing but it is usually structured like group id, colon, artifact ID and Watson it by default it takes like that. So that is how we can defend. So even if we go back to our Eclipse here, we need to provide our company name in the reverse format. I mean to say company website in the reverse format, I'm creating my company website in a nice demo company.com. That's the reason I help given this in the reverse format, that is, conduct a demo company next to artifact ID, I'm going to do the demo project, okay, we can name it as a anything Arles. First demo project. Okay? So this should be unique in case if somebody is already user demo company and if they are using this name, I cannot able to create it. So it should be Nick that the reason I'm using foster demo project next to the US version, usually what you can see without snapshot, okay, but if we are using Snapchat means it is not tested completely or it is not production ready application. So that is the indication it is going to do. If we add the Snapchat, if you don't need it, you can delete it. So you can able to use without snapshot, which means that it is like your production ready. But in our case, I'm not diluting. Let it be the snapshot Watson. Now if you see the package name by default, it to take in as it. Dot to demo company dot cost to demo. And we can do the version as well at the end of this project, but let it be the group ID and artifact ID for now. So this is how we can provide the Maven Coordinates information. And before moving to the next step, I'm going to show you some of the companies or organizations how they are using. I just searched for Mab and repo for Spring Boot. And if you see math and repositories and effect, click on this. And here. These are the packages are applications which are dollar probate Spring Boot organization and that they help given for these applications. They help given your group ID called Spring framework a boat. And if I take any application are packaged in this one, they will have the group ideas in common. Now let's go, go with the Spring Boot starter test. I'm just going inset this particular application or package having the multiple versions because they will be Coupon introducing the new features. So let's go with the latest torsion which released on February 2021. And if I click on this one, you can see here there is a code. You can see Marvin tab. And there is a code how you can use this particular package, our application in your application. So we need to take the group ID, artifact ID and version by using this information we can call these packages are applications in our project. Okay? And if you observe the group ID, you can see here that is ORG dot Spring Framework dot boot. Okay? This could be the URL of the company they have given in the reverse format and artifact I did there how named it? Isaiah Spring Boot starter test. Okay. Same artifact ID they have given under Watson. This is the version, okay, that is how they are going to provide and that this group either could be common for other packages as well. There is no change, but to the artifact ID keep on changing. Now if I go with to the another package and the here spring boot configuration processor, our Spring Boot auto configure. And here also there is a version called the 2.5th No.3. And here also group ID is same and washing ID there, how to lose the altogether they could be. And artifact ID has been changed. So if we wish to use this one, we need to use this information. We are going to talk about this code whenever we are discussing about palm dot xml. Now go back over here. That is how we help provided, even if I go back and wealth selecting other, other application are other artifacts in my application. You can see here, this is the arc dot apache dot Marvin dot architecture. This is the group ID they have given artifact ID and Washington. So with this information, I could able to select it because it is the eclipse, it automatically propagate if you are using Linux, are you, if you want to update on your own, you should provide this information manually, okay, that we are going to talk about in the later sessions for now, anyway, we have selected this one, go to the next. We help provided our mapping coordinates, R, group ID, artifact ID, and Washington. And let's finish to create the project. This is how we can create your map and project on eclipse. Are they a dollar per can create your project? That's all for this lecture. In next lecture we are going to see that directory structure, how it get created whenever we create a project by default. Thanks for watching and see you there. 10. L10 MAVEN Default directory structure: So far we have created our cost to demote project. If I go and explore what is the content is there inserted this project, you can see one SRC main Java SRC tests to Java JRE System Library. Maven dependencies is such that target bomb dot xml. Among this, we need to more concentrate on these two. That is, a certainly main Java SRC, DST Java, next Palm that XML, these three and the target usually should not get created are the time of creating our project, but we are using Eclipse by default, even this folder got created, okay, just ignored this one for time being. If we talk about a subsea main Java, this is the actual application code we need to write it. Anyway, we use with the default template. That is the reason we get year defend project, okay, there is a package called com dot demo company, first two demo project and the application called app.js. This has been by default it kin. And if I double-click on this one, the file get opened over here. This is the content of this file and it is just like you're printing Hello world. Okay? So that is about the application what we have created at this moment. Similar way, you associate test to Java, it contains the test cases. So whatever application we are writing u, if we would like to test that application is working fine art, then we should create the test cases as well, right? So even this is a default application, so we got to some default to test cases, that is AP test dot Java. Okay? This is the test case which we have got it. Alright, next one is palm dot xml. Nothing but Project Object Model, which tells about that what are the dependencies to run this project and also what is the outcome of the project and what is the name of the project? And washing all this information is stored over here. We have given our Maven Coordinates, Red Lake, group ID, artifact ID, and version. That information gets stored under palm dot XML. You can see here this is the group ID of this project and the artifact ID as well as the washing IT. Okay, apart from this, it has some other information which we are going to discuss in the letter plant up-time. But this is how the directory structure get created whenever we use the default archetype template, but usually dollar purse, right? All this application by creating the empty directory structure, we are not developers. We are just understanding how dollar per start working with the application. That is the reason I've just gone through with the archetype which will create your sample project. That's all for this lecture. In next lecture we are going to see how to build this project. Thanks for watching and see you there. 11. L11 MAVEN Steps involved to build a java project: So far we have created our first two Maven project and we understood the how the directory structure has been created. Now it's time to build our application. Before building this application, let's understand that what are the steps are involved in the build process. And if you see our application is app.js and app test.py is the test case name. Usually in the real term project, there will be more dark Java extinction files, as well as the test cases. Now to build any application, the fastest step we need to compile the source code, compiling source code, nothing but in our case, app.js file is there that we need to convert into the app dot class. Similar way we how AP test dot Java, that is also we should convert into the AP test dot class. So this is how we need to compile the source code. Once compilation is done, we need to run the test cases because we have created your test cases over here. In our case AP test dot class is the test case which we created. We need to run those test cases, an application that is Atlas. Once we run the test cases, we need to create the package out of it. That could be a JAR file, JAR file or a file. It could be anything. Once we have created a package, even by using Marvin, we can able to deploy this application on the target system, even though it is not your primary responsibility, we can still do that. And once again, the process involved is we are going to compel our source code like your application, as well as the test cases. Once this is done, we need to run our test cases on our code. If it is fine, then we are going to create a jar, JAR files. These are the steps involved to build our application. Now let's go back to our Eclipse. Now, I want to build this application. So to build this application is quite simple. That is selective or project. Go to right-click and run. Okay, while running, it is going to ask you that, What do you want me to do? It is a Maven project, so we need to choose the Marvin, Marvin buildings in case if you have already run the marvin built, you can go with this one. But if you want to change your goals, you can choose this option. Either way is fine for us because we haven't run any commands are we haven't to build these applications, so forth. So let's select the map and build. And here it is, asking for the goals. Now let's see what is goals in our next lecture. Thanks for watching and see you there. 12. L12 MAVEN Maven Goals: We are at to build our foster Maven project. For that, we need Mammon goals, but we don't know what and how goals are there. We can go and check it out What and I'll goals are there. But they usually mapping goals are defined in the build lifecycle FODMAP. If I go and search for marvin build lifecycle, you can see the first link is talking about the introduction to the bill relate cycle, map and goals upset in the build delight cycle format. So we need to choose the right goals to build our project. If you want to understand that, build a lifecycle, it's just like our goals are divided into the three different bill life-cycles. One nice default, another one is clean, and another one is site. So there are three built-in build lifecycles. The default, clean and cite. Some of the important goals are displayed over here. And if you want to see what are the goals are available in each builder lifecycle are each phase. You can click on this lifecycle reference. Let me open in a new window. And if you go here, you can see lifecycle references. This is the clean lifecycle. This is the default lifecycle. And another one is site lifecycle. Okay, I'm just going to discuss about some of the important are quite commonly used goals among these lifecycles. Let's go and have your Luke of those. So these are quite commonly are important goals which we use in math when there is clean, okay, this is the goal which helps us to remove all the files are generated by the previous build. Let's assume that we are building the same code again and again in case if we want to delete all the files which are generated by the previous build, then we need to use the clean goal. Next to validate. Validate the project is correct and unnecessary information is available. It's something like that. Before building up, before compiling it, whether it contains the other information or not, it is going to display over here. Next to compel, we are going to compile the source code. It is going to compel only source code, the test code. To compile the test code, we have that test compile. So in case if we want to compare that test code, we need to use this cool next test to test to the source code whatever test cases we have written for this application, those are tested in the test phase, are tested goal. Next one is pack is it takes the compiled code and package it into its distributor format such as job. So to take the code and it is going to package it next to verify, run any checks to verify the package is valued and amidst the quality criteria, whatever packets we generated over here, it is going to verify that one. Next to install, install the package into the local repository. We talk about local repository when we are working with Marvin on Linux system. But for now just to think that it is going to store this output, our JAR file, in some local repository and for use as a dependency in the other projects locally, in our local system. If we are creating any new project there you want to use the current project, then it will be useful next to deploy copies. The final package to the remote repository for sharing with the other projects are other dollar pots. Okay, so remote repository under local repository and it will be are going to discuss over there. It is nothing but a centralized repository where we can store our files so that other projects or other people want to use it, they can use it. Even we have taken this archetype red, that is from the central repository. So somebody has created, we are just using it. That's how Marvin goals helps us. Next thing is Mab and goals are executed in the sequential format, which means that in your lifecycle, if we have the multiple goals, if we are going with the higher level of golden, previous goals are automatically executor. Getting confused, let me go back to the page again. So here if you see clean lifecycle bit, if I use the clean option, then the previous goals, whatever is there in this phase get automatically executed, which means that pre-cleaning automatically executed, then it will go to the clean. If I want to execute the complete clean lifecycle, then I can use the post clean as well. Okay, similar with default lifecycle. In default lifecycle, if I execute this one, it is going to execute only validate. If I execute the compile all the previous goals, whatever is there, validate, initialize, undermining all the goals are executed till compel goal. And if I want to execute all the goals within this phase, that is default phase, then I can execute just here deployed in these CPUs, the clean. And in this, if I use the deploy, it means that I'm using the, these two goods as well as all these goals, okay, that is how it works. Next, the site lifecycle, usually we don't use this one. This is for the documentation purpose. In case if we want to create some documentation about our project, we use the site lifecycle. Okay? This is not widely used, so we just ignore it. We are going to deal with these two phases. Under these two phases in clean fails again, we're going to use the just to clean options. Then here we are going to use different ways like in case if we want to just compile the code, we can use the compiled in case if we want to test to the company, then all these goals are executed, nothing but compilation up the source code also get executor compilation of the disk, but also get executed. If I use the clean package, it compiles it and it creates the package. If I use install, it is going to compile it. It would do the testing and introduce the packaging, and it also install it in our local repository. That's how it works. Anyway, we are going to see these important goals by executing on our project. That's all for this lecture. And see you in the next lecture. 13. L13 MAVEN Maven Goals in Action: We have discussed some of the important goals which needed to execute our Maven project right? Now, it's time to build our application. Let's go and see what goals we can execute as part of this. Okay, so clean lifecycle. So far we haven't run this application, so there is no pint of executing the clean, let it be next to thing is in default phase we can execute any of these goals. We can go with the the compel, nothing but we are compiling the court RLC even we can go with the Validate. Let's go with the validate and we'll see what does it do. So I'm just copying this goal to our, to the typo, valued it and run it whenever we are running, what does you to do? It is going to create the console file and you can see that it has been executed and building successful. It's just a scan and this is the project it is going to scan and it has the other information, nothing but this is the package name and we are going to create a jar out of it. Okay, How does it identify? We are going to talk about that in your work and there is some warning we can just ignore because it could be due to what shun are I have installed on my laptop. Okay. Which means that validate phases successfully completed. It's fine to execute our application. Now let's run this project again. This time we are going to compile it. So Run As and if I choose this option, again, it is going to execute the previous goal. I don't want to execute the same goal again, I want to change my goal. In that case, you can go with a map and build in three dots. Now let's execute the goal with the company. Before executing with the completion, Let's go to our directory where we have created this project and we'll see what changes we can observe over there. So I'm just going to open this, that these relax user. So this is the directory. I'm just going to minimize it. So you can see here, this is the customer demo project. And if I open here, this is the content. What is there over here? And there is a target directory. This is where all our class, our test cases compared one, nothing but what is the outcome of our app.js? App.js is stored over here, okay, enabled by default what happens in the eclipse? It is automatically compile the code and it stores the information. That is the reason you can see the AP test two dot class file is there already, okay, but usually it should not be there, okay, this target to directly get updated only once we compile the code. So now what I will do, I'm going to compile this code and we can see the, this dead get updated. Okay, let me open it again and let me show you the date and time. So it is showing you that 85 and it should get updated once we compile our code. So let's go back to our goals again. So the stem, I'm taking the campaign goal, go back to Eclipse. And q, the campaign goal. And that are made. And at this time the compilation should be successful. You can see here it's just successfully completed. And if I go to Target or directory, I could able to see the content. But any way I can go to the Explorer and you can see the stem target directory, how All the data, okay, These classes are updated. I hope I will go in to the class file. You can see 90 clock, it has been updated, that is the current datetime. And if I go back to again, my target directory, apart from this few other directories also got created, even test cases also got creator. This is how we can compel the content. Now, again, we are going to use the one more goal that these tests to compel. So now we are going to execute the test compile. So test compile is, I'm just copying this one and go back to our Eclipse and go to project, run on a map and goals under the stem, I'm going to do the test compelled whenever I do test, going to validate it, compile it, and test it. Nothing but previous, all goals should get executed. Okay, Let's run this one. And if you see this is building successful, you can see default to test companies then, and if I go up, I could able to see the dilation as well. Default resource, your default compiled. So it compiled our code as well as it is also compiled our test compile. Okay, Both has done. Now let's see the another goal. That is we are going to test our code. Whenever we do the test, you should compile the source code as well as the test cases. Then it will do that test. Now again, I'm going back to our Eclipse. Right-click on the project and Hello, Math and build. And I'm going to the test. Okay. I'm going to the test. So we are testing the court and the well testing it. You should do the compilation of the source code as well as the test cases didn't need to do the testing. So you can see here it is doing the testing. These are the test cases. We have only one test case under that is successful. That is the reason building successful and be pike scroll down. You can see that default to test compile, it compelled the test cases as well as the source code as well. Okay, So this is how we to do, and this is the building successful under total time, how much time it took and when you've got finished. All this information is displayed over here. Next, we are going to execute the packages goal. And this term, whenever we are doing, we are going to use the clean lifecycle as well. Why? Because we have the information which is stored in the previous builds and all this information keep on updating, but I don't want to do Sometimes what happens if we don't use the clean? It is not going to take the latest code way because it thinks that okay, How the same files existing and it start compiling it. So it's a best practice to use the clean then you were default goal. So I'm going to use the clean, the stamp along with our package around as Marvin build. Clean along with our PAC is cool. Okay, so now what happens? It is going to clean the previous build files and it creates the new fails. Okay? So if I go up, you can see the goals, whatever is executer earlier, there was no exclusion of DePaul to clean. But this time clean goal has been executed. Then compile, test to resources and the test compile. And test is successful then. So it is doing the packaging. And you can see here it created a building your JAR file and the job file is stored over here. In this location. The JAR file has been stored, but so far I couldn't able to create the JAR file because we haven't used the package. Cool. Now we have use of the packets goal. That is the reason it created the package autopilot. And you can see the package location that is target in the target directory, its creator. And if I go here and go to targets, and you can see here, it created that foster demo project hyphen washing off the package. And this is the artifact ID, right? So artifact ID is used to while creating the outcome of our build. Okay, So now packets we have executor a class we can execute the install under deploy. But now it doesn't make sense until we discuss about the local and remote repository. We are going to execute these on the Linux system or the time we can see. So that's how we can use the goals while building our map in court. That's all for this lecture. See you in the next lecture. 14. L14 MAVEN What is Pom: In previous lecture we have seen different map and goals and how does it helps us to build the project? In this lecture, we are going to talk about found.ee dot XML. Let's see what Marvin is saying about Kwame dot xml. I just substitute for what is bom dot XML. Let's go to Mavien dot apache.org. And if you see the definition, what is palm dot xml, your project object model, our palm, the full form of palm is Project Object Model is the fundamental unit of work in math when it is an XML file that contains information about the project and configuration details user by mapping to build the project. It contains the default value of most projects, which means that it is telling a boda information what this project does do and what is the artifact ID and Washington and also configurations, some of the configurations which you need to do to execute this project. Then it also contains some default values which are required to run that project. That is how this palm dot xml helps us to build our project. Let's go to Palm dot xml and tried to understand what is the information it contents are. This moment, this palm dot xml we haven't written whenever we are creating our project by default, it got generated. And this content also came along with that one. If you remember, well, creating our project, we have provided this group ID artifact idea to watch and I rewrite it. So that is the information got updated over here. Apart from this, there is a one more field we required that is packaging. But if you don't specify any packaging parameter, then it will treat it as a job under that information also updated over here. Yes, you can see here default lifecycle jar packaging, which means that in case if we don't specify anything, it is going to treat it as a JAR file. Next name of the project that is fostered demo project, that is the name we have given and properties. What is the compiler we should use to build this project? That is one dot seven Maven Compiler. It is using. And the, another important field is dependencies. So in the dependencies, we need to specify what bundled packages does it require to build this project? In this case, we are calling JUnit packages with the group idea, artifact ID and diversion. Whenever we mentioned, these are the dependencies it will come and update in the Maven dependencies. Apart from J unit, you can see one more dependency which we will talk in the next lecture. But for now, the JUnit packages has been downloaded over here. Let's assume that if I remove this dependency, okay, I'm just deleting the interdependency and let me save this file. Okay, I just deleted the dependency and save this file. And you can see that dependency, I mean to say Mab independency tap got disappeared. Why means we haven't mentioned any dependencies in the palm dot xml. That's the reason it is disappeared. Let me add it back. And if I go and refresh it, sorry, I need to save this file. And we could able to see the Maven dependencies back again because which is required to test more efficiently what I'm going to do, let's assume that we are calling Spring Boot to dependencies. Let's assume that it requires some Spring Boot packages to run this application. If that is the case, we can add those as the dependencies. Let's call those. I'm searching as a map in Drupal for Spring Boot. And if I click on this one, okay, Spring Boot starter tests, let me take this 12 dot four dot three. And here you can see the code which they have specified over here is to update in the palm dot xml. Let me copy this snippet and will update as a dependency. Okay? So I have updated it as a dependency and save the file. Whenever we save, it creates a pull the packages which are there in this dependency and stored in the Maven dependencies. It may take your well and do let me refresh it. Now you can see because of adding this one, it has been downloaded lot of dependencies which is required, but we just mentioned springboard to startup.js threat, that is Spring Boot starter dot test 2 dot dot dot 3. But you can see lot of dependencies also get added without specifying under dependency tab that we are going to discuss in the next section. So let me delete it again from here to here. And let me save the file. And whatever extra packages we got, it should be disappeared. So that is how dependency will help us. That sulfur this lecture. In next lecture, we are going to see what is transduced dependencies. Thanks for watching. See you there. 15. L15 MAVEN About This Section: In previous lecture, we have seen how the palm dot xml does work. In this lecture, we are going to see what is the transitive dependency. If you see over here, we just added only j in interdependency, but you can see one more extra came as a dependency. Okay. I'll remove this one. Then. It is commented it out. That's the reason it is not throwing an error. That's okay, and let me save it. Alright. So here we are using the J unit. Apart from this, this is also taking the spec is this package we call digest transitive dependency. Nothing but to make use of this one, it is mandatory without this, you cannot able to use that one. And the same thing you can see over here, dependency hierarchy. If you click on this one, you can see here the J unit j in it also brings this package, okay, even though we don't specify it in our palm dot xml. Similar way, if I go to my dependency tab and if I add the code which we have added previously, you can see here this is the quadrate. Actually it should add only one pack is, but in the back-end it is adding so many files. Let me save this file. And you can see lot of files has been added apart from what we have requested. These files we call digit transitive dependency, apart from the one which we have mentioned over here. And the same you can find in the dependency hierarchy. You can see here we call this one, but it internally calls lot of packages which are there, okay, That is how transitive dependency does work. The transitive dependencies comes with the dependency jar, which we mentioned in the palm dot xml. Alright, now anyway, we are not using this one. Let me remove it. Once we have removed, again, it is going to disappear once we save the file. I can even use controllers, but just for visibility, I'm using File Save. Okay, that's all for this lecture. And see you in the next lecture. 16. L16 MAVEN Maven Repositories: Hello folks, welcome back. In this lecture we are going to talk about what is local repository and the remote repository. We were talking about this one when we were talking about a map and goals, right? That is a good show you over here, your winnable. We execute install, install the packages on to the local repository for use as a dependency in the other projects locally. Which means that there is a local repository in our system. So far we haven't discussed about it. Let's go and see. Whenever we run our mapping project for stem, it is going to create a local repository. By default, the local repository git created under the user's home directory, the data EOM do user's home directory, nothing but in my case I'm using your user called relaxin under the two dot m2 directory, it got created. Even I can go to this directory through the File Explorer. If I go here, again, I'm going back to the projects and the user under user home directory. There is a directory called M2. If I go into the repository and whenever we run any comments, it requests any dependencies it pulled from the internet and the stores in the local repository, nothing but this, we call it as a local repository. It will get updated whenever we are changing the packages which we need to run our project. This information, again gathered from the palm dot xml. Now let me show you how does it work. Let's assume that we have three developers and they are working on your project. Whenever they are working on the project that they might be using Eclipse and start building the projects whenever they build the project to foster time, it is going to create the ATM2 directory in the locally. And it pulls the required packages which are needed by that application from the remote repository, that is Mab and central repository we call, I will show you Marvin central repository URL. From there, it is going to pull the required packages, not all the packages, only required packages it pulls and stores in the local repository. That is the reason whenever we build any application faster, met take your well, why? Because it pulls the required packages from the Maven central repository and keep it in the local system. But subsequent attempts, it doesn't go to the central repository because packages are available in the local repository, the execution would be quicker. In some organizations, they will use their one more repository called the enterprise repository, which will be internal for the company whenever we create a new projects are libraries. Those libraries we can push it into the enterprise repository. So if we want to keep our files in the only data M2 directory, then we can use the install. So Marvin goals helps us to keep the packages or libraries which we have created under local repository, Arles in the enterprise repository, this is the central repository for Oliver employees. And usually companies use this one because to avoid those security incidents, Why? Because getting the packages from the enterprise repository rather than the central repository will be more secure. That's how the repositories does work. Now, let's go back and run. Yeah, Marvin goal to add our packages to the local repository and we'll see how does it work. So we should use install goal. It is going to add our packages to the local repository, right? If I go to File Explorer, so this is the yum repository. Here you can see com, I think it is already added to this repository. Let me go insert your demo project and foster Maven project. This is the one, right? And the snapshot, you can see our packages is already added weight because it is the eclipsed. By default, it might be taking whenever we do some changes in a way, if you want to get it done, we need to go to the Manhattan Project in our Eclipse and go to right-click run math and build. Here I'm going to go clean nothing but in case any files are generated by the previous build. Clean those files, let me execute to only clean and we'll see what happens. I'm just executing the clean goal. Okay. It has been executed successfully. And if I am correct, we could not able to see the target directory in our project. Let me go back. So I'm going back to my user. Under user, we help projects, right? So projects and custom demo project. And you can see there is no target directory or here, here it is showing because it is not updated. But anyway, if I refresh again, it gets created. Whenever we refresh it, build the project. That's the behavior of the eclipse. But anyway, we cannot able to see the targeted director because we have just two cleaned. Again, I'm executing my map and goal on my project that is running as and build clean install. Okay, whenever I do install, it automatically runs all these goals, whatever goals are there in the default lifecycle prior to the install, everything it is going to execute. So let's execute it. I'm just running. Okay, building successful. If I go up, you can see here it is executing all goals. Default to clean default resources and their default compile, default attests to resource like that. And the testing also it has done, once the testing is done, It's created a JAR file. You can see here, this is the JAR file it created default install. It should install in the local repository, right? So installing this one, it is taking the JAR file from this location and it is adding to see Dr. users will access DMT repository, okay, in this location it is adding. Alright, so that is what it is going to do the install that sulfur, this lecture, hopefully you got an idea how it works on the eclipse. In next section, we are going to see how to work with Marvin on Linux system. There we discuss some of the concepts which we haven't covered over here. Thanks for watching and see you there. 17. L17 MAVEN Deploy goal for local repository: Now it's time to execute the supply goal, but we don't have any central repository. So even though we try to execute that goal, it doesn't work. So if you go and see the what is deploying, deploying is nothing but a to copy our final packages and to the remote repository. So we don't have any remote repository, but at this moment we are getting all packages from the marvin central repository that we can check it out by using Maven repository URL. If you go, you can see here Maven repository repos Central. And if you go here, there is a URL that is republic dot.org. If we click on this, it will distort the ALA repositories. I mean to say all the packages are libraries which we can get it from the mapping. So even we were doing the JUnit, right? So if I search for J unit, you can see J unit is there. And again, if I go to J unit, there are questions we are using for dot hl7. Even apart from four dot hl7, we can use the some other versions as well. I can still use three dotted. Let me try to use the A3 dot-dot-dot and we'll see what happens. So it is not responding. Let me close it and reopen it quickly. We are just trying to reopen it. It is taking the default workspace location and the lunch it. Okay, now, what we are doing is we are going to update our configuration. That is bom dot xml. In palm dot XML, we are going to use JUnit instead of four dot 11. I'm going to use the dot-dot-dot. So even though the dependencies also get changed to the three dot-dot-dot instead of four dot 11. Let me save this file. And if I refresh, you can see here J Unit 3. But this time there is no dependency with the other packages. So if we go to dependency hierarchy, J unit alone can get downloaded and stored in that Marvin repository. That is how we can pull it. So in case if we try to access the package which is not there in the remote repository, Let's take an example that I'm, again, I'm willing to the palm dot xml, assume that the eight dot, sorry, three dot A2, which doesn't exist at all. So let me save this file. And you can see here you are misses, Okay, problems I think yours, if you see the errors, it will tell you that missing artifact, that JUnit. Why? Because if you go and check anywhere central repository, there is no such kind of package. We have three dot-dot-dot two, but not three dot a2. Okay? If the package is there in the central repository, then only we can able to use it. So the packages must be available in the central depository in case if you have you ever worn remote repository and if there is such kind of worship, maybe then you will get it. But most of the cases, these kinds of libraries are files. We are going to pull it from the mountains and told repository. So you should make sure that the existing repositories or library should be there, okay? Now again, I hope change it to a 100 and I think you should get updated, updated, and any VM keeping it back to our original one file. Save, That's it. Okay, So this is how we can work with to the repository is on our local system. That's all for this lecture. See you in the next lecture. 18. L18 MAVEN Push Maven project onto Github: So far we have created your first mapping project and it is working for him. Let's assume that I'm a dollar per, and I would like to do these core to the DevOps in it. Now it's time to push this code into the source code management are washed and control system so that if there is any changes I do for this code, it should not affect to the working poor. As well as I can share this one to the my DevOps in units so that he can able to deploy into the target environment. But I don't need to do all this. Dependency packages are some libraries which is required to build this project. Well, because that is already explained in my palm dot xml and I will give you the source code and the unit test cases. So if I do three, that would be sufficient for him to test our build the code again in his own environment. So to do this one, we need to push this code into the, what some control system. In our case, we are going to push it into the GitHub. Now I'm going to create a repository in GitHub and it will push this code onto remote repository. From there, I will act as a DevOps engineer for that. Let's jump into our GitHub account. This is my GitHub account. I'm going to create a new repository and repository name. I'm giving it as a package and M That is, so I'm giving first demo project, okay, same name as our package name I'm giving. And we can make it as a private in case if it is having gay proprietary data or confidential project. In our case, we don't have such kind of data, so we'll go with the public so that we can easily manage it. But usually we don't create public repositories in the organizations until unless there is no such valuable content. Most of the cases we go with a private repositories and I'm not creating any files we may need the dot ignore file. I will tell you, let's create without doing anything. So now we have created a repository. Here we have options in case we have created a repository and we want to add few files. Under so far we haven't created any files. We can follow these steps, but we have already created a project and we want to push code over here. In that case, we need to do this one, okay? But before doing this one, we need to convert our project folder as a Git repository. So that will become your local repository. Under this will become your remote repository, we can able to establish connection between these two. If you are not able to understand what I'm talking, maybe it's time for you to go with some of the good courses. If you wish. I have a separate course on good, that is Git and GitHub for DevOps in units, it will be definitely add value for our DevOps journey. Maybe you can check out that. So I'm opening my Java application folder. So this is where we are storing our application rate that is under relax, see projects was to demo project. Now we would like to convert this one into the local repository and indices remote repository. And this command helps us to enable connection between the local to remote. For that, we just need to right-click over here. And you can see an option called Git Bash here. Just click on this one. If you are not getting that option, maybe you haven't installed Git Bash. If you don't know how to do that one, I have added a separate lecture for that one at the end of this course. Maybe you can refer to that. I'm just increasing the font size and we need to convert this one into your local repository first further to get unit dot. Okay. So even this command also works when you install the Git Bash. Otherwise it doesn't work. Now it has been converted into the Git repository. That's the reason earlier there is no master over here now you can see the master at the end of this repository. Anyway, if I do ls, you can see the list of the file. So whatever you could able to see without two dots. If we want to see the files will be charged with the dots, then you need to do an ls minus CLA. So yay helps us to display the hidden files. So dark glitter directory has been created, just know and even settings file projects fail, everything is there. Alright, so let's clear it and the Ls. Now what I'm going to do is I want to extract the target directory way because as a DevOps engineer, he just needed the source code like which is containing the application logic as well as test cases and the palm dot xml beach how the Alda information to build this application. So target is containing the code which is comes out of the bill process, right? That is the reason you can see the class files and JAR files, all the stock, okay? These are not needed while pushing your code. For that, we are going to use a file called gitignore, va dot gitignore. This file helps us to exclude some of the unnecessary folders which we don't want to push it into the remote repository. In this case, we don't want to push the target to directory, right? So let's open and targets class, which means that the data which contains in the target directory everything should be ignored. So, alright, let's save this file. Now, it's time for us to push this code onto the remote repository. Before that, you check with git status. Now you can see it is pulling or pushing the code only dot gitignore apart from dot ignore, we don't need all the stuff. So I'm going to edit my dot gitignore file again. So I will add those as well. Dot class path, dot settings. Okay, These all our files. I will just have your look over here. Okay. I have added everything. Now if I do git status, okay, you can see only dot gitignore file, palm dot xml and the SRC only this information we are going to adding to our local repository. So to add it to the local repository, git add dot. It is going to add the content into the local repository. And git commit minus gm did initial commit. It is asking for me to add username and password. I will quickly add it, get to user add. Okay, I'm adding the username similar way. So that is email Eddie, I'm going to add the username. Alright. Now I can able to commit the changes into the local repository. So this is going to commit into the local repository. I can if I check for kids status. Okay, nothing is there in the local repository. Now it's time to add our remote repository. Okay, so to add remote repository, this is the command. So I'm just adding these commander to our repositories. So our local repository git associated with the remote repository. Now we are going to push our code onto remote repository, git push minus u, origin, main, our master because by default on the remote repository it creates the mean. So I'm going to use the master, even we can use the main branch. So it is going to push our code onto a remote repository and it will ask for the credentials. We should provide those. Sorry, I just canceled it again. I'm going to execute it. It should ask for the credentials. Okay, here you can see I'm going to use the sign and width of the browser. I help credentials. Usually it should prompt over here itself. And I'm going to use gravity and password. It will store the credentials in the credential format. Three is the good. And it should able to push the code over there, right? So I held successfully pushed up my code into the remote repository. And if I refresh here, you can see here there is a branch called master. I have successfully able to push the content that is a Searcy and palm dot xml. These two files are sufficient to build the code. Now, I can say that as a dollar per I helped push to my code. And now DevOps engineer is going to use this code. Again, he will use the mapping in his environmental to build this quote, How does it happen? We are going to see in the next section, thanks for watching and see you there. 19. L19 MAVEN Create a EC2 Instance: Until previous section, we were working with the mapping with integration of Eclipse. We haven't TA dedicatedly installed mapping, but whenever we install Eclipse, Marvin comes along with that one. And also we covered most of the concepts as a dollar per pint of you. Now it's time to understand how does it work as a DevOps engineer prospect to that is where I'm going to take a Linux system and we'll create a build system by installing Marvin on that one. And we are going to execute most of the activities what we have done on our Eclipse. Along with that, we will see some of the additional concepts which year DevOps engineers should know. For that. Of course, we need your Linux system. So in this case, I'm going to use my AWS as Cloud provider where I'm going to create a Linux system. In our case, you can use any Cloud provider. Of course we just need your Linux system, even it could be where VM. But I don't want to make it as this is Tom dependency. That is the reason I'm taking your Cloud systems so that everybody can able to follow it easily. If you are new to the AWS, then don't worry, I'm going to add a separate lecture how to create an AWS account. After that, you can directly come over here and start creating any instance. Any way I'm going to show you how to create your new year to place our code so that you can follow along with me. I have already few systems. That is Jenkins Tomcat on some Kubernetes system. But for time being just to note these systems, I'm going to launch a new instance where we are going to install Maven. Let's go and launch a new instance from here. Maybe I will go back to console. This is how it looks like once you have created the world, AWS are continually, then you can go to EC2 service which is under compute, either here or here. Let me go here. And running instances, there is 0 running instances, but in stances total three. Hey, how about this moment? Anyway, go to running instances. I held three instances which are in stop disturbed. That's the reason it is not showing under running. Let me launch a new instance. Here. I'm going with that, Amazon to Linux. You can go with any amazon Linux, there is no problem. Even you can go with the Red Hat SUSE Linux, Ubuntu. But whenever we deal with this operating system, the command may not work. So if you are new to the Linux, maybe you can strict with the Amazon Linux adults you constrict to follow what operating systems are used throughout these lectures. Let's go and select this one. And this is the instance type which we are going to use, free tier eligible. Maybe you can find out the additional information about the free tier eligibility in AWS page. Here we are not changing anything. Let it be with other default settings here as well. And the tags we are going to add it name of the server. I'm going to give it as a Marvin build server. Okay, this is the instance tag we are giving. Security group. We are going to create a new security group for that. I'm changing it as Marvin. Yes, G. Same thing in the description as well. Next and lunch. While launching, we need to download your key pair because that is useful to connect to our system. So I'm going to create a new key pair. So this is the option. It will get propagated if you are launching it first time. And I'm going to name it as a man when key, under download the key pair, we have downloaded it and Launch instance. That's it. We have created a new EC2 instance, I meant to say Linux EC2 instance where we are going to install MATLAB him. That sum for this lecture. In next lecture, I'm going to show you how can you able to install Maren. Thanks for watching. See you there. 20. L20 MAVEN Prerequisites to setup Maven: Hello folks, welcome back. Now our modern system is up and running. Let's connect to this system. To connect to the system we knew the tool called mobile external party and cutting to you or convenient you can use anything. In my case, I'm going to use them or by x term for that we should take the public API. So this is the public IP. You can just need to copy it, sorry, by mistakenly held corporate private. But this is the public IP. So I have taken public API, Go to your mobile extra. So you need to download and install them away. External Arles put you also you can use. So go to sessions. I'm giving the IP address and go to advanced settings here you should use private-key and you need to go to the path where you are mapping keys downloaded. Let me open this one. Okay, so here we have the key. This is the path where we kept our key, go to this location and load the key path location like quick access downloads, when and you work, keep it, that's it. And the default username is ec2. User. Alright, we are connecting to our mapping system. Let me see the security group. Maybe security group could be the issue. So go to Security Group. Okay. It looks good for me. Yeah. We have connected to the system. Okay. Nothing to change just a little bit of time and become the root user. To become the root user, use the pseudo you assume minus this is the command and clear the screen. Now it's time to set up Marvin for that one, we need to go to the Apache official website and download the packages. Let's do that. So I'm just opening the new tab. If you search for download a M7, then you can see Maeve and download Apache Maven from where we can download Apache Maven. And if you open the link, you can see system requirements. What is the minimum requirement of your system? So we should have the JDK installed. That is one thing we need to make sure, and there is no memory requirement and the disk space is approximately ten MB is fine, and even operating system there is no minimum requirement. Next thing, these are the links, how you can download the work. Marvin. So we are going to use the tar.gz at RKO. This is the one we are going to use. So you just need to right-click and copy link address to download it. Before doing that one, anyway, we how connected to our system, right? Let's install Java first for that one. Just to go here. And the Java seems it got disconnected. Let me open the new tab. Okay, again, same thing we need to do sudo SU minus and increase the font size is not this much. And I'm closing the previous session. And here, clear the screen. I'm going to check whether Java is there or not. Java minus three, there is no Java installed. So let's install Java. Yum, install Java minus one dot dot star. Okay, this is to install the latest version, which means that the packages which starts with the Java minus 1 dot it installed those back edges? Yes, to install, it may take your well, let's wait until it gets completed. Great, Java installation is completed. Just check for Java minus version. Okay, here we can see Jiao on dot-dot-dot. Now we need to set up Java HomePod. For that, we need to update our dot profile and we should add the Java HomePod. How can I check the Java home path? It is quite simple. Here we are going to execute this command. I'm going to add this command in the documentation. Anyway. This means that the file which starts with the Java minus 1 dot dot, dot, after that, it could be anything. So in this directory, wherever it finds, display those, and we are displaying only top three. That's it. So among this, this is the one we need to set up the Java Home button. For that one, just we need to add it to VA tilde slash bash underscored profile. So we are going to update the bash profile of the root user. And the next thing we need to add Java under skirt home is the cold path of the JDK. That's it. Once you have done this, you need to add this one to you or a path. Dollar Java are under skirt home. Okay, So what we are doing is we have installed a Java. Once that is done, we need to set up Java home birth. So we are given, this is where the JDK is in standard. That is what we are telling to our path. I'll write. Now, save this file. And if I do echo, dollar path Can not able to see the updated path yet. But you can do sorts of our bash underscored profile, which means that read the file. And now if I do the a copepod, we could able to see the latest part of it. So which means that our Java installation is successful. In next video, I'm going to show you how to set up Madeline. Thanks for watching and see you there. 21. L21 MAVEN Setup Maven: Hello folks, welcome back. In this lecture we are going to see how to set up never been so far. We have created an EC2 instance on AWS Cloud and installed the Java. Yeah, as I mentioned in the previous lecture, we are going to download our map and packages from this location. So just right-click and copy the link address. Go back to our Marvin. And currently I'm under root directory. I'm going to under slash OPT, Optional directory where we can configure these kind of packages. Now to download these packages, we need to use a command called a W. Okay? If you are not familiar much about the Linux commands, I have done here dedicated course on Linux for Cloud and Azure. Devops in is maybe you can have your look. So w, What is the command? And we just copying the link which we held corporate under downloaded you to take say, Well, yes, we have downloaded and you can see this is the package we just downloaded. Once we download it, we need to extract it for that tab minus x v. This is the command we should use and file name which we downloaded. It has been extracted. And if I go here and go insert to Apache my win 363. Okay, these are the files. Now how we helped set up the home path for our Jenkins, similar way we need to set up path for Mavien as well. So for that, I'm just copying the path of our Marvin. Even we can rename this directory if you need some easing him. Now, we need to set up our map in-home path. For that, we need to edit our bash underscored profile again. So Tilda slash dot bash underscored profile. Okay, So this is the file and where we have updated our Java Home similar way. I'm going to update Marvin. Marvin, we need to use Yum to underscore home. Okay, this is the command we should use. Yum to underscore home under the path of the apache Maven where we have extracted. And also we have one more command that is y2 easy cold slash OPT Marvin slash bin. We need to do till been. That's it. Once this is done, again, we need to add these two to our path. So dollar young T2, colon, dollar underscore home. Okay, So that's it. Now, I'm going to save this file. And again, if I execute a code dollar path, okay, it is not reflected yet. If I do source under the filename where we have updated our path variables. And if I do again a code path, this time, we could able to see the map and path as well. Okay, this is how we are going to update it. But to Java path it has been updated twice because we have done the source twice. Anyway, if you log off under login again, it disappears. So to validate whether we have set up our Marvin path correctly or not, we need to use a command called a young Vm, Vm minus minus version. This is the commander to checkout version. Is there any typo? Minus-minus Watson? Yes. You can see now our MAB in-home parties slash work, PT Apache Maven, and it is using the Java version. This is how we can set up the Marvin. In next lecture, we are going to see we can build our code in the Linux operating system by using the commands. Thanks for watching and see you there. 22. L22 MAVEN Build maven project on Linux: Hello friends. In previous lecture, we have seen how to set up mapping. In this lecture, I'm going to pull core, which we helped pushed into the GitHub. And we will start building on Linux system for that one, I'm just logging into my GitHub repository. This is my GitHub repository. I'm just going inserted repositories cluster demo project and get the link of this repository. And we need to go onto Linux system. First, let me check whether duties installed over here are not. If I execute a command called a kid, what happened? Let me open your duplicate session. Clear the screen and increase the font size. Yes, if we execute, kid. Okay. It is not installed yet. Installed. Good. Yes. To install. Git is installed. Let me clear the screen again. Now, git clone will need to do that. Git clone, the repository name which we would like to copy Alert. We have downloaded the repository onto our local system. Now let's go to our repository and it, unless you can see palm dot xml as such. See here we need to execute our Marion comments. So the first term madman command, what we are executing is the NBN under the golden M. What we would like to execute. Again, I'm going back to math and goals and we'll see what we can execute. This is Maren goal space. So here we can execute to validate, test, to compare test packages installed under the play. We cannot able to do because we should have proper authentication for the remote repository. So let's go and fast to execute the valued it. And you can see this build is successful or not if I do ls, okay, so far there is no target directory has been created. Usually whenever we were executing on Eclipse, we could see the targeted directory always appears. But here you can clearly see the variation until unless we execute at least compelled, we cannot able to see the targeted directory. Now let's execute the company. So ambien is the commander to execute the man command and Company. And we are compiling our code whenever we compare, it should create the JAR files and up Jell-O, this it is pulling all the required packages from the remote repository to our local repository. Okay, I meant to sit central repository to our local repository. It took almost 45 seconds to complete this one. And this is the first time we have executed this compile command. That's the reason it pulled a lot of packages which are necessary to build this application and it stores in the local repository. I will show you the local repository in near well, but building successful. Or if I do ls again, now you can see that target directory over here. Targeted directory gets created whenever we do at least yet compile command. So if I go in set 2 year target to directly and you can see the class files. So if you do remember we were discussing about this initial step is we need to compile the code. So whenever we come from the core Java file, get converted into the class file read. So that is what we are going to C plus two demo project, okay? And the app dot class, you can see this 100 and we haven't compiled the test cases here to that's the reason you cannot able to see the test cases information, okay, now I'm going to compile the test cases. So before going to that one, CD tilde and fast mapping project and make sure that you are exhibiting this bear you how the palm dot XML. So if you execute the command from other location, it doesn't work. Let's take that. If I go to SRC and the NBN compile, if I do it such bomb dot xml and they couldn't able to find it. You'd throw you the build failure. And you can see that the goal use whisper to record your project to, to execute, but there is no palm dot xml in the directory. Okay, so I'm going back to again where we have located our palm but XML. And this time I'm going to execute the Ambien test compound. Whenever we execute MEN test compile along with the source code, it also companies that test cases. We have one test case in SRC, right? Okay. So it is going to compel that as well. And this time it is not going to pull the latter packages because most of the packages are available. So our build also quite quicker way because it is going to pull the required packages from the local repository, not from the central repository. And we have done the test compel only the packages which are required to. Additionally, it is going to pull remaining on you to take from the local repository. Alright, now, again, if I go to my target, I could able to see the test cases. Yes, you can see here, if I do the three on this one, twin is a command which will displace the aisle, the content of that particular directory. Okay, let me try it. Okay, three is not in standard. Let me install. And if I do again, three test class, and you can see that Egypt test class com demo company under that AP test two dot class. This is the file has been created 100. Next thing is we have compelled our source code under test cases. Now it's time to execute the test cases. For that, we can use the map and goal. That is, I'm going back to our home directory of the remote repository. Now, young VM tests. Okay, so it is going to test the, our source code. And while doing a very new goal, you filter requests the additional packages. It is going to the, all the packages from the central repository. Okay, we have tested, we have only one test case. So the one test case has been run and it is successful. That's 37. Build also successful. And so far if you observe we haven't created it need JAR file because we are just doing only the compel under test. We have to do the packaging. So if I go to goals here we have compiled taste compared, even test. We have RAM. The packets. So now we are going to do the package command. So you haven't been package. And again, if it requires some packages, it is going to pull it. And it takes good the, all the phases, then it is going to make it as a package. By default, it is a JAR file. Now it has created a JAR file and it's stored in this location. Okay, So this is how we can package our work court. Our next goal is installed. So let's execute installed. Whenever we do install, it is going to store in our local repository before executing installed, let's look further. Where is our local repository? So I will go back over here and search for find. Slash en dot to dot m2 is the local repository directory. So let's search for, and you can see here slash root m2, underwrote a directory. There is a directory called IAM to why it's created under root, because I'm near root user. As a root user, I'm doing all this activity. Usually the TM2 directly gets created under the user who is executing on who is configured. It usually dot m2 director gets created under the user's home directory, currently logged in as the root user. That's the reason it is created under slash road. Okay, Anyway, I'm going back to my root directory. If I do PWD, you can see the root. And if I go to dotty him too, and if you want to see the hidden files, you're less mass here. And you can see that directory called data m2 is that if I go insert and if I do ls, so Repository, and if I do three, you can see lotta packages. You can see over here, okay. It has been displayed in the two-part map way because multiple directories are there in each directory, different, different files or libraries out there. Okay, It's too big output, but if I do ls, again repositories there, if I go insert repository and that there are multiple, again, we have different folders. We majorly concentrate on calm. If I go in and said, Come, you can see we don't have demo company yet. Why? Because we haven't executed install command. Okay, So now again, I'm switching back to my root directory. Okay, POW dam under root. Here we have the foster demo project. If I go Insert, again, I'm going to execute the MPN install, okay? Whenever we execute the MPN install, now packages should copy it into the column location and you can see a new company called the demo company. Let's execute the MME and install command. So we are using the install goal over here. I'll read builders successful. And you can see it took only nine seconds way because most of the required packages that are already there. And if I, from the starting of this build, you can see here the Ambien installed whenever a is good, it is building the project to the project name is come demo company under the cluster demo project. And it is pulling some of the required packages and fast. It is doing that default resources and a default compel, default attest to resources under default to test, compile under default to test it has done. Once test is done, default to packaging is done. At last. It is doing that default installed, okay, which means that it has calculated that packages into the data. I am too directory. If you see here installing this is the jar file. This jar file corporate into slash route. I am too. And again, if I go back to my router directly, unless Man assay and the goto dot m2. And if I look for repositories and come here, you can see them on company. At least it was not there. Once you do the installed, it gets copied into this location. This is how Marvin Goldsworthy. But in this case we are just to pull in the code under created are executed madman commands, I'll read. So this is how we can take the code up your dollar per and build it in the build server. That's all for this lecture. See you in the next one. 23. L23 MAVEN Comman Maven Goals: In previous lecture, we have seen different math and goals to execute or to build our code. In this lecture, I'm going to show you what of the quite commonly used with Marvin goals or MATLAB commands. That is quite simple. At this moment, we have the target directory. Usually whenever we are building any new application, we are going to clean the existing repository. That is your Vm, clean. Whenever we do MV and clean, it is going to clear all the files which created in the previous build. And you can see here what it is doing. It is executing the maven clean goal and it's diluting and their folder off target, okay, because this target directory itself Creator from the previous build. If I check your list, you can see there is no target directory. Next, we want to execute our build the code. So instead of executing each command like eNB and compare, test, package, install, okay, instead of executing all this, if I do only install, that would be more than enough. Why? Because whenever we execute install, it is going to execute all the goals which are prior to install. If you see that default lifecycle, you can see validate, compile, test, compelled test, package, verify, all are before to install. That's the reason if you execute only installed, that is more than enough. And while executing install again, we need to clean the previous build. That is the reason it's always best practice to use Jacobian clean install. This is the best command we mostly use in case you would like to take until installing the packages sent to the local repository. If you don't want to install the work packages onto local repository, maybe clean package is sufficient. Okay, So, but in most of the cases we execute clean install so that it will get to deploy it into the, once the build is done, it is going to deploy it into the local repository. And you can see here this time, our goals are quite faster, even it's not taken five seconds because most of the required packages are already there in our local repository. That is the reason first-time whenever you execute any project, it will take a little bit of time to take the, all the required packages from the remote repository. Once that is done, it would be quite faster in the subsequent bids. Now, again, if I create a new project and if I execute building up that project, that project to record some of the libraries or packages which has been downloaded by this program. Still it helps because even that also go and check in the local repository with that context. In next video, I'm going to create a new project from our Linux command line. There is your option, even we can use the archetype over here as well. I will show you how to use that. Thanks for watching and see you there. 24. L24 MAVEN Create a Project with Maven archetype: In this lecture, we are going to see how can we create a project to by using Linux command line. If you remember, we helped create it over foster project plan Eclipse. By going to the marvin archetype. I will just show you quickly what we have done earlier. It was just File New and we went to others and such for Maven project next, and we have user default location and click Next here we can see all the architects which are available. Similar way, even we can get this Architects in our Linux system and we can choose among OTs. And once you have chosen, of course we have selected window next time given the group ID artifact. And what can I do it? Same thing, we can do it in our Linux system as well to create a new project by using archetype. So far we have used a HelloWorld simple Java application which degenerates dot-dot-dot. But here we are going to use the web app. So for that, you can just search for mom and baby up archetype. It would list out the links where we can able to get it. But I'm going with the first link where we have the instructions, how we can able to do that one. You can see here, Marvin archetype is the archetype which degenerates here sample Marvin web project. So we are going to generate a sample Marvin will project and this is the directory structure. It is going to create palm dot xml. And in the assert C, we will have here index.js bit. This is the actual application and location. How can we get it? That is Ambien archetype degenerate. So it is saying that okay, we are generating from the architect and what is the architect we are using whenever we want to use any archetype, of course, it should contains their group ID, artifact ID, and version ID, right? So this information is needed. That is the information we are providing in this command to create it. So archetype we are using that is group IDs, RPQ dot apache dot Marvin archetypes. And the artifact ideas may have an archetype web app and Watson is one doc for. So this is the command we can execute it to create a new project. But another way to check out all the artifacts is just executing this maverick architect generate. It is going to list out all the architects how it is displaying over here. If I go back here, it is displaying all the archetypes, read similar where it is going to display it. So let me execute that one. I came back to my mountains are worth PWD. I'm under root. So for we help foster demo project is there. So now I'm going to exert maverick architect degenerate. It is going to display the list of the architects which are available will wait for a year when Albert, now you can see total we have 2899 archetypes are available. We can choose any of these. And by default it's selected 175 to, but we needed a web app. I don't know whether it is a web application, R-naught. If that is the case, you can just come out from this. I'm just giving Control-C came out from the command. Again, if I execute the same command with the grip web app, okay, you displace all the architects, which contains the word web app, again, with a web app, but there are a lot of archetypes are there. So rather than this one, what I can do, let me do the Control C, and I'm going to do the full name of our archetype. So this is the archetype ID, right? Marvin archetype web app. So let me copy this one and executed. Now it is going to display it, which matches to this pattern. Okay? Now you can see we have got limited outputs. That is 1757 is Marvin archetype, which is developed by the ORG dot apache Maven archetypes. So this is the one which we need to choose, okay, number is 17, 57. Okay, so let's go back. Control C. Again, I'm going to execute Marin archetype and that this term, once it is displayed, I'm going to choose this number. Other way is just to directly executing this command. But anyway, instead of executing this command, I'm going with the manual width. Let's go and see what information it asks. Okay, So it is 17576. Good. Now you can see it is asking for the ocean because we have selected the archetype, okay, whenever we select archetype, it selects the group ID as well as the archetype ID. Now, we need to select the version that is lead us towards finish seven. Let it be the default URL so you can just type seven. It takes the archetype now default value for the property. Now it's time to provide our own group ID. So we helped given com dot to demo company read and archetype. I am going to use second demo project. Okay? Now snapshot let it be the default snapshot and package them. Yes, it will. Comes as a company name colon, artifact ID, let it be the PEC, isn't it? That's it. And we would like to create, you can see it is just to displaying, to review your information. We are given the com dot to demo company artifact, secondary demo project Washtenaw ID its own so package name is calm dot-dot-dot company. So just to us to create this project. Now you can see it has been successfully imported. And if I check a list, now you can see one more project called secondary demo project. Okay, this is how we can able to create a sample web application by using the archetype Anya Linux system through command line. And one more thing is we can able to get it from this command line as well. Let me try with this one and we'll see what does it do. There is no option to view the project name, but let it be, we'll try there are we inserted the project and we'll see what is the folder it is going to create it or project name it is going to create it. It is asking for the group ID, artifact ID and so on. So if we do according to that, it is going to create it. But anyway, I don't want to create it. So let me do the Control-C clear off the screen unless there's some for this lecture, the next lecture we are going to see what is the content on this project. Thanks for watching. See you there. 25. L25 MAVEN Plugins and Dependencies in pom: Hello folks, In previous lecture we have created a, our second demo project by using the archetype and that this project or type is web app. Now I'm going insert to my project, that is second demo project. And if I go Insert over here you can see palm dot xml. And the assad sees that you can just execute the tree on this directory and it will list out what content is there. You can see palm dot xml is there. There is a SRC main web app and it doesn't have any test cases. It just how the only SO score. Nothing but application logic. If we need test cases, maybe dollar cost has to write the test cases. As a DevOps engineer, we don't write the test cases anyway. Now, I'm just trying to open and understand the what is the content inside of the palm dot XML. So if I open palm dot xml, it has some of the information. So we'll try to understand some of the important parameters in the palm dot xml once again quickly. So this is the palm dot xml version that is wore pants 0 dot-dot-dot. So model Watson. Next group ID. You can see what is the information we have provided artifact ID under what Shan id. And one extra entry you can see here packaging in our previous palm dot xml, there is no packaging. If we don't specify any packaging by default, it to treat it as a JAR file, but in this case, it comes with the packaging as aware, which means that it is a web application. So this packaging will tell us that what kind of output it is going to generate it next to the name of the project. This is the one. And if we scroll down properties, we are ignoring it. Not much important for us. Let's scroll down little bit here you can see dependencies. We still have the JUnit entry over here. It comes as a Maven dependency. Then if you see build, build, under Build, you can see the plugins. Plugins nothing but the goals indirectly reach goals it is going to execute. And whenever we execute the goals, what is the libraries are necessary to execute those goals are what is the packages are required. So we are executing clean red. So whenever we execute clean, this is the package, our goal, it is going to call internally and similar where resources compiler, and whenever we do test cases, please remember that it is going to use the sure-fire plug-in. Okay? This is the plug-in is useful for the test cases and it is generating the web. So this is the required Marvin, Marvin install plugin whenever we execute to install, map and apply. So all the important goals, what we specify those goals, the plugins are available in the backend. Those you can see under the Build option. Okay, now let's try to build this application. So first time we are building this application, That's the reason whatever packages it required school from the Maven central repository, of course it is going to take your time comparatively subsequent builds. Anyway, let me clean the screen, your list, and let's execute the Ambien clean. Installed. Okay, So we'll see, so let's wait for a while until it gets complete. Okay. Most of the files has been pulled. That's the reason many goals are completed quickly. And it took 12 seconds to complete because I'll the goals, it's how almost everything in that data M2 local repository. And if I execute again the same command, you can see not even take 12 seconds. This time. You can see this time it is completed within three seconds. Okay? Anyway, if we tried to understand the output, okay, it's done the cleaning the existing target file. And it's test compile tests. And you can see there is no tests. Clearly it is saying that no tests to run because we haven't written any test cases. And it is building your profile and it is deploying the Rehfeld's are not installing our Pelham, our dot m2 directory. Okay, That's how it works. Now, let me do a small change that if I open my palm dot xml and if I remove the dependencies, nothing but we are not running any test cases. So if I remove the plugin, will see what will happen. Okay? There is no dependencies for us. Okay? I how remote everything. And if I do cat home.html, you cannot able to see any dependencies. Let me try to run the same command. Again. That is Marvin clean install. We are trying to build it again. Okay, Now also build a successful way because there is no test cases, so there is no point of making it as a dependency. But whereas if I go to my previous project, nothing but in my first project, if I go here, if I do three, if I go to SRC, we have test cases. If I try to delete the same content over here, VA palm dot xml, this is on Project one. Okay? If we try to delete the dependencies and we'll see what will happen over here. Okay, This is a jar under here. If you see there is no packaging option. That's the reason it is going to take the default packaging. Okay? So default packaging is JAR packaging indices the 18 is taking even it is going to take all these back-end plugins, even though we thought these contents still we can execute, okay? But it is just too in case if you wish to change the Watson's, we can do that one. So let's try to save it. And I'm going to execute the Jacobian clean install, okay? This time, of course you're going to fail because we have test cases, but there is no appropriate plugin to run this test cases. You can see here build is failed and failed to execute the goal. And if you see the goal, Marvin compiler plug-in test completed so it could not have built a compile the code at all. That is the reason we need to add the proper dependencies to run our application. So to add it back, of course, I need to find out the dependency plugins so far that I'm going to search for J Unit 2 repo. You play do. You can see J unit under the latest version is for dot-dot-dot and actually we were using for 11, right? Okay, so let me take the latest torsion and let me add it as and the dependencies. So I'm just adding it. So home.html. And after properties here, I'm going to mention that these dependencies we want to do. Let's copy it, okay? But it should be instead the dependencies, okay? And again, it should be closed. Alright, so now what we are doing, we are using the latest version of JUnit plug-in. Let me save it, and let's execute the same command. This time it should be successful. There is no any syntax errors in our home.html file. Of course, this term that test is successful and build also successful. Here you can see as I said, that JUnit is going to use the shoot her plugin in the backend red, you can see here should put a plug-in, even though we call it as a goal. In the back-end, it is going to call the compiler. Okay, Let's do one last thing that is we are going to edit our palm dot xml and we'll delete this one. Okay, I'll these, what I can say, build plugins. These all are optionals. I said, so let me delete it, okay, I deleted it. And if I do palm dot xml, it contains only the information of our project as well as the properties under dependencies. There is no default plugins. Now let's execute the command that is clean install nothing but delete the previous build and create the new one. And this time also it should be successful. Okay, I have deleted all these plugins, so it might be going to the remote repository to pull the latest one because the palm dot xml, whatever information it contents could be the older wash hands. Alright, even though I have deleted our build, an imput, still the building successful, but this time it pulled a lot of repositories are libraries from the remote repository. Why? Because in our palm dot xml, the plugins which we might use could be the older version. This time, we didn't mention anything. That's the reason it went to the remote repository and pull the latest towards shunts. That is the reason it took little bit of time. And if I scroll down, you'll see the total time. It took 41 seconds. If I execute that same command, again, the stamp, it should not download any packages and it could be quite faster than it leaves only three seconds. Okay? And you can see here it is using the sharper plug enough to D2L and the compiler plug-in three dot 12 0.6s. Alright, that's all for this lecture, are to see you in the next lecture. 26. L26 MAVEN Settings: Hello folks. In this lecture we are going to talk about settings dot XML. Let's try to understand why do we use settings.js XML. I just searched and forth settings.py XML in mapping. If I open the first link, if you see the definition of settings dot xml, the settings.py XML file contains elements, use it to defend values which configure maverick executes in various ways, like the palm dot XML, but it should not be bundled into a nice specific project are distributed to any audience. Which means that usually palm dot xml is associated with your specific project to it. And that palm dot XML, if you use for some other project, it may or may not work. Settings.js, Emily's kind of your global configuration. Assume that there are some common values you need to provide across your environment. Then you can update in the settings.py XML and this file we can able to configure in two locations, that is Mab install. So where we have installed maven within that, there is a file called convict. Under that we can specify the settings dot xml. Let me show you this location. Alright, so this is our mountains, or would I just renamed the host name as a man when? So it is easy for us to identify because we are going to use Tomcat in next lecture that 30s and I have used a Marvin host name over here. And if I go to slash OPT Apache Maven. So here we have econ and we have the settings.py XML file. Okay, this is one location. And if I open this one, I think most of the default values are displayed over here. So a lot of content is commented over here. This is one location and another one is we have dot m2 directly, right? So in this case under root, root user, we have here dot m two directly. So under dot m2 directory here also we can create, by default you cannot see the settings dot xml file over year, but we can create it. But recommended way is better to create your settings.py XML file under dot m2. So this is how you can defend the settings dot xml. And if you would like to change something apart from the default values, maybe you can update the sittings dot XML. So in our case to test to this one, what we are going to do is I'm going to use a Tomcat and we'll try to deploy your application from Mab into Tomcat. In that case, we are going to use the settings.py XML. I will show you how we are going to do that one. That's all for this lecture. In next lecture, we are going to see how to deploy your application on Tomcat server. Thanks for watching. See you there. 27. L27 MAVEN Tomcat Server configurations: In this lecture, I'm going to show you how can we deploy your application on Tomcat server using mapping to demonstrate this, we need your Tomcat server. I have already set up your Tomcat server. I'm going to use this one to deploy our application from the mountains are we're already, we have Marvin server, which is up and running. So to install Tomcat server, I have given you a procedure over here. So this is to setup Tomcat Anya EC2 instance. You just need to follow the same steps because I had done the same thing to set it up. Once you have set up the Tomcat, you need to provide the credentials to Tomcat users too. The SUM deployment, that is where we are using this deployments, okay, so we need to update this content in that Tomcat use of Start XML, same thing I have done. So here we are going to use a user called admin and password as the admin to deploy our application from the oven. So this is the maze of thing, just I would like to highlight. So I will just login to my Tomcat server and show you that whether it is matching to this configuration R naught. For that, I'm going to my Tomcat server undertaking the public IP address of this, go into my terminal. I have already logged into my Marvin's her work and go to New Share button is hit and IP address. And I'm loading my keyboard here, I'm using gatekeepers might keep it because I created this server to prepare my good course. So same thing I'm using, and I'm just connecting to the server by using ec2 user. That's it. So it's configured, our setup sometime back. That is the reason there could be some security patches are there it is advising me to update, but we can skip that one for time being. And let me become route. Clear the screen and I'm going insert to OPT. And I have configured my Tomcat server under this location just to go here and there, here we have the other configurations and config Tomcat users dot xml. In this file, I have updated my user's information. You can see whatever information you have seen in the browser, I mean to say, and this wealth same thing is updated over here. I'm going to use this admin user to deploy the application from my Tomcat server 200 over here. Okay, so just to, to differentiate, I'm going to change the host name azure Tomcat for this one. Host name Tom cat. Okay, to make it affected, just you need to do is Udi way assume minus so that the name is going to change it as atomically ID. That's okay. So we helped set up the Tomcat server as part of the documentation which I just shown you. Next thing, we need to start our Tomcat application. To start our application, we just go to PT and Apache Tomcat. Here. We have been under been we have startup.js edge. So we just need to do dot slash startup.js switches to start the application. I think I have already started this application. If we have already started, we can able to access this one on port number 800, 800 from the browser. So I'm just taking the public IP address of this one. I'm going to browser under 800, it's 0. That's it. Yep, I could able to connect to this one under go to manager app. Here it is going to ask for the user name and password. Again, these credentials also updated in the same file. And if I go with you, you can see here manager GUA role helps us to login the user on the command prompt. So here we need to use the user as your Tomcat password as a secret. So I will just connect to the Tomcat server from the browser user. Next secret, I have given the password. Okay, so I have logged into my Tomcat server. And if I see these all are the default applications. Now we need to deploy your web application from Marvin server to Tomcat server. For that, we should copy the application into the Tomcat server under location called web app. If I go out and PWD present working directory, we are under OPT Apache Tomcat. And if I do ls cd, we're back to which location under slash OPT Apache Tomcat web apps. Okay, it to this location, we need to copy our obligation. So by using Marvin, it is automatically copies the application over here. Okay, anyway, Marvin's or worries here, we need to do some configuration changes to make it play into that Tomcat server in this location. Okay. So this is Tomcat server and this is Marion server. What and L configuration changes. So we should do and how to update. We are going to see in the next lecture. Thanks for watching. See you there. 28. L28 MAVEN Deploy war on tomcat server: Hello folks, welcome back. In this lecture we are going to see how to deploy your verifiable and Tomcat server using Marvin. I have already updated your document under remedy Maven repository. You can go and have your look if you have any issue. And here if you see prerequisites Marvin server under Tomcat server, which is already up and running next to download Maven artifact web app archetype. We have already downloaded and we haven't named it as a second Marvin project. Next thing, we need to update the palm dot XML. So in the palm dot xml, we need to provide the, what is the Tomcat server. So here we need to replace with the, the local host with the Tomcat server, nothing but with this server IP address. And also path after configuration as if each application we would like to access. That is the path we need to specify, like after this manager, okay, if I click on examples, here it is coming as a examples, right? Similar way, if we want to access our application, what are the changes we would like to do, okay, that is what we need to do. Once that is done, we need to create a settings dot XML. So this settings dot XML we are going to create under dot ATM2 directory of the root user and we just update this one, okay, these dots are not needed. So here we are going to update. The id is same but username and password, in our case, username is admin. Password also admin, okay. If you remember, I just shown you right. This is Tomcat server. Yep. Here you can see username and password, both our admin, admin, this configuration is updated, which means that we are ready to reply Web App application on Tomcat using our Marvin. And here we should use the command called a Jungian Tomcat 7 under deployed. Okay, so far we haven't executed deploy goal. First time we are executing the play goal because we have found out the remote repository, our remote location, where we can able to copy it. That is the reason we need to use Tomcat 7 is this is the one. Okay, we are using a plugin called Tomcat 7. We do this. We can deploy it on a the Tomcat 7, 8. Okay, in our case we are using Tomcat eight. Alright, so let's update this configuration. I'm just copying this information. Like just to plug-in some copying and go back to our map and server. So these foster terminal is our mavens are what? Second terminal is Tomcat server. And even you can find the name over here and go in, say, two seconds to demo project and the VA bomb dot xml and that this should be under plugins. You can see there is a tab called plug-in. Under plugins, we need to provide plugin hello copied, and after copying, we need to update some of the information that is the URL of our Tomcat server. So I'm just updating it over here. Let me grab the Tomcat server URL. So this is the world. Okay, we thought port number 88 and copying because it is already there. Okay, I have taken no slash. Then. Here we need to do the helloworld we're burpees did in our case as what you well, we want to access, let it be our project name that is second, Marvin. Project, okay, Let it be with the same name. I would like to access this application and save the file. That's it. Now we have updated our palm dot xml to deploy the application on Tomcat 7 server, our server. And this is the version we are using if you see Group ID, artifact ID and version. So this is the information we are using. Next thing, we need to create your sorrows dot XML. So far that we are under slash route in our project, go back to one directory up. And if I do ls minus the earlier, you can see dot-com to directories did go insert two dot m2 directory and let's create sittings dot xml. Okay, settings.py XML am creating and we need to copy the contents of beaches there in our GitHub repository. So we just copy the content of this one. It is like what is the server and what is the username and password, these credentials, we want to set it up. So let me go to password. Password is admin, right, in our case. Alright, so we have updated and one more thing is here, we don't need dots, sorry. Alright, we have done other settings. Now it's time to deploy our application on the Tomcat for that again, I'm switching back to my secondary demo project. So let me change the home.html according to this, because we have named it as its second magazine project. Let me remove it. Alright, so we have saved this file and let's run our Marvin Tomcat 7. So we are going to use the plugin called Tomcat 7 and goal is deployed. Okay, So we are deploying. Let's see what happens. So we are doing at the past m, So some packages or libraries are missing still in our local repository. It is just pulling those. Okay, once this is done in this location, we could able to see secondary demo project. I think it's successful. Yep, building successful. And you can see deploying the VAR file. It is deploying on this location, okay? Which means that in the target environment it will go to the web apps directly and copied it over here. Now let's go to browser and we should able to access our application. I'm going back, okay, it is not picked up the latest application. It will be show up over here. Let me refresh it. Yes, you can see here second demo project. Now if I click on this one, we could able to see the Hello World. Hello World is the content which is there in our web application. So if I go to my map and server, and if I do three, you can see here we have EA index.js b, right? So if I open this file, so it is under SRC main underwear BAP and index.js be so SRC main web app, index.js. If you are getting confused with the Linux commands, maybe it's time to go through with the Linux Basics course. I have a separate course for Linux for DevOps in it. Maybe you can go through with that. So if I open this file, you can see here helloworld, same content is appearing over here. Let's do some changes to this code. And if we deploy it, it should able to build with the latest code and get it to deployed into the Tomcat. That's what it should do, right? So let's edit this file for a quick test. And I'm going to change it. Isaiah, I will add one more line that is H2. Welcome to Marvin. Deployment goal. Okay, so I'm just adding some content. Let's add. And if I do again, Marvin, so we need to do enter compilation, test to build and deploy everything you need to do. Yang Bian for all those purpose, Tomcat 7 colon deploy is fine. Why? Because deployments, that is the last goal which we have in the list of the default lifecycle. So to take all the goals into the consideration and its execute and build the application and deploy it. Okay, there is some problem. There is a typo in the command. So Tomcat 7 colon, deploy. Alright, so you can see all the goals has been executed over here. And building successful. It's saying that application is already exist in the target. Seems some avenues not that much intelligent to remove that target environment content under, under deploy the new one. So maybe what we can do, we are going to delete the content and the re-execute the same thing. So here, if I do ls minus year earlier, sorry, ls minus l. And it has been deployed 13066121600 and end date. If I see 633, it is not latest 14 minutes ago it has been deployed. Let me remove it. Rm minus RF and I'm just deleting it. And now you can see there is no second demo project. So now we are going to execute this once again. This time it should able to deploy it successfully. Yes. Alright, it has been successfully deployed. And before Doom, again, ls minus l, we could able to sit on your test code. And if I go to browser and if I refresh, one more land should be the which we have added. Yes. Which means that our Marvin can able to build the latest code and deploy it into the target system. Usually we are updating our code in the Marvin, but it should be come through the good. So whenever developers push their code onto the good, from there, we are going to pull into our mapping system and we do the build, but build, we don't do it to directly on the Maven. We usually do eat from the Jenkins. How to build our application from the Jenkins. We are going to see in the next section. Thanks for watching and see you there. 29. L29 MAVEN Maven in DevOps Workflow: Hello folks. So far we have seen that as a dollar per we help push the code onto the good and the, from the map when we pulled this code and we help build it while building you to gather their dependencies or it pulled up dependencies onto mapping system, build it, it runs the unit test cases and even deploy it into the Tomcat server. But usually we don't to do all the steps in the Maven, we are going to use a continuous integration tool called a Jenkins, which can initiate the map. And rather than we'd go into Marvin and doing all the steps manually. So in this section we are going to see how does it work. For that one, of course, we need your Jenkins, our work. I will show you how to set up the Jenkins or work in the next video. Thanks for watching and see you there. 30. L30 MAVEN Jenkins Installation full: Hello folks. In this lecture we are going to see how to install Jenkins for this one, I have already created your documentation. Quickly go through with the data documentation and set up the Jenkins. This is Jenkins installation documentation. We need to create an EC2 instance and it should contains the Java, Java one dot it. Of course we have done the same thing for our Marvin server as well-read. Once this is done, we need to set up the Java home path because Jenkins requests the Java. Once this is done, we need to install Jenkins. Okay, So these are the steps where we are going to add additional repo and install Jenkins. Next thing we need to start the Jenkins, which means that we can able to access it from the browser, to access it from the browser, like Tomcat, public IP colon 800, 80. Once this is done, we need to do some configuration settings. We need to do any way we are going to do this one on the console itself. If you get any dough to during the setup of Jenkins, maybe you can follow this document. I tried to update this document frequently. Let's go and create an EC2 instance to install Jenkins. So I'm going to launch instance, same thing, Amazon, Linux. How we have done our Marvin's at what? Same thing we are doing T2 micro instance, nothing to change, nothing to change. And the here add a tag. So step, step file name, I'm going to give it as a Jenkins server because I have already one server with the same name, maybe it get conflict. So I will do Jenkins instance next. And the security group, I'm going to use this security group which is already there, Arles, let me create it. To our confusion. Jenkins. Jenkins, Marvin, ESG. And we need to add port number 800, 80 because Jenkins run some port number 8, 000. That's the reason choose the custom TCP rule and edge 0, 0. And here I'm opening for the Internet, but it is not recommended. Maybe you can open for you or won't network. So if you want to know what is your own network is just to go to browser and search for what is my IP.com. It will give you what public IP address, which means that you were internet IP, that IP range you can add if you want to avoid the security violations. But in this case anyway, it is elaborate. And again, I'm going to delete it once the lab is done. That's the reason I'm opening for the Internet. Next, launch it. So while launching, I'm going to choose the existing key pair which we have created. That is Marvin key up knowledge that I have these key pair. Just Lunch it okay to take say, Well, let's wait for your well, and I'm filtering it with the running instances. Instance state, okay, In Stan, State is running, so it will show up only running instances. Once our Jenkins server is up and running. I think it's up and running and oh, okay. Whenever we get public API, which means that we can able to login to a system, take this public API, and go back. I have already logged into my Marvin server. This is Marvin and this is Tomcat. I don't think so. We need Tomcat X's Let's exit. I'm closing it and let's connect to our Jenkins server now. And we have the key pay rate. That is, okay, Here we have here Marvin key and the EC2 minus user is the username. And okay, to launch the instance, now we have logged into our Jenkins or work. And for better understanding, let me switch to route and host name Jenkins and giving and the sudo SU minus so that it will be converted. It adds a Jenkins. So it's easy for us to identify where we are working. As a first step, we need to install Java. So yum, install Java minus one dot, dot star. Okay, we are installing Java. Yes, to install. Ok, Java installation is successful. Next we need to download Jenkins. If you do a yum install Jenkins, okay, those packages are not available by default. In the default repo. That's the reason we need to add our additional Grupo. That information is already available over here. If you click on this link and this is the procedure to add it to our system. So just to executing these commands blindly, and we are adding key. Now if we try to install Jenkins, which should work, yes, I've gone to install. It. Seems it may take awhile. Okay. Jenkins installation is completed. If I took for service Jenkins status, it's not running. Service. Jenkins start again. If I check for status, it is running. Now I can access this application from the browser. So here we have the public IP address, copy these public API. And once this is done, go to browser. Control weak colon. It makes sure that you have open the port number 800 in the security group level. Otherwise, it doesn't follow. And you can get the password from this path in our Jenkins server. Let me take the password. So you will get the password in this location. I have taken this. Now go and install. Suggested plug-ins are selective plug-ins to install. Okay. Otherwise you can just close this if you don't want to do. So. I'm just installing the suggested plug-ins. By default, we need a few plugins if we use this one it installed. So most of the commonly used plug-ins make sure that it installs git, then SSH build agent, then Marvin. So I couldn't able to find a map in any way. We are going to install it, even the ones the installation is completed. Okay. Lot of time because I have user first-time to install the default plugins and username, I'm going to give it as it Jenkins password also Jenkins One 23. I have given okay. Fullname. Jenkins. Jenkins at gmail.com. Okay. Something I'm giving and save and continue. And this is the URL, let it be and finish it and start using Jenkins. Alright, so this is how we can set up our Jenkins server. In next video, we are going to add our map and build server as this Lao-Tzu, this Jenkins. Thanks for watching and see you there. 31. L31 MAVEN Add Maven build server as a salve to Jenkins: In previous lecture, we have seen how to install Jenkins before adding our Marvin build server as a slave to Jenkins server, we need to do some configurations, okay, for that 1, first to go to managing chins, and we need to check out whether all the plugins are available to add our mechanism slow system for this one. For that one, Let's go to available tab and search for magazine. I don't think so. Maven plugin has been installed during our default setup. So we need to install Maven in worker plug-in, even Marvin integration plugin all time selecting it and installed without restart. Alright, we have installed a mapping in worker plugin. Go back to dashboard again, managing Pickens. Let's go and check what null installed plugins are there. Basically we knew the Git Hub. Okay, we need GitHub login, I think. Good luck and it's already installed. Okay, now we are going to add our map and build server as it's slow to this Jenkins server further to just to go to managing chins. And here we have managed notes on the clothes. So here we are going to add a new node. So our node name, I'm going to go Marvin build server. Okay. Because it is a Marvin's her work just naming, it doesn't matter and build several hurdles. We can use slave whatever name is convenient for you, and it is a permanent agent. Next, and here the name is Marvin build server. Let it be the description and executors. Nothing but how many jobs can it run parallelly? I'm going to do five by default. If you see on your master node, you can execute to two jobs are two of them here, and I just given five. And the remote root directory, we should have a remote router directly. So to provide this one, we need to create a separate user for unmanned system. That is a best practice. So here, this is Marvin server, right? If I go to cats class, ETC, password which tells that how many users are there, we just have only one user that is easy to minus user. I'm going to add one more user. That name is Jenkins. So user add Jenkins. Okay, we are adding your user called the Jenkins. And let's set up the password for Jenkins, Jenkins to 123. And the same I'm giving. Alright, So I helped given the password. And one more thing is we need to add this user to the pseudoscalar. Okay, this is the pseudowords file. Here we need to add our Jenkins server to the suitors going further to go to F to G, nothing but capital G, which means that it will go to the end of the file. And we are going to add under root, Okay, Jenkins, and we are going to add this one, okay? Which means that whenever we execute any admin commands, don't ask the password. That is the meaning of this one. So we have now created your user called the Jenkins and added him as an admin. Now, another thing is we need to enable the password based authentication. Okay, so for password based authentication, we just need to edit. Class UTC is, as it says here, to d under skirt concrete, by default, EC2 instance doesn't comes with the password based authentication. So just to edit to this one and such for PSS w, are they okay? Which goes to the password authentication. We should enable this one. So by default it will be commented it out. So we'll just remove the comment. And there is one more entry with the same password authentication which specifies the node. We need to comment this one. So I just to remove the comment in this lane and added over here, That's it. Once this is done, we just need to repress the associated service necessary to do a reload. Okay, sorry, sorry. Today we load, which means that we have enabled password based authentication on the map and server. Now we can use Jenkins server to connect with them, Morgan. Now, let's go on to add this. Mavens are about as a slave to our Jenkins server. So go back and remote 2 root 2 directory, I'm going to go slash home slash Jenkins. That is the default Jenkins home directory. You can go and check it out over here. Pwd. So let me switch Jenkins user, okay, PWD, if I do, I'm under slash home Jenkins directory, okay, this is the path we have given, which means that it will be useful as a workspace directory. Next two levels, no need to provide labels, which means that in case anything with that name, IT is going to take by this isn't something like that. Next to uses all this stuff is not needed. Next thing is launched agent by connecting to the master lunch agent where execution of the command on the master ourselves launch agent way ISS yet. So usually we will choose this option, okay, which will generate a few files, JPL file. So we need to execute on the client side. But as a quick process, I'm going to use the lunch agent way I associate Here host name, nothing but the server name of the remote host, which means that our Marvin system, let me get the IP address of our Marvin system. Here I'm going to use the private IP because both are in the same VPC. If you don't know VPC, which means that it is like same datacenter. So it will connect with the private IP address. We don't need to provide the public IP, so I'm just giving the IP address next to credentials. We just created Jenkins user read those credentials we should add over here, add Jenkins, and here username and password we are providing. What is the username that is Jenkins password also Jenkins, our 2123. And I'm giving ID also Jenkins under description. No need. Okay. Hopefully help you in the right password and select the Jenkins. Okay, So we have given the Jenkins credentials and one last thing we need to do that is known we repay host. It should be non-recurring verifications strategy. Okay, save this one. And we could able to connect to our slow system. So let's work on this one and see the logs. Okay. It is trying to connect to our remote system. Yes, you can see isn't successfully connected, which means that it has been registered. I'm going to say our Marvin server has been registered as it is into this system. And once this is done, you cannot see any red cross mark over here which could able to connect and it should be able to gather up the information about our map and build server. Alright, so that's all for this lecture. In next lecture I'm going to show you how can we execute your build on the remote system. I'm into some haven't built system by using the Jenkins. This is how in the real-world we are going to use the build servers. That's all for this lecture and see you in the next lecture. Thanks for watching. 32. L32 MAVEN Build jenkins job on slave node: So far we have setup our Marvin's her work as a slave, our agent to our Jenkins server. Now it's time to create our foster job. Nothing but we have the faster demo project, right? So that one I would like to build from the Jenkins, but the builders should happen on my mountains. However, if that is the case, we need to create our foster job. So if you are familiar with the Jenkins well and good. If not, just follow along with me because I just want to show you how usually we use Jenkins and madmen in the real-world. So I'm going to create first two demo project and it is a Maven project. Select it. And the next thing is, if you scroll down, you can see here, there is the option that restrict to whether this project can be run. Means if you want to restrict, where do you want to run this project that you can mention it over here? Of course, we need to restrict the sun onto run on our mountains. What about right way? Because it is a Java project and Marvin server only can able to run. Usually in the real world you will have multiple slip systems, are Asian systems. Each system can run one kind of application if it is a Marvin, of course we can run Java. If it is a NodeJS, it runs on other system. If it is a dotnet are C-sharp publication it runs on another build server like that it would be. So in this case we want to restrict it java applications to run on our server. So selected this application and we need to search for our Marvin system. So we have named it as Marvin build server. So there is no space. Marvin build server. Once this is done, we need to do the URL of our application. So we have our code in our GitHub. So select the good. And I have already opened our GitHub URL. So that is ready for us to demo project to undertake the copy of the URL and the URL in the GitHub. And the next thing branch to build nothing but on which branch this code is available. Of course it is master. And you can go and check it out over here. Once you have given this one, next, we need to provide Marvin version, okay, there is an error. I will talk about the cetera in event. So we know the goal state that is clean. Install, okay, these are the goals we are executing. See this error or warning. Jenkins need to know where you were manganese installed. So far. We have installed them Avenue in our Marvin system, but our Jenkins server doesn't know. That is we're global tool configuration comes into the picture there. We need to specify where is our Java located, varies over good to located, varies over mapping located, all this information we need to provide. So let me apply under job, we cannot able to run this job, even though we run, it is not going to successful way because we haven't configured our Marvin server details where our Git is located, Marvin is located under Java is located. So once you save this job, let it be the job and go to Dashboard and go to managing kids. Here we have the option called global tool configuration. So select this option. If you scroll down, you can see here JDK installations, nothing but where is your Java here we need to provide the path of Java where it is installed on our Marvin server, not on the Jenkins server. Install automatically, I'm just too disabling it. So just to go to our mountains, our work. So this is our Marvin server, right? So we have already configured. So this is Jenkins. And if you do remember, Java path is there under a core dollar path, but I don't think so. It will be affected over here because we haven't configured in the Jenkins server. So we need to search for root bash profile path. So pseudo cat slash roots slash dot bash underscored profile. Okay? So you can see here, this is the Java home birthright. Just to take this one and provided in the Java here name, we just need to go Java home. Okay? Even Java one dot-dot-dot also I can give, okay, there is no hard-coded value for this, but this should be the path of your Java Home. Similar with good, where exactly does it and start. So Jenkins is installed, okay, this is default to just two. This can be anything and if I search for where it is, good to, sorry, Good. So this is the path that gets installed. So let me go to get okay, Next to grad school and, and that these are not required, but these plugins we have in standard, that is the reason it is propagating. Next thing is mapping. So where is our Marvin is installed? I'm going to do Marvin. Three dot, dot. This is the wash and we have installed on Marvin. You can check out that under OPT. Ok, here we have, you can see this is the Apache Maven and this is the path, right? You, when you can check the path to underscore home, but this is the path we need to provide. So I don't want to install automatically and do the path that ship with this information, we can able to run our job without any issues. Let us go back to our job faster demo project. Let's build it. Whenever we build it is going to create a cd minus PWD Survey CD, CD tilde PWD. I am under my home Jenkins. This is the path we have given in our slave configuration, right? And if I go to workspace here, it is going to create the project and build the project, which means that it copies the our source code into this location, build it, and it generates the artifacts out of it. So let's build it now and let me open it. So it is pulling the code under it started executing. You can see goals, clean install, and it is doing all the jobs. Okay. I'll read our buildings successful. I ran it sometime back. That's the reason all the packages are copied into the local repository. That's way there is no issue. So building successful. And if I go back to my Marvin server and if I check for ls, you can see here faster demo project. If I go insert and if I check ls, you can see your palm dot xml ISRC under Target. And three, if I go, You can see AP test dot class. Even we should have AP class, okay, which is classmates are generated after built. And if I do ls minus CLR timestamp also 754 if we're due date. Okay. It's just to 755. One minute ago. It has been created. This is how we can able to build our applications from the Jenkins, okay, So in math when we don't use or we don't execute commands directly. Usually we use integration tool, continuous integration tool called the Jenkins, which can interact with our build servers or build systems to build the artifacts. Hope this has given enough information how the Jenkins master and slave does work, and also how we can use Marvin in the real world. One last thing I'm going to do in the next video that is, we are going to build our secondary demo project as well quickly. So that given you can understand a little more better, how does it work? Thanks for watching and see you there. 33. L33 MAVEN Build a war file on Maven build server: Hello folks, welcome back. In this lecture I'm going to create your new job that is for secondary demo project, but the code is not yet available in our GitHub repository. So we need to push our code into the, our GitHub repository. Then only we can build it from the Jenkins because Jenkins can able to pull the code from the source code management. So for that purpose, I'm going to create a new repository called the secondary demo project so that we can update our code over here. So new, I'm going to create a second demo project. Okay, this is the name I'm doing. Let it be public and create a repository. And even I'm going to Marvin server here we have created our second demo project going say to that. So converted this one into your Git repository for that git init dot, which means that we are converting these into your local repository. Now I'm going to associate my remote repository with the local repository. For that, we just need to execute this command. Go back. So we have associated our local repo with the remote repo. And one more thing, good, I think I heard remote or the target directory over here. Anyway, we don't want to push targeted directly onto the GitHub because we will take the source code on building variable we want and the source code should contents enough information. What is required to build the application? That is where our palm dot xml is helping us. Anyway, git add git status. So we are adding all these files to our remote repository, git commit minus GM initial commit. So we how committed our changes into our local repository. Next thing is we need to push our code into remote repository further git push origin, master. Okay, I'm just pushing our code onto remote repository. Now it's asking for the remote repository credentials. So everybody, Okay. So I come into my changes. Now if I go and refresh, I could able to see our code over here. Once our code is here, it is very easy to build from our Jenkins server just to take the URL of our remote repository, go back and create a new item under this term, secondary demo project, I'm naming it. And the Maven project go here. And a restricted this to run on specific system, that is Marvin build server. Next thing, get usually we name it as a student or client. Okay. So you were released this one and we don't record any credentials and it is Marshall branch, I hope yes. And go back and clean install. Okay. Same thing I'm doing and the apply Save. Now let's build it and we'll see what happens. So I'm opening the build output. This, it could able to successfully execute our goals and packages. It couldn't able to find in our local repository. So it is pulling from the central repository. It may take your win. Alright, we have successfully completed our build process from Jenkins. Again, this build happened on Marvin. And if I go to my Marvin slash home Jenkins directory here, under workspace, you can see the one more project, that is second the project. And three, if I do, you can see the VAR file. So this where file, we can deploy it wherever we want. This is your web application. Again, we have your Tomcat server, right? We can deploy it onto the Tomcat server, but that can be done through the Jenkins. We don't do it with other Marin. Maybe I have already covered that in mind. Devops, Project 2 can check it out. How does it work? But this is how we can use mapping to do all the build activities. But we don't execute commands directly on the marvin. Once it is set up and working fine, we will be managing Marvin with the Jenkins. I hope it has given me a clear idea how to work with Marvin as a developer and Azure DevOps, in, in, in next video, I will be talking about a learning path. Once you have learned man, when what things you can learn to shape up you were carried that we are going to discuss in the next lecture. Thanks for watching and see you there. 34. L34 MAVEN DevOps engineer career path: If you are watching this video, which means that you have completed this course successfully. Thank you so much for being part of my course till the end. And you are one among the very few members who completed this course. And I tried to keep this course very simple to understand and up to the pint and also without diluting the quality of this course, if you really like the course under learn something out of this, please take some time to leave your review with rating that really helps us to reach more people. If you feel that I didn't reach up to the mark what you expected, please leave your personal messages so that I can try to help you my level best. Not only that, your feedback helps us to improve the course further model within that context, if you are still in the process of learning, DevOps, maybe you might not completed some of these courses which I displayed over here. I would request you to learn at least one tool among these, each segment that really helps you to become your DevOps in it. If you liked our teaching style and if you wish to learn more from us, go to Google and search for galaxy under skirt courses, which will take you into the galaxy GitHub account. In this GitHub account, we frequently update our courses which we release and also Coupon course whenever we generated with that, you may get a better discount, not only that one, if you are using these reflow links we're supporting, additionally lead to us, which indirectly helps us to improve the quality of the content, what we deliver. Hopefully, I will see you in our next courses. Until then, bye, keep learning.