You've got a circular dependency, which raises all kinds of red flags. The first thing I would suggest doing is to figure out a way to package your ears so that they aren't dependent on each other. Having said that, the "ear-subdeployments-isolated" tag only works within a single ear - it doesn't make classes globally visible across all deployments. You would need to also add a jboss-deployment-structure.xml to your dependencies ear and make it dependent on your main application. You should really try to resolve the circular dependency though.
You would need to also add a jboss-deployment-structure.xml to your dependencies ear and make it dependent on your main application.
I can not do this because I'm getting "module not found" error in case when I try to deploy dependencies.
Is it possible to do bidirectional library sharing?
2 of 2 people found this helpful
The only way that I can think of how to accomplish what you want is to remove the jar from the application ear, and then put that into a wildfly module. You would then need to make both ears dependent on that module.
I am guessing that your code repository still has things set up with circular dependencies at compile-time though. Ideally, the best thing to do is to refactor the code to resolve it.