How to create a Maven Java Project in Netbeans 12.4 and Add dependencies using Maven

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to my channel today in this video tutorial we will learn about creating a maven project and netbeans 12.4 as well as adding dependencies into a mm project using maven so i'll double click on this netbean to open netbeans now i'll click on this file and new project and here you can select between different projects so we will discuss the java with gradle and java and in a later session but now we will create a java with maven project so i will click on this java application and click next and here i will give it a java with maven uh as the project name and now i'll uh finish so now the project is created as you can see it here java with maven now let me close these other projects so i'll close this one as well as this on jdbc mysql close and now i'll uh go to this uh project file and you can see this uh palm dot xml and here goes our dependency we can add our dependencies here but we will use a different method for adding dependencies but first we will find some dependencies for us so for that i will come here to this google chrome and i will a use maven repository and search this now you can select this one you can find dependencies here and but i prefer using maven central and now here i will search for my schedule connector my s cable connector and now if i search now it has given me these different uh connectors so these are drivers on mysql server and now um i have opened this first one so i can add this dependency by copying this and adding this into my pom.xml but i will use the dip the other method so for that we need this uh i will come to this i need bean and uh click on this dependencies and i'll click on this add dependency and here it uh takes this group id uh artifact id and version so for that i will come to this google chrome and i will copy this group id from here which is my schedule i'll ctrl c this and i'll ctrl e it here and then it takes that artifact id so i'll copy this ctrl c this and now i'll come here and control v this and then it takes the version so i'll come here and copy the version as well this is the version so i'll copy this and i'll come here and i will paste it here now if i add this now you can see in our pom.xml this dependency tag is added as well as these uh group id uh mysql connector java and this version is added now if i expand this uh dependencies now you can see this mysql connector java which is downloaded and added here so we have added these uh this mysql connector uh java dependency now i'll come to this source package and here i'll create a new java file so i'll use java class and now i'll name this [Music] connection and now i'll click uh finish so i'll add a main method into this so for that i will come here and use a public static wide man and now here i will use a string orgs and now i'll use this now why have i have created this class so that we can check that uh we will add some code here so that we can check that this mysql connector.java dependency is added and it is what so for that i will come to this uh google chrome and i will click on this uh home page and here i'll go to this j connector example and here obtaining connection i'll come here and now i'll copy this code from here up to here on ctrl c this and now i'll go to netbeans and i will control v this n or project now you can see that all of these are showing error because we haven't added the imports so for that i'll come here and i'll copy these imports and ctrl c this and now i'll go here and paste it here ctrl v here now you can see this connection is not working because i haven't copied this connection so i'll ctrl c this and all control v it here and now you will see that all the connection all the errors are gone except this connection error so it is because of this uh connection because we have this class name as well connection so i'll make this my case is cable and now i'll rename and now you can see all the errors are gone and our um this dependency is working properly so that's all for today i hope you liked the video if you like the video please like subscribe and comment thank you
Info
Channel: Programming Guru
Views: 56
Rating: undefined out of 5
Keywords: Programming Guru, Guru Programming, programming, gurru, programminggurru, how to create maven project?, maven project, java, netbeans, apache maven, how to install maven, maven installation windows 10, what is maven, maven tutorial for beginners, how to create maven project in netbeans, maven on netbeans, java project with maven, adding dependecies in netbeans using maven, how to add jar file in netbeans maven project, add external jar to maven project, add jar file in netbeans
Id: Fq05uX3G4b0
Channel Id: undefined
Length: 7min 33sec (453 seconds)
Published: Sun Dec 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.