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

Read the Prerequisites section of Quarkus getting started guide.

In addition to that, you may need

  • GraalVM with the native-image command installed and the GRAALVM_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.

https://code.quarkus.io
  • 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

Quarkus CXF is a part of Quarkus Platform since Quarkus Platform version 3.1.0.Final. Among other things, this means that code.quarkus.io and other Quarkus development tools generate projects with proper dependency management:

<project ...>
  ...
  <properties>
    ...
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version><!-- Check the latest https://repo1.maven.org/maven2/io/quarkus/platform/quarkus-cxf-bom/ --></quarkus.platform.version>
  </properties>
  <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>${quarkus.platform.group-id}</groupId>
        <artifactId>quarkus-cxf-bom</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
...

You should always take care to import the same version of io.quarkus.platform:quarkus-bom and io.quarkus.platform:quarkus-cxf-bom into your project. That’s the most reliable way to get compatible versions of Quarkus, CXF, Quarkus CXF and all their transitive dependencies.

Where to go next

We recommend to proceed with any of the following chapters: