Skip to content

Commit

Permalink
Disable Maven publishing / signing in the absence of the OSSRH L/P or…
Browse files Browse the repository at this point in the history
… signing properties and move these tasks to a separate Gradle file.
  • Loading branch information
MadMartian committed Oct 29, 2021
1 parent abddf5c commit 63060fc
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 48 deletions.
51 changes: 3 additions & 48 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ dependencies {
compile group: 'com.extollit', name: 'data-structures', version: '2.14'
}

signing {
sign configurations.archives
}

task shipDoc(type: Jar) {
classifier = 'javadoc'
from javadoc
Expand All @@ -61,47 +57,6 @@ artifacts {
archives shipDoc
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'RabbitMQ Manager'
packaging 'jar'
description 'Convenience class for facilitating some common RabbitMQ tasks.'
url 'https://github.com/weibeld/RabbitMQ-Manager'

scm {
connection 'scm:git:git://github.com/weibeld/RabbitMQ-Manager.git'
developerConnection 'scm:git:ssh://github.com/weibeld/RabbitMQ-Manager.git'
url 'http://github.com/weibeld/RabbitMQ-Manager/tree/master'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'MadMartian'
name 'Jonathan Neufeld'
email '[email protected]'
organization 'extollIT Enterprises'
organizationUrl 'http://www.extollit.com'
}
}
}
}
}
}
if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword") &&
project.hasProperty("signing.keyId") && project.hasProperty("signing.password") && project.hasProperty("signing.secretKeyRingFile"))
apply from: 'publishing.gradle'
48 changes: 48 additions & 0 deletions publishing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
signing {
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'RabbitMQ Manager'
packaging 'jar'
description 'Convenience class for facilitating some common RabbitMQ tasks.'
url 'https://github.com/weibeld/RabbitMQ-Manager'

scm {
connection 'scm:git:git://github.com/weibeld/RabbitMQ-Manager.git'
developerConnection 'scm:git:ssh://github.com/weibeld/RabbitMQ-Manager.git'
url 'http://github.com/weibeld/RabbitMQ-Manager/tree/master'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'MadMartian'
name 'Jonathan Neufeld'
email '[email protected]'
organization 'extollIT Enterprises'
organizationUrl 'http://www.extollit.com'
}
}
}
}
}
}

0 comments on commit 63060fc

Please sign in to comment.