add oracle odbc to maven repository

If you are using Oracle, you must first install your Oracle JDBC driver in your local Maven repository.

Here is how to proceed:

Step 1- Download the Oracle JDBC driver

Please download manually the Oracle JDBC driver from Oracle web site.

Step 2- install your Oracle JDBC driver in your local Maven repository

We follow the instructions from this Maven FAQ I have a jar that I want to put into my local repository. How can I copy it in?

In this example, we assume that your Oracle JDBC driver is in a file called ojdbc14-10.2.0.4.jar

Open a console and go to the folder containing the ojdbc14-10.2.0.4.jar file.

c:\oracle\jdbc>dir
11/07/2012  13:02        ojdbc14-10.2.0.4.jar

Let’s assume you want to register your driver under the group id ‘com.oracle’, use ‘oracle’ as the name of the artifact id and that you want the version to be ‘10.2.0.4’.

You can now run the following command:
c:\oracle\jdbc>mvn install:install-file -Dfile=ojdbc14-10.2.0.4.jar -DgroupId=com.oracle -DartifactId=oracle -Dversion=10.2.0.2.0 -Dpackaging=jar

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Final Memory: 3M/5M
[INFO] ------------------------------------------------------------------------

Step 3 – Done

You can now add the driver dependency in your pom.xml

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>oracle</artifactId>
    <version>10.2.0.4</version>
</dependency>

You are now ready to reverse your Oracle database using Springfuse and generate a complete Java/JPA/Hibernate/Spring project!

Advertisements

One comment

  1. philadelphia real estate · July 17, 2013

    It’s perfect time to make some plans for the future and it’s time to be happy.
    I’ve read this post and if I could I want to suggest you some interesting things or tips. Perhaps you can write next articles referring to this article. I desire to read more things about it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s