Skip to content

CXF Codegen 1.0 Migration Guide

Francisco Mateo edited this page Dec 31, 2021 · 3 revisions

This document is meant to help you migrate your build to CXF Codegen 1.0 by providing concrete examples.

Migrating to new tasks API

Given the following example:

Groovy
cxfCodegen {
    wsdl2java {
        example {
            wsdl = file("example.wsdl")
        }
    }
}
Kotlin
cxfCodegen {
    wsdl2java {
        example {
            wsdl.set(file("example.wsdl"))
        }
    }
}

The new way using the new task type would be:

Groovy
import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java

// ...

tasks.register("example", Wsdl2Java) {
    toolOptions {
        // Must use `set()` here instead of `=` because the backing field is `final`
        wsdl.set(file("example.wsdl"))
    }
}
Kotlin
import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java

// ...

tasks.register("example", Wsdl2Java::class) {
    toolOptions {
        wsdl.set(file("example.wsdl"))
    }
}

Remember to import the custom task type or fully qualify the type.

All options available under the extension are available under the toolOptions. They are exactly the same, all options that were previously configured using the extension can be configured directly using the task.

Pages

Release Notes

Migration Guides

Clone this wiki locally