安装到本地仓库
mvn install:install-file -Dfile=C:\maven-3.6.1\dubbo-2.7.3.jar -DgroupId=org.apache.dubbo -DartifactId=dubbo -Dversion=2.7.3 -Dpackaging=jar
上面不行的话加英文引号
mvn install:install-file "-Dfile=C:\maven-3.6.1\dubbo-2.7.3.jar" "-DgroupId=org.apache.dubbo" "-DartifactId=dubbo" "-Dversion=2.7.3" "-Dpackaging=jar"
发布到私服
mvn deploy:deploy-file "-Dfile=C:\Users\Administrator\Downloads\jave-lx-1.0.5.jar" "-DgroupId=lwh.ws.schild" "-DartifactId=jave" "-Dversion=1.0.5-SNAPSHOT" "-Dpackaging=jar" "-Durl=http://11.1.80.167:8083/repository/maven-snapshots" "-DrepositoryId=maven-snapshots"
-DrepositoryId:取的是maven的settings.xml中的id,如下面,deploy的账号和密码必须有权限,否则还是会报错