civiform / broken-webjar-repro

demonstrating a compiler problem with webjars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java compilation error repro based on Play hello world sample

This repo is forked from play java hello world to reproduce a compilation error when using webjars.

Reproduction steps

  1. make sure you are using OpenJDK 11.0.14.x
  2. clone this repo
  3. run sbt then compile

or if you don't have sbt installed locally you can run it in docker:

  1. docker build -f Dockerfile -t broken-webjar-repro .
  2. docker run -it --rm broken-webjar-repro:latest /bin/bash then sbt and compile.

Bug details

The bug occurs for OpenJDK 11.0.14.x but not 11.0.10.x

The bug appears when including the "org.webjars.npm" % "azure__storage-blob" % "10.5.0" library dependency. Including other webjars, including other webjars from azure, do not cause a compilation error.

When azure__storage-blob is included, Java presents a compilation error message ZIP file can't be opened as a file system because an entry has a '.' or '..' element in its name for every package name component in the project. E.g.

[error] /home/bionj/dev/civiform/universal-application-tool-0.0.1/app/auth/AccountNonexistentException.java:1:1: cannot access auth
[error]   ZIP file can't be opened as a file system because an entry has a '.' or '..' element in its name
[error] /home/bionj/dev/civiform/universal-application-tool-0.0.1/app/auth/oidc/AdOidcProvider.java:1:1: cannot access auth.oidc
[error]   ZIP file can't be opened as a file system because an entry has a '.' or '..' element in its name
[error] /home/bionj/dev/civiform/universal-application-tool-0.0.1/app/auth/saml/InvalidSamlProfileException.java:1:1: cannot access auth.saml
[error]   ZIP file can't be opened as a file system because an entry has a '.' or '..' element in its name

The error message looks like it is coming from a bugfix introduced to OpenJDK here.

About

demonstrating a compiler problem with webjars

License:Creative Commons Zero v1.0 Universal


Languages

Language:HTML 46.7%Language:CSS 38.4%Language:Java 11.9%Language:Dockerfile 1.8%Language:Scala 1.0%Language:Shell 0.4%