-Add third-party login information to log in to the private server in the settings configuration file tab servers in maven
<server>
<id>thirdparty</id>
<username>admin</username>
<password>admin123</password>
</server>
The first
Enter the directory where the jar package is located and run
mvn deploy:deploy-file -DgroupId=com.alibaba -DartifactId=fastjson -Dversion=1.1.37 -Dpackaging=jar -Dfile=fastjson-1.1.37.jar -Durl=http://localhost :8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty
The second
Open cmd and run
mvn deploy directly :deploy-file -DgroupId=com.alibaba -DartifactId=fastjson -Dversion=1.1.37 -Dpackaging=jar -Dfile=C:\my_java\teaching materials\data: maven[advanced]\installation Three party jar package\fastjson-1.1.37.jar -Durl=http://localhost:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty