maven manually import dependencies:
- First, download the required jar package online and save it locally.
- 1. Configure the system environment variables of maven;
- 2. Open CMD and enter: mvn install:install-file -Dfile=E:\pinyin4j-2.5.0.jar -DgroupId=net.sourceforge.pinyin4j -DartifactId=pinyin4j -Dversion=2.5.0 -Dpackaging=jar. Where E:\pinyin4j-2.5.0.jar is the path of the jar package downloaded to the local.
- 3. Add the following code to the pom.xml file, save the pom.xml file, and start downloading the dependency package.
<dependency>
<groupId>net.sourceforge.pinyin4j</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.0</version>
</dependency>