Request transitive dependencies by extension

Hi,

In my application I would like to declare a dependency to a Jenkins plugin (which is available as Maven artifact with ‘hpi’ packaging) and also to get its transitive dependencies. From that post: Converting from Maven to Gradle, need more specified dependencies in build.gradle or tests fail - #4 by Francois_Ritaly
I’ve learnt that such a notation could be used:

 implementation(group: 'org.jenkins-ci.plugins', name: 'nodejs', version: '1.4.0', ext: 'jar') {
        transitive = true
    }

to actually get the ‘jar’ artifact instead of ‘hpi’.

However the problem here is that some transitive dependencies are also Jenkins plugins and are resolved as ‘hpi’ not ‘jar’.
Is there any way to make ‘ext: jar’ declaration also work down in the transitivity chain?

Thank you