Skip to content

Commit b29bebb

Browse files
authored
Drop the POM-only repository of three plugins no build resolves any more (#16926)
1ef2084 (#16915) added an exclusive repository for gradle-sdkvendor-plugin, nohttp-gradle and gradle-use-latest-versions-plugin, whose POMs claim Gradle module metadata that was never published, so that resolving them sends no request for the missing .module file to repo.grails.org. On 7.x and 8.0.x, Forge's buildSrc depends on them, directly or through micronaut-gradle-plugins. From 8.1.x on, Forge's buildSrc is gone, and micronaut-gradle-plugins with it, so no project depends on any of the three. The sdkvendor plugin is applied through the plugins block, which resolves it from the plugin repositories, where the exclusive repository never applied. The merge of 8.0.x brought the repository here anyway, so it is removed again, and the spec expects the five dependency repositories it did before.
1 parent 48ff9cb commit b29bebb

2 files changed

Lines changed: 2 additions & 26 deletions

File tree

‎build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsRepoSettingsPlugin.groovy‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,6 @@ class GrailsRepoSettingsPlugin implements Plugin<Settings> {
118118
it.releasesOnly()
119119
}
120120
}
121-
// These plugins' POMs say Gradle module metadata was published with them, but it never was, so
122-
// Gradle requests a .module file that exists nowhere each time it resolves them without a cached
123-
// result, and a proxy repository answers that miss from upstream. Reading only their POMs,
124-
// straight from the Gradle Plugin Portal that hosts them, skips the request.
125-
repo.exclusiveContent { exclusive ->
126-
exclusive.forRepository {
127-
repo.maven {
128-
url = 'https://plugins.gradle.org/m2'
129-
metadataSources {
130-
it.mavenPom()
131-
it.ignoreGradleMetadataRedirection()
132-
}
133-
mavenContent {
134-
it.releasesOnly()
135-
}
136-
}
137-
}
138-
exclusive.filter {
139-
it.includeModule('io.sdkman', 'gradle-sdkvendor-plugin')
140-
it.includeModule('io.spring.nohttp', 'nohttp-gradle')
141-
it.includeModule('se.patrikerdes', 'gradle-use-latest-versions-plugin')
142-
}
143-
}
144121
}
145122
}
146123
}

‎build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/GrailsRepoSettingsPluginSpec.groovy‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,12 @@ class GrailsRepoSettingsPluginSpec extends Specification {
5656
List<String> repositories = urls(result, 'DEPENDENCY_REPOSITORIES')
5757

5858
then:
59-
repositories.size() == 6
59+
repositories.size() == 5
6060
repositories[0].startsWith(MAVEN_CENTRAL)
6161
repositories[1].startsWith(GRAILS_RESTRICTED)
6262
repositories[2].startsWith(APACHE_SNAPSHOTS)
6363
repositories[3].startsWith(SONATYPE_SNAPSHOTS)
6464
repositories[4].startsWith(APACHE_STAGING)
65-
repositories[5].startsWith(PLUGIN_PORTAL)
6665
}
6766

6867
void 'plugin repositories start with Maven Central and the plugin portal'() {
@@ -96,7 +95,7 @@ class GrailsRepoSettingsPluginSpec extends Specification {
9695
List<String> pluginRepositories = urls(result, 'PLUGIN_REPOSITORIES')
9796

9897
then:
99-
dependencyRepositories.size() == 7
98+
dependencyRepositories.size() == 6
10099
dependencyRepositories[0].startsWith('file:')
101100
dependencyRepositories[1].startsWith(MAVEN_CENTRAL)
102101
dependencyRepositories[2].startsWith(GRAILS_RESTRICTED)

0 commit comments

Comments
 (0)