Maven Saturday Notes

Git > SCm > Source Code Management Tool

What is Maven :
---------------
>It is Project Maanagement Tool.
Since It provide Template/Structure/Architecture of Project

src/main/java > POJO classes
src/main/resources > drivers/excel/property file/json /xml file etc
src/test/java > testng/ junit classes
src/test/resources > drivers/excel/property file/json /xml file etc

>It is also Known as Build Management Tool
Build > After combining all classes into single unit > Build
Management of Build happens with maven (Create Delete, Update etc)

>It Manages dependancies


Unit Testing Framework /Tool: Junit/ TestNG

TestNG Class Can be run in 4 Ways:
----------------------------------
1.Directly Run that Class
2.Running through TestNG Suite
3.Running pom.xml
4.Running through cmd(Eclipse need not be open)
>It Takes Less Memory
>Easy to integrate will other tool (Jenkins)


maven clean > it for cleaning target Folder


Maven Build Life cycle:
----------------------
1.Validate: It checks Structure of your Project. Is EveryThing is fine with Structure or not.
2.Compile : COnversion to bytecode
3.Test    : To run testng/Junit Classes
4.Package : Converting into .jar or .war (Single file to give someOne)
5.Integration Test : It will happen if Project is dependant on Some Other Module
6.Verify : Verify generated Package is correct ?
7.Install : It will install jar or war into local repository (in .m2)
8.Deploy  : It will deploy/install to remote repository


A.java > compiler > A.class(Bytecode) >  JVM  > 0 & 1's
High    Intermediate Interpreter (Can be UnderSTood Machine)
Level    Language

----------------------------------------------------------------------------------------------------------
>Inside Eclipse Maven is Installed
>Out side Your Computer do not know what is maven

Why to install Maven at System Level
1.It takes less memory when you run through command prompt
2.Your Project can be easily can be intergrated to some other Tools like Jenkins.
------------------------------------------------------------------------------------------------




<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>in.lntinfotech</groupId>
<artifactId>myMavenDevOps</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M6</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>

Rohini
Sakshi
Vignesh
Abhishek Rana
Deep Shah
Dipali
Gaurav Purohit
Mukund
Sah Maneesh
Sakshi
Shantanu
Vaibhav
Zaid Qureshi
Aparna

Comments