Fixing nexus credential issue
This commit is contained in:
parent
e0901a6e18
commit
aaa0a7cd86
1 changed files with 4 additions and 7 deletions
|
|
@ -7,15 +7,12 @@ publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/'
|
def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/'
|
||||||
def releaseRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
def releaseRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
url = project.hasProperty('release') ? releaseRepoUrl : snapshotsRepoUrl
|
url = project.hasProperty('release') ? releaseRepoUrl : snapshotsRepoUrl
|
||||||
|
|
||||||
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
|
credentials {
|
||||||
credentials {
|
username project.hasProperty('mavenCentralUsername') ? mavenCentralUsername : "unknown"
|
||||||
project.logger.info("Applying nexus credentials.")
|
password project.hasProperty('mavenCentralPassword') ? mavenCentralPassword : "unknown"
|
||||||
username mavenCentralUsername
|
|
||||||
password mavenCentralPassword
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue