Force war task to put activation.jar in WEB-INF/lib

(Thad Humphries) #1

I’m building a Java web app with Gradle 4.10.2 and Java 8. The resulting WAR file will be deployed to Tomcat running in Java 11. Java 11 does not have javax.activation so I’ll need activation-1.1.1.jar in WEB-INF/lib for my app to work. However since Java 8 includes javax.activation, the WAR does not include activation-1.1.1.jar even when it’s a compile target. How to I force my WAR to build with WEB-INF/lib/activation-1.1.1.jar?

(Thad Humphries) #2

Found it. In war, put:

  from("libs") {

Sorry. I tried this once but must have been looking at the wrong tree.

(Thad Humphries) #3

As just including is as a compile dependency. Argh! Yes, wrong tree in editor.