ciscoo / cxf-codegen-gradle

Gradle plugin to generate Java artifacts from WSDL
Apache License 2.0
26 stars 6 forks source link
cxf gradle wsdl2java

= CXF Codegen image:https://github.com/ciscoo/cxf-codegen-gradle/workflows/CI/badge.svg?branch=master["Build Status", link="https://github.com/ciscoo/cxf-codegen-gradle/actions?query=workflow%3ACI"]

CXF Codegen is a Gradle plugin port of the https://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html[CXF Codegen Maven plugin].

== Getting Started

The plugin is https://central.sonatype.com/[published to Maven Central] and can be applied using the https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block[plugins DSL] block:

NOTE: The plugin was previously published to the Gradle Plugin portal, but switched to publishing to Maven Central primarily to track download statistics which the Gradle Plugin portal https://github.com/gradle/plugin-portal-requests/issues/2[does not provide].

++++

Kotlin ++++ [source,kotlin] ---- plugins { java id("io.mateo.cxf-codegen") version "2.4.0" } ---- ++++

++++

++++

Groovy ++++ [source,groovy] ---- plugins { id "java" id "io.mateo.cxf-codegen" version "2.4.0" } ---- ++++

++++

NOTE: The Gradle plugin proxies Maven Central, so you should not need to configure Maven Central as a plugin repository.

== Documentation

== Snapshots

Snapshots of the next development version are published to the Sonatype OSSRH snapshot repository.

Documentation for snapshots:

Snapshots are published for every commit to the master branch.

++++

Kotlin ++++ [source,kotlin] ---- // build.gradle.kts plugins { java id("io.mateo.cxf-codegen") version "2.4.1-SNAPSHOT" } // settings.gradle.kts pluginManagement { repositories { gradlePluginPortal() maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") mavenContent { snapshotsOnly() } } } } ---- ++++

++++

++++

Groovy ++++ [source,groovy] ---- // build.gradle plugins { id "java" id "io.mateo.cxf-codegen" version "2.4.1-SNAPSHOT" } // settings.gradle pluginManagement { repositories { gradlePluginPortal() maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") mavenContent { snapshotsOnly() } } } } ---- ++++

++++

== Building from Source

You will need Java 17 to build CXF Codegen.

TIP: A compatible Java installation will automatically be downloaded by Gradle if you do not have one. See https://docs.gradle.org/current/userguide/toolchains.html[Toolchains for JVM projects] for more details.

The plugin can be built and published to your local Maven cache using the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Gradle Wrapper].

[source,bash]

./gradlew :cxf-codegen-gradle:publishToMavenLocal

This will build and publish it to your local Maven cache. It won't run any of the tests. If you want to build everything, use the build task:

[source,bash]

./gradlew build