I have a large project, let's say "a.jar" which will be deployed to the WildFly (26.1.3).There are also servlets in the project, we want to have the web part separated from the main project.
So I created another deployment, let's say "b.war" which contains servlets and the corresponding web.xml.The deployment of "a.jar" was successfully deployed, but the deployment of "b.war" fails due to ClassNotFoundException (servlets use some services from the "a.jar").I found that a file "jboss-deployment-structure.xml" located in the "WEB-INF" folder of the war file could help. The content of the file:
<?xml version="1.0" encoding="UTF-8"><jboss-deployment-structure><deployment><dependencies><module name="deployment.a.jar" /><dependencies></deployment></jboss-deployment-structure>
But stil not working. Getting the same ClassNotFoundException. The dependency from "b.war" to "a.jar" has been created successfully vby runtime because I tried to misspell the name of module by purpose and I got ModuleNotFoundException: deploymentxxxx.a.jar
Any idea how to solve the problem?
Or if the initial structure of the project is incorrect, we can change also that.