Hi Robert > On 15 Nov 2019, at 16:40, Robert Munteanu <[email protected]> wrote: > > Hi Radu, > > On Fri, 2019-11-15 at 16:36 +0100, Radu Cotescu wrote: >> Hi, >> >> Builds on Java 8 fail [0] due to how I handled dependency inlining >> for SLING-8847 [1], since the sniffer plugin will also check the >> dependencies’ classes. Those classes should be inlined in the >> prepare-package phase instead of generate-resources. >> I was building locally with Java 11, hence why I didn’t see any >> issues before starting the release. > > IIUC, the error is > > [ERROR] /home/jenkins/jenkins-slave/workspace/ling-org-apache-sling- > xss_master/target/classes/org/owasp/esapi/tags/BaseEncodeTag.class:29: > Undefined reference: void > javax.servlet.jsp.tagext.BodyTagSupport.<init>()
Because I’ve inlined the dependencies’ classes in the generate-resources phase, the animal-sniffer plugin will consider those classes as part of the project. Apparently some ESAPI / XALAN code coming from our dependencies require classes outside of the JRE (e.g. the javax.servlet specification, org.apache.bcel). By default the sniffer plugin doesn’t scan dependencies, but due to the way I’ve inlined the classes they’re now considered part of the project. > > What does that mean in practical terms? Do we require Java 11? I'm a > bit confused since that method is not part of the JRE. No, we don’t. I can fix the issue for the Java 8 builds by just inlining the classes I mentioned in the prepare-package phase. Regards, Radu
