ciscoo / cxf-codegen-gradle

Gradle plugin to generate Java artifacts from WSDL
Apache License 2.0
28 stars 6 forks source link

Does not work with Gradle 5.6.4 #3

Closed jandsu closed 3 years ago

jandsu commented 3 years ago

Sample setup does not seem to work with Gradle 5.6.4 (although the version is listed in the user doc).

The same setup works with Gradle 6.8.3

./gradlew --version

------------------------------------------------------------
Gradle 5.6.4
------------------------------------------------------------

Build time:   2019-11-01 20:42:00 UTC
Revision:     dd870424f9bd8e195d614dc14bb140f43c22da98

Kotlin:       1.3.41
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM:          1.8.0_282 (Azul Systems, Inc. 25.282-b08)
OS:           Linux 5.4.0-66-generic amd64

Used the documented example:

plugins {
    id "io.mateo.cxf-codegen" version "1.0.0-rc.2"
}

[... rest omitted for brievety ....]

cxfCodegen {
    wsdl2java {
        example {
            wsdl = file("path/to/example.wsdl")
        }
    }
}

Does not seem to recognize the named container...

./gradlew tasks

FAILURE: Build failed with an exception.

* Where:
Build file '/home/jan/code/lx2010/cxf-soap-pon-client/build.gradle' line: 64

* What went wrong:
A problem occurred evaluating root project 'cxf-soap-pon-client'.
> Could not find method pon() for arguments [build_bwt4n5rvzv7rixj8burlaw9lr$_run_closure7$_closure10$_closure11@127ab9bb] on task ':wsdl2java' of type org.gradle.api.DefaultTask.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
ciscoo commented 3 years ago

Can you try with the following changes:

cxfCodegen {
-   wsdl2java {
+   wsdl2java.configure {
        example {
            wsdl = file("path/to/example.wsdl")
        }
    }
}
ciscoo commented 3 years ago

As mentioned in the docs: https://ciscoo.github.io/cxf-codegen-gradle/docs/1.0.0-rc.2/user-guide/#supported-gradle-versions

All examples are written for Gradle 6.8.3. Depending on your Gradle version, you may need to adapt the syntax.

Adapted syntax is given above.