File tree Expand file tree Collapse file tree
build-logic/src/main/kotlin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ publishing {
2828 }
2929}
3030
31+ if (project.hasProperty(" release" )) {
32+ tasks.withType<Jar >().configureEach {
33+ from(tasks.named(" generatePomFileForMavenPublication" )) {
34+ include(" pom-default.xml" )
35+ eachFile { this .path = " META-INF/maven/${project.group} /${project.name} /pom.xml" }
36+ }
37+ }
38+ }
39+
3140// Use afterEvaluate to ensure properties are accessed after they've been set
3241afterEvaluate {
3342
@@ -38,11 +47,11 @@ afterEvaluate {
3847 publishing {
3948 publications {
4049
41- // Only create staging- maven publication for projects that should be published
50+ // Only create maven publication for projects that should be published
4251 if (project.name !in excludedProjects) {
4352
4453 // This publication is used for staging and deployment to Maven Central by JReleaser
45- create<MavenPublication >(" staging- maven" ) {
54+ create<MavenPublication >(" maven" ) {
4655 if (project.plugins.hasPlugin(" authmgr-bundle" )) {
4756 from(components[" shadow" ])
4857 // Shadow component doesn't include javadoc and sources jars by default, so add them
Original file line number Diff line number Diff line change @@ -72,7 +72,5 @@ tasks.named<RatTask>("rat").configure {
7272}
7373
7474afterEvaluate {
75- publishing {
76- publications { named<MavenPublication >(" staging-maven" ) { pom { packaging = " pom" } } }
77- }
75+ publishing { publications { named<MavenPublication >(" maven" ) { pom { packaging = " pom" } } } }
7876}
You can’t perform that action at this time.
0 commit comments