Apache Lucene open-source search software
LUCENE-9975: don't require signing of 'unsignedJars' publication (maven artifacts published to the user's maven local repository, build folder and apache nexus). (#156)
Dawid Weiss0a316b249506
diff --git a/gradle/publishing/defaults-maven.gradle b/gradle/publishing/defaults-maven.gradleindex 2722c725b55..e5952b51c74 100644--- a/gradle/publishing/defaults-maven.gradle+++ b/gradle/publishing/defaults-maven.gradle@@ -179,7 +179,12 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->}publications {- jars(MavenPublication) {+ unsignedJars(MavenPublication)+ jars(MavenPublication)+ }++ publications.each { publication ->+ configure(publication) {from components.javagroupId = project.groupartifactId = project.archivesBaseName@@ -189,12 +194,12 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->pom(configurePom)+ // LUCENE-9561:+ // Remove dependencyManagement section created by a combination of+ // Palantir and the publishing plugin.+ //+ // https://github.com/palantir/gradle-consistent-versions/issues/550pom({- // LUCENE-9561:- // Remove dependencyManagement section created by a combination of- // Palantir and the publishing plugin.- //- // https://github.com/palantir/gradle-consistent-versions/issues/550withXml {def dm = asNode().dependencyManagementif (dm) dm.replaceNode {}@@ -209,11 +214,11 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->group "Publishing"description "Publish Maven JARs and POMs to Apache Snapshots repository: ${apacheNexusSnapshots}"- dependsOn "publishJarsPublicationToApacheSnapshotsRepository"+ dependsOn "publishUnsignedJarsPublicationToApacheSnapshotsRepository"}+ // 'jars' publication is always signed. We currently don't use it anywhere though.signing {- required { !version.endsWith("SNAPSHOT") }sign publishing.publications.jars}}diff --git a/gradle/publishing/maven-local.gradle b/gradle/publishing/maven-local.gradleindex 9d415b89463..e3d82680987 100644--- a/gradle/publishing/maven-local.gradle+++ b/gradle/publishing/maven-local.gradle@@ -53,11 +53,11 @@ configure(rootProject) {}}- tasks.matching { it.name == "publishJarsPublicationToMavenLocal" }.all { task ->+ tasks.matching { it.name == "publishUnsignedJarsPublicationToMavenLocal" }.all { task ->mavenToLocalRepo.dependsOn task}- tasks.matching { it.name == "publishJarsPublicationToBuildRepository" }.all { task ->+ tasks.matching { it.name == "publishUnsignedJarsPublicationToBuildRepository" }.all { task ->// Clean local repo prior to republishing artifacts.task.dependsOn mavenLocalClean// Attach to root project's mavenLocal task.