Exclude not available in java-platform constraints?


I’ve tried to transform a currently manually written bom to a gradle java-platform plugin project. Now I see a error when trying to add exclusions to those contraints:

        api ("org.apache.cactus:cactus.core.framework.uberjar.javaEE.15:1.8.1") {
            exclude group: "*", module: "*"

> Could not find method exclude() for arguments [{group=*, module=*}] on constraint org.apache.cactus:cactus.core.framework.uberjar.javaEE.15:1.8.1, attributes=null of type org.gradle.api.internal.artifacts.dependencies.DefaultDependencyConstraint.

the described jar is a ueber jar, in fact it should not have any dependencies, but still the meta-data is as it is and lists all included dependencies.
In our hand written BOM we could describe the exclusions and no consuming build had to care about them. Is this possible or a planned feature for java-platforms?

kind regards

Did you ever find a resolution? I have the same issue.

You could do

api ("org.apache.cactus:cactus.core.framework.uberjar.javaEE.15:1.8.1") {
   transitive = false