'Failed to apply plugin 'no.nils.wsdl2java'. Configuration with name 'compile' not found

when migrating to gradle 7.x getting below error


* What went wrong:
An exception occurred applying plugin request [id: 'no.nils.wsdl2java', version: '0.12']
> Failed to apply plugin 'no.nils.wsdl2java'.
   > Configuration with name 'compile' not found.

Below is wsdl2java added in build.gradle


plugins {
    id("no.nils.wsdl2java") version "0.12"
    `java-library`
}

buildscript {
    dependencies {
        classpath("no.nils:wsdl2java:0.12")
    }
}

how to fix this?



Solution 1:[1]

no.nils.wsdl2java is not compatible with Gradle 7 and is no longer maintained. See the README in the project. The compile configuration has long been deprecated and was finally removed in Gradle 7.

You can use io.mateo.cxf-codegen in place of no.nils.wsdl2java. It is a Gradle port of the Maven CXF codegen plugin.

plugins {
    id "io.mateo.cxf-codegen" version "1.0.1"
}

https://github.com/ciscoo/cxf-codegen-gradle

https://ciscoo.github.io/cxf-codegen-gradle/docs/current/user-guide/


Note, I am the author of the plugin.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1