使用nexus搭建私有maven仓库

使用nexus搭建私有maven仓库

常用的 Proxy Repository URL

上传至本地仓库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
apply plugin: 'maven'

uploadArchives {
configuration = configurations.archives
def baseUrl = 'http://localhost:8081/nexus/content/repositories/'
def userName = 'admin'
def password = 'admin123'
repositories {
mavenDeployer {
snapshotRepository(url: baseUrl + 'snapshots/') {
authentication(userName: userName, password: password)
}
repository(url: baseUrl + 'releases/') {
authentication(userName: userName, password: password)
}
pom.project {
groupId 'cn.zhmj'
artifactId 'pull2refresh'
version '1.0.0-SNAPSHOT'
packaging 'aar'
description 'description bala balala'
}
}
}
}

参考链接