user2924127
user2924127

Reputation: 6242

Add JDBC in Netbeans Maven Project

I have created a java maven project inside of netbeans. I now need access to an oracle database via my java code. I downloaded the jdbc driver (.jar file) from Oracle, now what do I do to include it into my maven repository inside of netbeans?

There is this link which is close to what I want to accomplish: http://www.mkyong.com/maven/how-to-add-oracle-jdbc-driver-in-your-maven-local-repository/

I do not have maven installed on my computer, I have it running inside of netbeans.

What are the steps of adding a JDBC driver inside of a netbeans maven repository?

Cheers

Upvotes: 1

Views: 4714

Answers (1)

Bob Rivers
Bob Rivers

Reputation: 5441

You are almost there... I do not use Netbeans, but I'm almost sure that somewhere under it, it has maven installed.

So, try to locate the mvn executable, and follow the instruction provided in the link that you posted, or the official instructions to do it.

Another try would be run the command install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> as a goal, inside netbeans (again, I'm not a netbeans user, but since other tools allow it, maybe netbeans could do the same...).

A google search showed this instructions. It may help you.

Upvotes: 1

Related Questions