ciscoo / cxf-codegen-gradle

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

Ensure documentation examples are tested #5

Closed DiesDasJenes closed 3 years ago

DiesDasJenes commented 3 years ago

Aloha,

i've found a mismatch in the documentation between the kotlin examples. I tried the kotlin examples in gradle 6.7 and had to change the code.

In the chapter "3. Generating Java Sources" under section 3.1 the kotlin code example should look like this:

cxfCodegen {
    wsdl2java.create("example") {
        wsdl.set(file("path/to/example.wsdl"))
        markGenerated.set(true)
    }
}

Similar with 3.2:

cxfCodegen {
    wsdl2java.create("example") {
            wsdl.set(file("path/to/example.wsdl"))
            outputDir.set(file("$buildDir/generated-java")) 
            markGenerated.set(true) 
            packageNames.set(listOf("com.example", "com.foo.bar")) 
            asyncMethods.set(listOf("foo", "bar")) 
        }
    }
}

I don't know how 3.3 needs to look like. Great plugin btw :) I hope my proposal will help newbies like me with their gradle setup.

ciscoo commented 3 years ago

Thanks for raising the issue. Similar to https://github.com/ciscoo/cxf-codegen-gradle/issues/3.

I will need to ensure that the examples in the documentation are valid and tested. I also think it may be related to the way the container is defined in CxfCodegenExtension.

ciscoo commented 3 years ago

Repurposing this issue to tackle testing examples in documentation.