Fix attribute matching when populating int test Maven repository

See gh-49396
This commit is contained in:
Andy Wilkinson
2026-03-06 07:47:59 +00:00
parent 66554ec811
commit 3aa714572b
@@ -165,6 +165,8 @@ public class MavenPluginPlugin implements Plugin<Project> {
repositoryContents.extendsFrom(
project.getConfigurations().getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME),
project.getConfigurations().getByName("mavenRepository"));
repositoryContents.attributes((attributes) -> attributes.attribute(DocsType.DOCS_TYPE_ATTRIBUTE,
project.getObjects().named(DocsType.class, "maven-repository")));
repositoryContents.setCanBeConsumed(false);
TaskProvider<ResolvedConfigurationMavenRepository> populateMavenRepository = project.getTasks()
.register("populateResolvedDependenciesMavenRepository", ResolvedConfigurationMavenRepository.class,