Closed rain-on closed 3 years ago
The problem's due to the gradle-jpi-plugin
creating a detached configuration and copying dependencies from another configuration to it. Detached configurations are invisible to other plugins so the dependency management plugin does not get a chance to apply its resolution strategy that would influence the dependency versions.
Unfortunately, there's nothing that can be done in this plugin to avoid the problem. With the gradle-jpi-plugin
in its current form, anything that uses a resolution strategy to provide dependency versions will be broken by it.
Awesome - thanks for the help - will stop attempting to find ways around it :)
When creating a project using both this plugin, and also (https://github.com/jenkinsci/gradle-jpi-plugin).
The generateLicenseInfo task (from the jenkins plugin) fails, as no version information is found for 'implementation' packages.
It looks like this is because jenkins Plugin creates a configuration which extends the Implementation configuration, at which time no version info exists, as its appended later by the dependency-management plugin).
There may be a useful work around - but can't work out how.
Example code can be found at https://github.com/OctopusDeploy/octopus-jenkins-plugin/pull/113.
Run ./gradlew build - and it should fail on the generateLicenseInfo task