-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ```
- Loading branch information
Showing
4 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,30 @@ | ||
plugins { | ||
id 'maven-publish' | ||
id 'signing' | ||
} | ||
|
||
publishing { | ||
publications { | ||
def pubName = "${archivesBaseName}" | ||
pluginManager.withPlugin('java-platform') { | ||
pubName = pubName + 'Pom' | ||
} | ||
pluginManager.withPlugin('java') { | ||
pubName = pubName + 'Library' | ||
} | ||
"${pubName}"(MavenPublication) { | ||
pluginManager.withPlugin('java-platform') { | ||
from components.javaPlatform | ||
} | ||
pluginManager.withPlugin('java') { | ||
from components.java | ||
} | ||
pom { | ||
licenses { | ||
license { | ||
name = 'The GNU General Public License v3.0' | ||
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'johnniang' | ||
name = 'JohnNiang' | ||
email = '[email protected]' | ||
} | ||
publications.register('mavenJava', MavenPublication) { | ||
pom { | ||
url = 'https://github.com/halo-dev/halo' | ||
licenses { | ||
license { | ||
name = 'The GNU General Public License v3.0' | ||
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html' | ||
} | ||
scm { | ||
connection = 'scm:git:https://github.com/halo-dev/halo.git' | ||
developerConnection = 'scm:git:ssh://[email protected]:halo-dev/halo.git' | ||
url = 'https://github.com/halo-dev/halo' | ||
} | ||
developers { | ||
developer { | ||
id = 'johnniang' | ||
name = 'JohnNiang' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:https://github.com/halo-dev/halo.git' | ||
developerConnection = 'scm:git:ssh://[email protected]:halo-dev/halo.git' | ||
url = 'https://github.com/halo-dev/halo' | ||
} | ||
} | ||
} | ||
|
||
|
@@ -53,4 +40,8 @@ publishing { | |
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications.mavenJava | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters