diff --git a/buildSrc/src/main/java/org/springframework/gradle/maven/MavenPublishingConventionsPlugin.java b/buildSrc/src/main/java/org/springframework/gradle/maven/MavenPublishingConventionsPlugin.java index b799095f40..d82b6d9436 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/maven/MavenPublishingConventionsPlugin.java +++ b/buildSrc/src/main/java/org/springframework/gradle/maven/MavenPublishingConventionsPlugin.java @@ -6,8 +6,6 @@ import org.gradle.api.Project; import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.plugins.JavaPluginExtension; import org.gradle.api.publish.PublishingExtension; -import org.gradle.api.publish.VariantVersionMappingStrategy; -import org.gradle.api.publish.VersionMappingStrategy; import org.gradle.api.publish.maven.MavenPom; import org.gradle.api.publish.maven.MavenPomDeveloperSpec; import org.gradle.api.publish.maven.MavenPomIssueManagement; @@ -25,20 +23,7 @@ public class MavenPublishingConventionsPlugin implements Plugin { public void execute(MavenPublishPlugin mavenPublish) { PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class); publishing.getPublications().withType(MavenPublication.class) - .all((mavenPublication) -> { - mavenPublication.versionMapping(new Action() { - @Override - public void execute(VersionMappingStrategy versionStrategy) { - versionStrategy.usage("java-runtime", new Action() { - @Override - public void execute(VariantVersionMappingStrategy mappingStrategy) { - mappingStrategy.fromResolutionResult(); - } - }); - } - }); - MavenPublishingConventionsPlugin.this.customizePom(mavenPublication.getPom(), project); - }); + .all((mavenPublication) -> MavenPublishingConventionsPlugin.this.customizePom(mavenPublication.getPom(), project)); MavenPublishingConventionsPlugin.this.customizeJavaPlugin(project); } });