Don't throw an exception in the build if the sonatype user/password isn't set

This commit is contained in:
Ben Gruver 2014-01-17 02:40:12 -08:00
parent 7cf2b33cbd
commit 0845df7dd0

View File

@ -104,8 +104,10 @@ subprojects {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
if (rootProject.hasProperty('sonatypeUsername') && rootProject.hasProperty('sonatypePassword')) {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
}
pom.artifactId = project.name