Find Oracle JDBC Driver in Maven Repository
The Oracle JDBC driver (ojdbc14) is not available in the central Maven repository due to licensing restrictions. Therefore, you need to find an alternative repository to add it as a dependency in your project.
Finding Alternative Repository
Unfortunately, there are no public repositories that legally distribute the Oracle JDBC driver. Any repositories claiming to host the driver are likely violating Oracle's copyright.
Adding Alternate Repository
Since the driver is not available in public repositories, you must manually download it from the Oracle website. Once downloaded, follow these steps to add it to your Maven project:
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 \ -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=ojdbc.jar -DgeneratePom=true
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> <version>10.2.0.3.0</version> <scope>runtime</scope> </dependency>
Note that you may need to adjust the version number depending on the version of the Oracle driver you downloaded.
The above is the detailed content of How to Add the Oracle JDBC Driver to Your Maven Project?. For more information, please follow other related articles on the PHP Chinese website!