uschindler commented on issue #12307: URL: https://github.com/apache/lucene/issues/12307#issuecomment-1762818363
> @uschindler If fat JARs are not supported or recommended with Lucene, what _is_ the recommended way to deploy a project incorporating Lucene? I cannot find any resources on this topic in Lucene's documentation. Is there an example deployment which users can be directed to? If you want to create Fat JARs, you need to make sure that the following is correctly included: - All classes in `META-INF/versions/**` - All service provider files need to be merged (this is important if you inlcude multiple JAR files from Lucene into one. If you do not do this it will complain about missing codecs, depending on which order the Fat JAR was packaged. If you use Maven, you can use the Maven Shade plugin with the following configuration (log4j2 is affected by the same problems): https://stackoverflow.com/questions/53049346/is-log4j2-compatible-with-java-11/54713830#54713830 See also official Maven Shade plugin documentation about ResourceTransformers (https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html) and also check this issue (https://issues.apache.org/jira/browse/MSHADE-385). You also need to pass the Manifest option "Multi-Release: true", otherwise Java won't detect your Fat JAR as containing multiple classfile versions. Finally, as Fat JARs are incompatible with The Java Module System, we do not recommend to package Fat JARs. To deploy applications use the Java module system with named modules and put them into the module-path when running Java. This can also be done by crafting correct Manifest options. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org