Jboss : Can you add a static module that has a dependency in the deployed war?

Discussão em 'StackOverflow' iniciado por Stack, Julho 8, 2021.

  1. Stack

    Stack Membro Participativo

    Here is my issue :

    1. I receive OutsidersWork.war from someone.
    2. I do work on a myWork.jar which requires classes from OutsidersWork.war (To do this I have the dependency in my pom.xml and I get it from Nexus)
    3. OutsidersWork.war also requires myWork.jar, so once I'm done working on it I have to put my myWork.jar in the libs of OutsidersWork.war before deploying it with JBOSS.

    What I would like to do : To make it simpler for me and not have to manually put myWork.jar inside A.war everytime I receive a new version of OutsidersWork.war, I want to have myWork.jar as a static module on my server (I created the folder and the module.xml file, and I modified the jboss-deployment-structure.xml of OutsidersWork.war to add the dependency).

    I think this part works as intended. But when I deploy my OutsidersWork.war, I get errors because myWork.jar can't find the dependencies (which makes sense since according to JBOSS doc, explicit dependencies are loaded before the war content).

    Is there any way to work around this ? Or is it just not possible to have a static module depend on a deployed war class.

    Hopefully someone can help me out, thanks.

    Continue reading...

Compartilhe esta Página