close nav

close nav

Thread: How to Add Dependencices

Forum : Spring Jdbc, Spring ORM and Spring Transaction.   18 Feb, 2021
User Image
Aravind368

Newbie

Joined: 17 Nov, 2020

Points: 100

Threads: 5

Posts: 4

How to Add Dependencices

| Quote Date : 18 Feb, 2021    Views:457    

Hi Friends
        please give me guidence  how to add the sql dependencies into the maven project

tags: spring

Comments

User Image
Sriman

Contributor

Joined : 15 Jul, 2016

Points : 1820

Threads: 1920

Posts: 293

Re: How to Add Dependencices

Reply Date : 15 Mar, 2021

You cannot find ojdbc7 in maven repository since it is commercial implementation. So if you have the jar file with you locally you install it into your local maven repository using the below command and add it as dependency in your pom.xml



mvn install:install-file? -Dfile=path-to-your-artifact-jar \
  -DgroupId=your.groupId \
    -DartifactId=your-artifactId \
    -Dversion=version \
    -Dpackaging=jar \


Hi  sriman 
         Thank you for reply
         Please guide me exactly search option for oracle database in maven repository

Replied by Aravind368
User Image
Aravind368

Newbie

Joined : 17 Nov, 2020

Points : 100

Threads: 5

Posts: 4

Re: How to Add Dependencices

Reply Date : 22 Feb, 2021

Hi  sriman 
         Thank you for reply
         Please guide me exactly search option for oracle database in maven repository

"

Hi Aravind,

You can goto https://mvnrepository.com/? and search for the dependencies you are looking for. For example if you are using the database as mysql server then type in the ?search box mysql connector java then you will see the mysql dependencies
click on ?the mysql>>mysql-connector/j dependencies shows the versions click on a version will show you the dependencies configuration which you can add in pom.xml as below.

[code]
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.23</version>
</dependency>
[|code]

"

Replied by Sriman
User Image
Sriman

Contributor

Joined : 15 Jul, 2016

Points : 1820

Threads: 1920

Posts: 293

Re: How to Add Dependencices

Reply Date : 22 Feb, 2021

Hi Aravind,

You can goto https://mvnrepository.com/? and search for the dependencies you are looking for. For example if you are using the database as mysql server then type in the ?search box mysql connector java then you will see the mysql dependencies
click on ?the mysql>>mysql-connector/j dependencies shows the versions click on a version will show you the dependencies configuration which you can add in pom.xml as below.


<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.23</version>
</dependency>


User Image
Aravind368

Newbie

Joined : 17 Nov, 2020

Points : 100

Threads: 5

Posts: 4

Re: How to Add Dependencices

Reply Date : 19 Feb, 2021

First of all thank you prisha
     
         Please guide me how to search in maven repository am not able to find exact dependence
       

"Just add ojdbc7 dependency in pom.xml of your maven project and update the project"

Replied by manisha288
Load More

No More Comments