maven introduces third-party jar packages

Because Oracle official authorization is required, ojdbc cannot be downloaded on maven, you need to download it yourself, and then load it into the local maven library through the command, the detailed steps are as follows

 

1. Go to the official download, address: http://www.oracle.com/technetwork/indexes/downloads/index.html , find "drivers" - "jdbc Drivers", open it, click to agree to the agreement, you can choose the version to download

2. Suppose the downloaded 10.2.0.5.0 is placed in the root directory of the d drive

3. Open the command line window and execute the following command to load it locally

 

[plain]  view plain copy View code snippets on CODE Derive to my code slice
 
  1. mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.5.0 -Dpackaging=jar -Dfile=d:\ojdbc12.jar  

 

4. Download the pom file on maven (maven cannot download the jar, but the pom file), and put it into the folder corresponding to the jar in the local lib library

5. Add to the maven file

 

[html]  view plain copy View code snippets on CODE Derive to my code slice
 
  1. <dependency>  
  2.     <groupId>com.oracle</groupId>  
  3.     <artifactId>ojdbc14</artifactId>  
  4.     <version>10.2.0.5.0</version>  
  5. </dependency>  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326407856&siteId=291194637