Maven ojdbc jar dependency error: package oracle.jdbc does not exist
The ojdbc jar is not in public maven repositories. You can add the jar to local repository manually.
Download the jar from:
- oracle site
- copy from your oracle database server ( {ORACLE_HOME}\jdbc\lib\ojdbc6.jar )
Install in your repository
mvn install:install-file -Dfile={Path/to/your/ojdbc.jar} -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
Use in your pom
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0</version> </dependency>
Oracle JDBC drivers are accessible from Oracle Maven Repository with some additional security related steps.
Check the blog "Get Oracle JDBC drivers and UCP from Oracle Maven Repository (without IDEs)" for more details.