How to define which library to use.

Latest response

I have a problem with a CXF library cxf-api, which is defined in the pom.xml in my project, but also it's defined within the $JBOSS_HOME_FOLDER/modules/system/layers/base/.overlays/layer-base-jboss-eap-6.4.5.CP/org/apache/cxf/...

How can i determine if the application deployed in JBoss, should use a library defined in the pom.xml file (from the project made in Maven), or if should use the library that comes with the patch installed in the Jboss EAP. Looks like by default it uses the one configured in $JBOSS_HOME_FOLDER.


Do you mean during compile time (in which case you should use the maven repo provided by JBoss EAP) or do you mean you would like your application to use a packaged version of CXF? In which case this is possible but it's not something we support. You would need to use a jboss-deployment-structure.xml to make sure a custom module is used.

If you are not packaging CXF then it's going to use the CXF libraries that came in JBoss.

Thanks for your response Mustafa. For packaging the CXF you mean like creating a module and configuring the jboss-deployment-structure.xml and module.xml files? I did not understood quite well. Regards.

Yes, but I would not recommend packaging your own version of CXF unless there's a very good business case. JBoss provides a tested and supported version of JBossWS-CXF that you should use in your pom.xml

For example