maven本地jar上传到私有仓库

    技术2022-07-11  95

    配置用户下文件

    1. 配置$User/.m2/settings <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <username>用户名</username> <password>密码</password> <id>maven-releases</id> </server> </servers> </settings> 使用mvn命令发布包到nexus mvn deploy:deploy-file -DgroupId=com.xxx -DartifactId=open-xxx-sdk -Dversion=1.0.0 -Dpackaging=jar -Dfile=文件目录地址/open-xxx-sdk-1.0.jar -Durl=发布到对应的仓库地址 -DrepositoryId=maven-releases
    Processed: 0.008, SQL: 9