Maven Introduction:
Required Software to install Maven.
JAVA/JDK
what is maven ? why it is required?
open source, java based project management and build tool.
assume :
As a developer he's going commit source code+unit test cases+maven build scripts into remote repo.
Now As a DevOps engineer he will take the code and deploy to any of the application servers.
Maven -
ANT -legacy one.
Maven will not support .net applications.
Node Js, Angular,JS
grunt is the js runner or build tool
lly every programming language have one build tool.
Maven is going to Crete 3 types packages refer below
Using Java we can develop 3 types of applications
Standalone -jar
This contains only java code
Example:
HelloWorld.java
javac HelloWorld.java -it will compile and convert machine readable format(Byte code).
JVM only understand byte code.
java HelloWorld -Running
Web app-war
Java+UI code –Web Content
UI:
Html , JS, CSS, images..etc.
Jar files+ Web Content
Enterprise Applications-ear
If the application is too big &
which contains multiple modules then we go for Enterprise applications.
Modules +Jar +war +Web Content.
Note:
while Installing any software you need to check the version compatibility.
Assume :
JDK 8 -maven 3.x
JDK 7 -maven 2.x like that
Download and install maven
It will provide zip or tar file
while downloading there are two variants available
binary: if we want to utilize existing features we can go for binary
source:
Download binary version and extract it then u will see
bin
boot
conf -settings.xml file imp
lib
Content in pom.xml
As a developer he will write code &
As a DevOps engineer he want to know in-detail how to run pom.xml
xml: xtenisble markup language -we can write our tags also
<chandra>
</chandra>
every tag you opened you must close it.
html: Hypertext markup language and its have predefined tags
Common Tags in pom.xml
<groupId>
<articatId>
<version>
scopes
test :
compile :
run :