How to Setup Maven for Eclipse & Windows Machine in easy way | Create Maven project |
VloĹžit
- Äas pĹidĂĄn 21. 08. 2024
- Maven Session 3:
------------------------------------------
6. How to download/install Maven in Windows ?
1. Maven Plugin/software for Eclipse(Update Maven for latest version of Eclipse):=
-Copy "download.eclip..."
-Go to Ecplise-Help-Install New Software-Add above URL and click on Add
-Add Name and enter same URL
-Select checkbox and click on Next...Finish
-After installing, Restart ur Eclipse
2. Maven Software for MAC/Windows laptop:=
For Jenkins and runnning ur Maven project from CMD propmt
-Go to "maven.apache.o..."
-Download Zip file for Maven
-Binary zip archive apache-maven-3.6.3-bin.zip
-Setup Environmental Variables and Path
-M2_Home=C:\Users\pandi\Desktop\apache-maven-3.6.3
-Maven_Home=C:\Users\pandi\Desktop\apache-maven-3.6.3
-%Maven_Home% and %M2_Home%
-Add path upto the bin folder="C:\Users\pandi\Desktop\apache-maven-3.6.3\bin"
---------------------------------------------------------------------------
7. How to Create first Maven Project in Eclipse ?
----------------------------------------------------------------------------
8. What is Maven Dependencies ?
----------------------------------------------------------------------------
9. Setup dependencies in POM.xml
Go to website: mvnrepository....
Search dependencies and add 3 lines of code in POM.xml
gropup Id, Artifact Id, Version
Jars will be stored at Local Machine:(in .m2 repository)
----------------------------------------------------------------------
======================================
***************AJ AUTOMATION*************
======================================
đ Learn automation from basic !! đ
â Recent Uploads :=
⢠Recent Uploaded Videos
â Selenium series videos Playlist :=
⢠Selenium tutorial for ...
â Maven Tool videos playlist :=
⢠Maven Tool - Necessary...
â Java Language Concepts :=
⢠Java Language Concepts...
â TestNG Framework Videos:=
⢠TestNG Introduction an...
â Become Master in Xpath:=
⢠Xpath Introduction
â Protractor series videos playlist :=
⢠Let's Learn Protractor...
======================================
*************** Thanks for watching !!*************
======================================
âĄď¸ Keep Learning...Keep Sharing...Keep Growing. âĄď¸
#LearnSeleniumInEasyWay #SeleniumWebDriver
Hi guys, if you like the content of the channel then plz share with your friends learning automation.
â Recent Uploads :=
czcams.com/play/PLlc_LrU50tljOnB-LUofJpBkeSMskcQVd.html
â Selenium series videos Playlist :=
czcams.com/play/PLlc_LrU50tliMZrnSa0a9geljzCijPDfq.html
â Maven Tool videos playlist :=
czcams.com/play/PLlc_LrU50tlgWOrybr-Ppffg6T_1cXeUb.html
â Java Language Concepts :=
czcams.com/play/PLlc_LrU50tliq2RV-1Yhr2IjJ5RqXCQjU.html
â TestNG Framework Videos:=
czcams.com/video/-KEg20O6Mxs/video.html
â Become Master in Xpath:=
czcams.com/video/Wv1hHLhtnzw/video.html
â Protractor series videos playlist :=
czcams.com/play/PLlc_LrU50tlim53VdVwAmCnBr8M2x38y8.html
âĄď¸ Thanks for your support !! âĄď¸
Excellent Demo!!!!!
Thanks for commenting @anwar.
Plz share the content whichever you find informative.
awesome đđ
Excellent!
sir, in selenium we link the JAR files to the project using buildpath. If we have maven is the buildpath step not required or is it that the Maven will only keep required JAR files and we have to anyhow link the project using build path? can you please clarify this?
When we are using Maven Project, then all you have to do is add dependencies in POM.XML file. No need of adding JARs using buildPath. Maven is a smart tool so it will automatically downloads the corresponding JARs files for dependencies added in pom.xml.
e.g we require selenium JARs, TestNG JARs, so we will add dependencies in pom.xml for these two and corresponding JARs files will be downloaded automatically. This is the main advantage of using Maven over JAVA project.
When you create JAVA project instead of Maven then you will need to download JARs and use Java Build path. But mostly we use Maven Project only.
Thanks for asking !
Thanks bro. I have a maven project, say abc. it produces abc.jar file but not abc.pom file. please tell me how I can produce it. this abc.pom file is not coming at the end of maven build. it should be identical to the pom.xml in the project.
1. Run this command : mvn install -DgeneratePom=true
OR
2. In eclipse , open POM.xml> click on Overview > Open Packaging drop down > Select pom option from DD> Save it
Now Run As maven install.
This will create a .pom file in .m2 repository in users location.
e.g If you have provided Group id as com.qaProject and Artifact ID as Project 1 and version as 0.0.1-SNAPSHOT ==> then go to C:\Users\user1\.m2
epository\com\qaProject\Project1\0.0.1-SNAPSHOT---here .pom will be available . Open it with Notepad++ which shows same contents as that of pom.xml
@@AJAUTOMATION Thanks bro, will try this
@@AJAUTOMATION yes, bro. This has worked. you are amazing talent.
just a doubt, at 22.38, your environmental settings says %MAVEN_HOME% and %M2_HOME%bin....is that right as in description you are suggesting to add only %MAVEN_HOME% and %M2_HOME%
Yes, I added path upto bin folder separately in path variable. You can give like this %MAVEN_HOME%bin and %M2_HOME%bin or add separately. We just have to make sure to add Maven home and path upto bin folder otherwise you may face issue while running project from cmd prompt.
Hello bro, I am creating a jar file for a maven project, say sample.jar. It is also creating another jar file unexpectedly, ie samplerules.jar. in the pom.xml, I changed the samplerules in and to 'sample'. but it still creates both jar files. why? Thanks
for first time when u run mvn install with artifact id=samplerules, a folder would have created in .m2 repository having name=samplerules
Now u changed artifact id=sample, after running mvn install=> this would have created a folder 'sample' in .m2 repo.
so after changing artifact id, previously installed jar with corresponding folder will always remain in the .m2 repo unless u delete manually.
@@AJAUTOMATION Thanks bro.
Dude ... You really need to sort out your mess with spelling 'eclipse'
Ohh thanks for pointing that out.
Video can not be edited but will update the notes in the description...
Thanks for watching đ¤