How to use third party jar in maven project
Use the following command
mvn install:install-file -Dfile=c:/abc.jar -DgroupId=com.lianlianpay -DartifactId=abc -Dversion=1.0.0 -Dpackaging=jar -DgeneratePom=true
-Dfile is the jar file to be transferred to the local repository.
After executing this command, a directory (com) will appear in the local repository (usually the $HOME/.m2 directory), under which there will be an abc-1.0.jar file and an automatically generated pom file.
Copy the following command into the pom file
<dependencies>
<dependency>
<groupId>com.lianlianpay</groupId>
<artifactId>abc</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
If you are using an idea, you need to set it up in turn
Right-click on the project -> maven -> reimport
idea to configure the jar into the project.