jars which are in XYZ.ear.
If the jars are sub-deployments, you can specify dependencies in jboss-deployment-structure.xml in dependent ear.
E.g. ABC.ear/META-INF/jboss-deployment-structure.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="deployment.XYZ.ear.xxxx1.jar"> <!-- xxxx1.jar is a sub-deployement of XYZ.ear -->
<imports>
<include path="**"/>
</imports>
</module>
<module name="deployment.XYZ.ear.xxxx2.jar"> <!-- xxxx2.jar is a sub-deployement of XYZ.ear -->
<imports>
<include path="**"/>
</imports>
</module>
<!-- other dependencies here ... -->
</dependencies>
</deployment>
</jboss-deployment-structure>
You can check the list of sub-deployments for the ear in the WF management console: Deployments menu -> select ear -> Subdeployments.
If the jars are just libs (NOT sub-deployments), then you should be able to add the same libs to ABC.ear.