mirror of https://github.com/apache/lucene.git
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)
This commit is contained in:
parent
2160d7239d
commit
0a316b2495
|
@ -179,7 +179,12 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->
|
||||||
}
|
}
|
||||||
|
|
||||||
publications {
|
publications {
|
||||||
jars(MavenPublication) {
|
unsignedJars(MavenPublication)
|
||||||
|
jars(MavenPublication)
|
||||||
|
}
|
||||||
|
|
||||||
|
publications.each { publication ->
|
||||||
|
configure(publication) {
|
||||||
from components.java
|
from components.java
|
||||||
groupId = project.group
|
groupId = project.group
|
||||||
artifactId = project.archivesBaseName
|
artifactId = project.archivesBaseName
|
||||||
|
@ -189,12 +194,12 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->
|
||||||
|
|
||||||
pom(configurePom)
|
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/550
|
||||||
pom({
|
pom({
|
||||||
// LUCENE-9561:
|
|
||||||
// Remove dependencyManagement section created by a combination of
|
|
||||||
// Palantir and the publishing plugin.
|
|
||||||
//
|
|
||||||
// https://github.com/palantir/gradle-consistent-versions/issues/550
|
|
||||||
withXml {
|
withXml {
|
||||||
def dm = asNode().dependencyManagement
|
def dm = asNode().dependencyManagement
|
||||||
if (dm) dm.replaceNode {}
|
if (dm) dm.replaceNode {}
|
||||||
|
@ -209,11 +214,11 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->
|
||||||
group "Publishing"
|
group "Publishing"
|
||||||
description "Publish Maven JARs and POMs to Apache Snapshots repository: ${apacheNexusSnapshots}"
|
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 {
|
signing {
|
||||||
required { !version.endsWith("SNAPSHOT") }
|
|
||||||
sign publishing.publications.jars
|
sign publishing.publications.jars
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,11 +53,11 @@ configure(rootProject) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.matching { it.name == "publishJarsPublicationToMavenLocal" }.all { task ->
|
tasks.matching { it.name == "publishUnsignedJarsPublicationToMavenLocal" }.all { task ->
|
||||||
mavenToLocalRepo.dependsOn 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.
|
// Clean local repo prior to republishing artifacts.
|
||||||
task.dependsOn mavenLocalClean
|
task.dependsOn mavenLocalClean
|
||||||
// Attach to root project's mavenLocal task.
|
// Attach to root project's mavenLocal task.
|
||||||
|
|
Loading…
Reference in New Issue