This repo is forked from play java hello world to reproduce a compilation error when using webjars.
- make sure you are using OpenJDK 11.0.14.x
- clone this repo
- run
sbt
thencompile
or if you don't have sbt installed locally you can run it in docker:
docker build -f Dockerfile -t broken-webjar-repro .
docker run -it --rm broken-webjar-repro:latest /bin/bash
thensbt
andcompile
.
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.