maven - No DestinationFactory was found for the namespace - create uber JAR of CXF with Jetty -


i want create uber jar cxf-based application server. want server commandline java -jar. in ide, can run main class com.connexta.desertcodecamp.server, not correctly creating uber jar.

when run command java -jar server-1.0-snapshot.jar,

org.apache.cxf.service.factory.serviceconstructionexception         @ org.apache.cxf.jaxrs.jaxrsserverfactorybean.create(jaxrsserverfactorybean.java:215)         @ com.connexta.desertcodecamp.server.<init>(server.java:19)         @ com.connexta.desertcodecamp.server.main(server.java:33) caused by: org.apache.cxf.busexception: no destinationfactory found namespace http://cxf.apache.org/transports/http.         @ org.apache.cxf.bus.managers.destinationfactorymanagerimpl.getdestinationfactory(destinationfactorymanagerimpl.java:122)         @ org.apache.cxf.endpoint.serverimpl.initdestination(serverimpl.java:79)         @ org.apache.cxf.endpoint.serverimpl.<init>(serverimpl.java:63)         @ org.apache.cxf.jaxrs.jaxrsserverfactorybean.create(jaxrsserverfactorybean.java:170) 

here link pom file (and github repo): https://github.com/ahoffer/desert-code-camp/blob/master/server/pom.xml

other posts reference missing dependency, cxf-rt-transports-http, have dependency in pom.xml.

solution here: apache camel - packaging executable jar , here: missing cxf.xml? fails in maven, works in eclipse.

adding transformer , magic resource configuration section of maven shade plugin fixes it:

<transformer org.apache.maven.plugins.shade.resource.appendingtransformer">     <resource>meta-inf/cxf/bus-extensions.txt</resource> </transformer> 

the resource generated plugin; not necessary create it


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -