I want to use Vertica JDBC driver in my Eclipse Maven project. I have the jar file from the vendor (i.e., downloaded from HP-Vertica support website) but, obviously, that file is not in Maven central repository. My Maven build will not work without that dependency.
This post will also apply if you are behind a firewall and/or do not have external access for some reason.
- Download the jar file (e.g., the Vertica JDBC jar file).
- At the same directory as the jar file, run the following command to install the jar to the local Maven repository (running in a different directory seems not work).
- Now when you run your maven goals, it will not look for this particular jar file in any external repository such as Maven Central Repository since Maven checks and perceives that it is already in your local repository (your ~/.m2 directory).
If you want your Eclipse to start using this jar from your local repository:
- In Eclipse Luna on a Mac/Windows, go to Window > Show View > Other > Maven > Maven Repository.
- Open Local Repositories > Local Repository.
- Right click for the context menu > Rebuild Index.
Now it should show up in “Add…” dialog in pom.xml edit.