Install local jar to Maven repository

1. Configure the Maven path and use the mvn command on the command line

     E.g:

mvn -v

      show maven version

 

2. Install the local jar file

Using maven's install function, the command is as follows:

mvn install:install-file -Dfile=E:\frameworks\jacob-1.18\jacob.jar -DgroupId=com.jacob -DartifactId=jacob -Dversion=1.18 -Dpackaging=jar -DgeneratePom=true

After the command is executed, the jacob.jar file will be installed to...\repositories\com\jacob\jacob\1.18\jacob-1.18.jar, and the pom file will be generated at the same time...\repositories\com\jacob\jacob\ 1.18\jacob-1.18.pom.

 

Guess you like

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