I have one war module and I want to use the classes(want to use the methods of that class) of that module in currently working module.
I tried to use maven-war-plugin to explode the war and copy the classes in my target/classes folder. But not able to import the classes. Also tried to create the jar and copy it in my currently web-inf lib folder but still not able tot import the class
Any solution or link to solve this problem.
posted 4 years ago
I explode the war and copy the classes in target/classes folder in validate phases.
This will work, but it's the wrong way to do this. What you should do is create another Jar module with the classes that are shared, and add a dependency to the jar module in the 2 war modules. maven will build the jar and then package the jar inside both wars.