Install the jar package to the maven repository

<!-- https://mvnrepository.com/artifact/ojdbc/ojdbc -->
<!-- (parameter 1): the real storage path of the ojdbc-10.2.0.4.0.jar package downloaded to the local -- >
<dependency>
<groupId>ojdbc</groupId>-----------------(parameter two)
<artifactId>ojdbc</artifactId>-------- ---(parameter three)
<version>10.2.0.4.0</version>------------(parameter four)
</dependency>

grammar:

mvn install:install-file -Dfile=jar package location (parameter one) -DgroupId=groupId (parameter two) -DartifactId=artifactId (parameter three) -Dversion=version (parameter four) -Dpackaging=jar

I put "ojdbc-10.2.0.4.0.jar" under "D:\Program Files\mvn\",

Note: There is a space in "Program Files", so you need to add double quotes. The other three parameters can be copied from the above. The following is the command I used to install the ojdbc-10.2.0.4.0.jar package:

mvn install:install-file -Dfile="D:\Program Files\mvn\ojdbc-10.2.0.4.0.jar" -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.4.0 -Dpackaging=jar

The following points should be noted:
1. Note that the "-" after install cannot be missing without spaces
2. Note the path of the jar package and the name of the jar package in "-Dfile".
3. Pay attention to the cmd command prompt, Check whether the jar package is successfully copied in the local repository.

Important: Jar packages are installed by default under "C:\Users\Administrator\.m2\repository\". In fact, the above (parameter 2, parameter 3, parameter 4) is to specify the specific installation path for installation.

(In the future, you can also change the parameters 2, 3, and 4 according to your own needs, which is actually to change the installation path).

Guess you like

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