Add jar to local maven repository through cmd

Here is an example of downloading IKAnalyzer6.5.0.jar from the Internet

1. Open cmd and execute the following command to manually install the jar package to the local maven repository:

mvn install:install-file-Dfile=C:\Users\Karn\Desktop\Junior\Information Retrieval\Project\IKAnalyzer6.5\IKAnalyzer6.5.0.jar-DgroupId=com.lucene-DartifactId=ikAnalyzer -Dversion=6.5 .0 -Dpackaging=jar-DgeneratePom=true

Among them, -Dfile=full path of jar package. My jar package storage path is C:\Users\Karn\Desktop\Junior\Information Retrieval\Project\IKAnalyzer6.5\IKAnalyzer6.5.0.jar

 

2. After the installation is complete, add the following dependency code to pom.xml:

<dependency>
 <groupId>com.lucene</groupId>
 <artifactId>ikAnalyzer</artifactId>
  <version>6.5.0</version>
</dependency>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326706312&siteId=291194637