Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
</instructions>
    ... 
    <Import-Package>
        javax.servlet;version="[2.6,4)", 
        org.apache.cxf.jaxrs;version="[3.1,4)",
        org.apache.cxf.cdi;version="[3.1,4)",  
        *
    </Import-Package>

    <Require-Capability>
        org.ops4j.pax.cdi.extension; filter:="(&amp;(extension=cxf-integration-cdi))",
        osgi.extender; filter:="(osgi.extender=pax.cdi)"
    </Require-Capability>
    <Web <Web-ContextPath>...</Web-ContextPath>
    <_wab>src/main/webapp</_wab>
</instructions>

The Require-Capability instruction is very important in order for CDI initialization, discovery and injections to work with Apache CXF. The Web-ContextPath is the context path for this web application to be deployed at. And _wab is the instruction  to point out the web.xml file location.