Maven POM Information

To use CXF within Maven, you'll need to declare the CXF dependencies in your POM. The CXF groupId is "org.apache.cxf". Here is a small example:


        <!-- Jetty is needed if you're are not using the CXFServlet -->

For information on using Maven with CXF and Tomcat, this blog entry may be helpful.

Additional Dependencies

Depending on your usage of CXF, you may need to bring in additional dependencies--the mvn install process will usually make clear what you are missing. Here's a non-exhaustive list of additional CXF artifacts that may be needed:

<!-- Use dependency blocks for these CXF artifact Ids just as above -->

Maven Snapshot Repository

To work with the latest non-release versions of CXF (not recommended for production use), updated nightly, change the CXF version to the -SNAPSHOT version desired and add the Apache snapshot repository to both the repositories and pluginRepositories sections:

   ...other repos...
      <name>Apache SNAPSHOT Repository</name>

   ...other repos...
      ...same repo as above...

The addition to the plugin repositories section is needed because the cxf-codegen-plugin, used for the WSDL2Java, Java2WS, etc. tasks, is downloaded using that entry.

  • No labels


  1. The java2ws plugin also supports a universal argline option that can be used to make use of functionality that is available in the ant task or command line version of java2ws.

    To have the service schema generated to a separate file you can use this:


    If you are using the genWrapperbean option, the generated sources and class files are stored in the project base directory. Using the argline option you can have the class files along with your other compiled classes using this:

    <argline>-classdir ${}</argline>