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 {
|
||||
maven {
|
||||
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
|
||||
|
||||
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
|
||||
credentials {
|
||||
project.logger.info("Applying nexus credentials.")
|
||||
username mavenCentralUsername
|
||||
password mavenCentralPassword
|
||||
}
|
||||
credentials {
|
||||
username project.hasProperty('mavenCentralUsername') ? mavenCentralUsername : "unknown"
|
||||
password project.hasProperty('mavenCentralPassword') ? mavenCentralPassword : "unknown"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue