When using Maven to build a project, it will certainly involve adding the Oracle database driver dependency. However, it is difficult to find Maven dependency configuration in the Maven repository.
When using Maven to build a project, it will certainly involve adding the Oracle database driver dependency. However, it is difficult to find Maven dependency configuration in the Maven repository.
When using Maven to build a project, it will certainly involve adding the Oracle database driver dependency. However, it is difficult to find Maven dependency configuration in the Maven repository. Currently, it seems that only the Oracle10g dependency configuration can be found, oracle 11g r2 driver is added here. After going online, it is said that this is an Oracle problem. Oracle does not disclose Maven's JDBC driver dependency, we need to manually add the built-in JDBC driver to the Maven repository. Many people on the Internet say that they want to add the driver to the user's folder. After my experiments, it is also possible not to put it in the user's directory, and it is not necessarily necessary to put it in the directory. The following is to add the JDBC driver to the Maven local repository through the mvn Command, as shown below:
Mvn install: install-file-DgroupId = com. oracle-DartifactId = ojdbc6_g
-Dversion = 11.2-Dpackaging = jar-Dfile = d: \ ojdbc6_g.jar
Where-Dfile is the path address of the driver package, which is not in the personal directory.
Running result:
Maven details: click here
Maven: click here
Related reading:
Add the Oracle JDBC driver to the Maven Repository
Maven 3.1.0 release, Project Build Tool
Install Maven in Linux
Maven3.0 configuration and simple use
Set up sun-jdk and Maven2 in Ubuntu
Get started with Maven