For the most part, CXF (and most any other complex spring based framework) is relatively incompatible with jar-with-dependencies due to the requirement to combine various files. I would suggest using the maven-shade-plugin instead for this. I would use our bundle pom:
http://svn.apache.org/repos/asf/cxf/trunk/distribution/bundle/all/pom.xml as a starting point. Basically, shade has the ability to apply transforms and if you look in that pom, you see we have transforms to combine various files such as the META-INF/spring.handlers, META-INF/spring.schemas, META- INF/cxf/bus-extensions.txt, etc.... Dan On Tuesday, August 23, 2011 9:37:30 AM Andrew wrote: > I have created a CXF REST client that works perfectly when I run via eclipse > or from command line, but when I package with maven, using the > jar-with-dependencies Assembly, it fails with: > > resolving resource <org.apache.cxf.wsdl11.WSDLManagerImpl/bus> type > <interface org.apache.cxf.Bus> > resolving resource <null> type <interface org.apache.cxf.Bus> > resolving resource <org.apache.cxf.workqueue.WorkQueueManagerImpl/bus> type > <interface org.apache.cxf.Bus> > resolving resource <null> type <interface org.apache.cxf.Bus> > resolving resource <org.apache.cxf.buslifecycle.CXFBusLifeCycleManager/bus> > type <interface org.apache.cxf.Bus> > resolving resource <null> type <interface org.apache.cxf.Bus> > resolving resource <org.apache.cxf.endpoint.ServerRegistryImpl/bus> type > <interface org.apache.cxf.Bus> > resolving resource <null> type <interface org.apache.cxf.Bus> > resolving resource > <org.apache.cxf.transport.http.QueryHandlerRegistryImpl/bus> type <interface > org.apache.cxf.Bus> > resolving resource <null> type <interface org.apache.cxf.Bus> > resolving resource <org.apache.cxf.headers.HeaderManagerImpl/bus> type > <interface org.apache.cxf.Bus> > resolving resource <null> type <interface org.apache.cxf.Bus> > resolving resource <org.apache.cxf.catalog.OASISCatalogManager/bus> type > <interface org.apache.cxf.Bus> > resolving resource <null> type <interface org.apache.cxf.Bus> > Unexpected error > org.apache.cxf.interceptor.Fault: No conduit initiator was found for the > namespace http://schemas.xmlsoap.org/wsdl/soap/http. > at > org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractC > onduitSelector.java:101) at > org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitS > elector.java:71) at > org.apache.cxf.jaxrs.client.ClientConfiguration.getHttpConduit(ClientConfigu > ration.java:113) at controller.util.JaxRsClient.<init>(JaxRsClient.java:46) > at > automation.setup.AutomationSetupClient.setup(AutomationSetupClient.java:70) > at > automation.setup.AutomationSetupClient.main(AutomationSetupClient.java:147) > Caused by: org.apache.cxf.BusException: No conduit initiator was found for > the namespace http://schemas.xmlsoap.org/wsdl/soap/http. > at > org.apache.cxf.transport.ConduitInitiatorManagerImpl.getConduitInitiator(Con > duitInitiatorManagerImpl.java:112) at > org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractC > onduitSelector.java:72) ... 5 more > > > The only difference between the two is the jar-with-dependencies flattens > all classes into the same folder, so only one unique file/path is allowed > and others are skipped. I see a lot of > > [INFO] META-INF/LICENSE already added, skipping > [INFO] META-INF/NOTICE already added, skipping > [INFO] META-INF/maven/ already added, skipping > [INFO] META-INF/ already added, skipping > [INFO] META-INF/MANIFEST.MF already added, skipping > [INFO] schemas/ already added, skipping > [INFO] schemas/configuration/ already added, skipping > [INFO] org/ already added, skipping > [INFO] org/apache/ already added, skipping > [INFO] org/apache/cxf/ already added, skipping > [INFO] org/apache/cxf/configuration/ already added, skipping > [INFO] org/apache/cxf/configuration/spring/ already added, skipping > > > CXF 2.3.5 does not have this issue but unfortunately I'm not able to upgrade > yet. Any ideas? Thanks, > > Andrew -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
