Create a new project
This guide explains how to set up a new project for a Quarkus application hosting a CXF client or server or both.
Prerequisites
Please read the Prerequisites section of Quarkus getting started guide.
In addition to that, you may need
-
GraalVM with the
native-image
command installed and theGRAALVM_HOME
environment variable set. See Building a native executable section of the Quarkus documentation. -
If you are on Linux, a container runtime like
docker
is sufficient for the native mode too. Use-Pnative -Dquarkus.native.container-build=true
instead of-Pnative
if you choose this option.
Create project
New project skeletons can be generated using code.quarkus.io.
All extensions produced by Quarkiverse CXF project can be found using origin:other cxf
query.
-
Here you can select the extensions that you want to work with.
-
For a simple Hello world Web service or client the `quarkus-cxf`extension is enough.
-
Click the blue
Generate your application
button to download a basic skeleton project. -
Unpack the zip file and import the project the into your favorite IDE.
Dependency management
code.quarkus.io currently generates pom.xml
files
containing quarkus-cxf*
dependencies with version literals (see issue #651)
like the following:
...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.cxf</groupId>
<artifactId>quarkus-cxf</artifactId>
<version>1.5.17</version>
</dependency>
...
</dependencies>
...
This might become impractical, once you start adding more extensions from CXF Extensions for Quarkus or some optionals required for covering some specific use cases.
Thus we recommend to add quarkus-cxf-bom
manually:
...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.cxf</groupId>
<artifactId>quarkus-cxf-bom</artifactId>
<version>1.5.17</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.cxf</groupId>
<artifactId>quarkus-cxf</artifactId>
<!-- no version required here if you import quarkus-cxf-bom above -->
</dependency>
...
</dependencies>
...
Which Quarkus Platform versions are compatible with a given quarkus-cxf-bom
version?
Each CXF Extensions for Quarkus major.minor
version stream is compatible with some specific major.minor
stream of Quarkus.
E.g. the current stable release of CXF Extensions for Quarkus is 1.5.17.
It was tested against Quarkus 2.13.8.Final.
Hence, at the given point in time, you’ll best use the newest micro version of that Quarkus Platform stream.
The available versions of io.quarkus.platform:quarkus-bom
can be viewed on
Maven Central.