grails-web-taglib:4.1.0.M3 bad JAR file structure breaks sitemesh layouts when running via JAR
mahileeb opened this issue · 1 comments
mahileeb commented
The grails-web-taglib 4.1.0.M3 jar has two META-INF/grails.factories entries in the zip manifest:
Archive: /Users/leebutts/.gradle/caches/modules-2/files-2.1/org.grails/grails-web-taglib/4.1.0.M3/5336cff5cb5d53b6ae06611d5dbeb281dd7335b0/grails-web-taglib-4.1.0.M3.jar
Zip file size: 34973 bytes, number of entries: 47
...
-rw-r--r-- 2.0 unx 137 b- defN 20-Dec-14 17:04 META-INF/grails.factories
...
-rw-r--r-- 2.0 unx 183 b- defN 20-Dec-14 17:04 META-INF/grails.factories
47 files, 64608 bytes uncompressed, 27503 bytes compressed: 57.4%
The first smaller grails.factories is missing
org.grails.taglib.encoder.OutputContextLookup=org.grails.web.taglib.encoder.WebOutputContextLookup
This causes sitemesh layouts to fail when running via the executable jar (WebOutputContextLookup is not loaded so DefaultOutputContextLookup is used) but it works via run-app which for some reason will load the second entry.
mahileeb commented
Workaround is to add a copy of the correct grails.factories file to src/main/resources/META-INF