I would like to create a jar from the contents of WAR using gradle. The result I want is very similar to what archiveClasses = true maven-war-plugin setting does.
I understand that the gradle war plugin does not seem to do this (like this stack question) .
Is there any way to do this manually? Tell me, by manipulating the gradle jar task to collect the necessary parts from the WEB-INF folder?
When I just use the default jar task, it does not get resources from the WEB-INF directory.
The reason I want to do this is because I modulated the WAR and the modules depend on the shared resources in the WAR (FreeMarker files in my case). I want to be able to test each module, depending on the JAR created from the WAR.
I understand that I could also create a βcommonβ jar in which all resources are stored, and both the WAR and the module depend on it, but it would be more convenient to create a WAR JAR form in accordance with maven-war -plugin.
java jar gradle war
Carl Pritchett
source share