-
New Feature
-
Resolution: Done
-
Major
-
9.6.4
-
None
-
Security Level: Jimmy
-
None
-
None
User Story
As an application developer, I want to include only the necessary 3rd-party JAR in order to keep my application WAR's size small. com.google.javascript: closure-compiler-unshaded: v20220601 is too big (13MB) and contains many classes that zk doesn't really call them. It only needs CacheBuilder which also exists in Guava.
this closure-compiler contains many libraries (gson, ant, protobuf-java, guava), if an app dev wants to use a different version of one of the libraries e.g. Gson, he cannot easily override it by pom.xml. He has to exclude closure-compiler and add Gson and see a runtime error because he doesn't know he should add guava
Acceptance Criteria
include the required Guava jar only instead of closure-compiler
Alternative
2 steps:
1. exclude closure-compiler, put this under your zk dependency e.g. zkmax, zkex, zul
<exclusion> <groupId>com.google.javascript</groupId> <artifactId>closure-compiler-unshaded</artifactId> </exclusion>
2. add guava of the version below (or newer) for CacheBuilder
<dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>31.0.1-jre</version> </dependency>