Development will encounter the inability to download the jar package through Pom.xml, in this case we can manually install the jar package locally to the local repository, so that the next time you can use it again without having to download the network again, specifically for the Oracle driver package Ojdbc6.jar as an example:
1 mvn Install:install-file-dgroupid=com.oracle-dartifactid=ojdbc14-dversion=10.2.0.1.0-dpackaging=jar-dfile =d:\ojdbc14.jar 2 mvn install:install-file-dgroupid=com.oracle-dartifactid=ojdbc6-dversion=11.2.0.1.0- Dpackaging=jar-dfile=d:\ojdbc6.jar 3 mvn INSTALL:INSTALL-FILE-DGROUPID=COM.ORACLE-DARTIFACTID=OJDBC7- Dversion=12.1.0.1.0-dpackaging=jar-dfile=d:\ojdbc7.jar 4 <dependencies> 5 <!--Oracle JDBC Driver- 6 <dependency> 7 <groupId>com.oracle</groupId> 8 <artifactId>ojdbc14</artifactId> 9 <version>10.2.0.1.0</version> </dependency> </dependencies>
1. Copy the local jar package Odjbc6.jar to a temporary location such as I copied to D:\ojdbc.jar here.
2. Open the cmd command line as an administrator and enter the following command:
1 MVN install:install-file-dgroupid=com.oracle-dartifactid=ojdbc6-dversion=11.2.0.1.0-dpackaging=jar-dfile=d:\ Ojdbc6.jar
The installation was successful and then the information about the jar package is configured in the Pom.xml file, and maven will download it to our locally installed files
1 <dependencies> 2 <!--oracle JDBC Driver--and 3 <dependency> 4 < Groupid>com.oracle</groupid> 5 <artifactId>ojdbc14</artifactId> 6 < version>10.2.0.1.0</version> 7 </dependency>
Install the local jar package into the MAVEN repository