Maven references local jar files to pom. xml and mavenpom. xml
- Copy the leixin-1.1.jar to D:/MyWork/Maven/and execute the cmd operation:
D: \ MyWork \ Maven> mvn install: install-file
-Dfile= D:/mywork/maven/leixin-1.1.jar
-DgroupId= Com. leixinwork
-DartifactId= Leixin
-Dversion= 1.1
-Dpackaging= Jar
-DgeneratePom= True [INFO] Scanning for projects... [INFO] [INFO] detail [INFO] Building Maven Stub Project (No POM) 1 [INFO] detail [INFO] [INFO] --- maven-install-plugin: 2.4: install-file (default-cli) @ standalone-pom --- [INFO] Installing d: \ mywork \ maven \ leixin-1.1.jar to D: \ MyWork \ Mave N \ RepMaven \ com \ leixinwork \ leixin \ 1.1 \ leixin-1.1.jar [INFO] Installing C: \ Users \ ADMINI ~ 1 \ AppData \ Local \ Temp \ mvninstall1620939548586709374.pom to D: \ MyWork \ Maven \ RepMaven \ com \ leixinwork \ leixin \ 1.1 \ leixin-1.1.pom [INFO] detail [INFO] build success [INFO] detail [INFO] Total time: 0.879 s [INFO] Finished at: 2017-03-05T00: 49: 56 + 08: 00 [INFO] Final Memory: 6 M/114 M [INFO] timeout
- View the Maven repository at/com/leixinwork/leixin/1.1:
-Leixin-1.1.jar-leixin-1.1.pom