mirror of https://github.com/halo-dev/halo
Fix failing checks of staging repository when releasing to Maven (#7114)
#### What type of PR is this? /kind bug /area core #### What this PR does / why we need it: When I tried to publish Maven publications into OSSHR <https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/>, I couldn't close and release the opening staging repository because our Maven publications didn't meet the requirements of OSSHR, for example, `Sign Files with GPG/PGP` and `Project Name, Description and URL`. This PR tries to fix those problem and all checks will pass. You can check it from <https://central.sonatype.com/artifact/run.halo.app/api/overview>. > https://central.sonatype.org/publish/requirements/ #### Does this PR introduce a user-facing change? ```release-note None ```pull/7067/merge
parent
2cb10a5279
commit
348e7c906f
|
@ -91,6 +91,16 @@ java {
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications.named('mavenJava', MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
pom {
|
||||||
|
name = 'API library'
|
||||||
|
description = "$project.description"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.named('test') {
|
tasks.named('test') {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
finalizedBy jacocoTestReport
|
finalizedBy jacocoTestReport
|
||||||
|
|
|
@ -1,42 +1,29 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
|
id 'signing'
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications.register('mavenJava', MavenPublication) {
|
||||||
def pubName = "${archivesBaseName}"
|
pom {
|
||||||
pluginManager.withPlugin('java-platform') {
|
url = 'https://github.com/halo-dev/halo'
|
||||||
pubName = pubName + 'Pom'
|
licenses {
|
||||||
}
|
license {
|
||||||
pluginManager.withPlugin('java') {
|
name = 'The GNU General Public License v3.0'
|
||||||
pubName = pubName + 'Library'
|
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
|
||||||
}
|
}
|
||||||
"${pubName}"(MavenPublication) {
|
|
||||||
pluginManager.withPlugin('java-platform') {
|
|
||||||
from components.javaPlatform
|
|
||||||
}
|
}
|
||||||
pluginManager.withPlugin('java') {
|
developers {
|
||||||
from components.java
|
developer {
|
||||||
|
id = 'johnniang'
|
||||||
|
name = 'JohnNiang'
|
||||||
|
email = 'johnniang@foxmail.com'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pom {
|
scm {
|
||||||
licenses {
|
connection = 'scm:git:https://github.com/halo-dev/halo.git'
|
||||||
license {
|
developerConnection = 'scm:git:ssh://git@github.com:halo-dev/halo.git'
|
||||||
name = 'The GNU General Public License v3.0'
|
url = 'https://github.com/halo-dev/halo'
|
||||||
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id = 'johnniang'
|
|
||||||
name = 'JohnNiang'
|
|
||||||
email = 'johnniang@foxmil.com'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scm {
|
|
||||||
connection = 'scm:git:https://github.com/halo-dev/halo.git'
|
|
||||||
developerConnection = 'scm:git:ssh://git@github.com:halo-dev/halo.git'
|
|
||||||
url = 'https://github.com/halo-dev/halo'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,4 +40,8 @@ publishing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
sign publishing.publications.mavenJava
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ plugins {
|
||||||
id 'org.springframework.boot' apply false
|
id 'org.springframework.boot' apply false
|
||||||
id 'java-platform'
|
id 'java-platform'
|
||||||
id 'halo.publish'
|
id 'halo.publish'
|
||||||
id 'signing'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'run.halo.tools.platform'
|
group = 'run.halo.tools.platform'
|
||||||
|
@ -63,3 +62,13 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications.named('mavenJava', MavenPublication) {
|
||||||
|
from components.javaPlatform
|
||||||
|
pom {
|
||||||
|
name = 'Application platform.'
|
||||||
|
description = "$project.description"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -19,3 +19,13 @@ dependencies {
|
||||||
// e.g.: api 'halo.run.plugin:links-api:1.1.0'
|
// e.g.: api 'halo.run.plugin:links-api:1.1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications.named('mavenJava', MavenPublication) {
|
||||||
|
from components.javaPlatform
|
||||||
|
pom {
|
||||||
|
name = 'Plugin platform'
|
||||||
|
description = "$project.description"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue