Add external file to payara micro application classpath

I’m using payara micro to run my war application. Because one of the services I need to access requires metro ws, I need to provide a wsit client file to the application.

When I add it inside the war, it works fine, but since I need this file to be different depending on the environment I’m deploying, I need to inject the correct one as an external dependency to the server and I only know the right one at deployment stage. Meanwhile I already created all the artifacts and the docker image.

How can I add this file to the application without opening the war adding it manually and re build the war? I’m looking for a solution like the external modules for wildly.

I tried the –addLibs but it requires a jar.

Source: StackOverflow