hi, I have libraries which consumes and also contr...
# community-support
v
hi, I have libraries which consumes and also contributes internal Maven BOM (and Gradle module metadata). therefore I got circular dependency on the BOM when I inspect the Gradle Scan. I have a very simply plugin to set up the Maven publishing
Copy code
public class JavaMavenPublishPlugin implements Plugin<Project> {

    @Override
    public void apply(Project project) {
        project.getPluginManager().apply(MavenPublishPlugin.class);

        project.getPluginManager().withPlugin("java", appliedPlugin -> setupPublishing(project, "java"));
        project.getPluginManager().withPlugin("java-platform", appliedPlugin -> setupPublishing(project, "javaPlatform"));


        Task publishToMavenLocal = project.getRootProject().getTasks().findByName(MavenPublishPlugin.PUBLISH_LOCAL_LIFECYCLE_TASK_NAME);
        if (publishToMavenLocal != null) {
            publishToMavenLocal.dependsOn(MavenPublishPlugin.PUBLISH_LOCAL_LIFECYCLE_TASK_NAME);
        }
    }

    private void setupPublishing(Project project, String component) {
        project.getExtensions().configure(PublishingExtension.class, p -> {
            p.publications(pub -> {
                pub.create("mavenJava", MavenPublication.class, maven -> {
                    maven.from(project.getComponents().getByName(component));
                });
            });
        });
    }

}
I wonder if there is a way how can I exclude the internal bom (
agorapulse-bom
) from the published dependencies for both Maven BOM and Gradle module metadata files, ideally inside the publishing plugin above