且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

缺少cxf.xml?在maven中失败,在Eclipse中工作

更新时间:2023-08-22 17:37:04

这似乎是正确的解决方案,我在确切的时候发现了一些Spring库的问题是使用Maven Shade插件:

It seems the correct fix for this, which I discovered when I had the exact same problem with some Spring libraries, is to use the Maven Shade plugin:

http://maven.apache.org/plugins/maven-shade-plugin/

因为几个cxf - * jars中包含相同名称的文件(例如META-INF / cxf / cxf.xml),正常的jar-with-dependencies构建将包含第一个,然后忽略它找到的所有后续的重复。 shade插件会将这些文件连接在一起,因此最终会在最后包含一个包含所需条目的大文件。

Because several cxf-* jars have files in them with the same names (eg META-INF/cxf/cxf.xml) a normal jar-with-dependencies build will include the first one, and then ignore all subsequent ones it finds as 'duplicate'. The shade plugin will concatenate these files together, so you end up with one large file at the end that contains all of the entries that you needed.