Step 1: Download the jar package that needs to be added
You can find and download it in the maven library, or you can download it on the corresponding official website
Maven library URL (need to verify that it is a real person): https://mvnrepository.com/
Step 2: Put the downloaded jar package in the specified location (the location can be specified by yourself, you can use it), it is recommended to put it in the repository path of maven for easy management
Step 3: Configure the local maven library
1. First check whether the local maven library environment variables are configured correctly
Open cmd and execute mvn -h to check whether the maven environment variables are configured correctly
If it is not shown in the above figure, add the path of your own maven bin in the path, for example: D:\maven\apache-maven-3.6.1\bin;
2. Enter cmd, enter the path where the jar package was stored before
Example of window command:
d: ---进入d盘
cd filename ---进入filename文件夹
What I entered here is D:\maven\apache-maven-3.6.1\repository
3. Execution (the content of execution is modified according to your own situation)
mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=4.1.1 -Dpackaging=jar -Dfile=kafka-schema-registry-client-4.1.1.jar
Parameter Description:
-DgroupId: Indicates the groupId corresponding to the jar
<groupId>io.confluent</groupId>
-DartifactId: Indicates the artifactId corresponding to the jar
<artifactId>kafka-schema-registry-client</artifactId>
-Dversion: Indicates the version corresponding to the jar
<version>4.1.1</version>
If you don’t understand the parameters, you can also refer to the bottom of the first picture
Last display: build success
Reload the pom.xml file just fine