On Thursday, 22. April 2025, 14:09:45 CEST Olivier Cailloux wrote: > Thanks to all for all your answers!
[snip] > Maven 4 should make zip dependencies a real dependency, meaning, > appearing on the CP. I fail to see a rationale for diverging. If some > users use zip type dependencies for doing something else than having > stuff appear on the classpath, well, they are misusing the dependency > mechanism. Better understand their use cases and provide those users > with better options to solve them. Or, by coherence, Maven should > provide people with a general mechanism (that applies to all types of > dependencies) to say “I depend on this artifact but I do not really > want to have it in my CP”. > > Again, this is just my 2 cents. So, then you get my two cents: I don't know who originally had that stupid idea to add ZIP files to the CP, but a ZIP file is a simple archive and that definition lasts the origins of Java (1989 vs. 1995). Already at that time a ZIP file was an established file format used to compress and pack files together. It's fine that a jar file uses also the ZIP format, but it has enhanced information for the Java ecosystem with the stuff in META-INF. What shall a plain ZIP file in the class or even the module path? Assigning it an automatic module name? Even worse, adding it to the CP also means supporting transitive deps. I know so many projects that generate ZIP files for some kind of resources as attached artifacts .. and they suddenly also inject transitive deps when they are consumed? That was already a bad idea for the ejb-client.jar. I did not find a way to search the Maven repo for zipü packaging containing META_INF/MANIFEST.MF, but I doubt you'd find a lot. On top, although Maven supports Java as first citizen member, it it by far not the only ecosystem that depends on Maven's transitive deps with the current behavior for ZIP files. If you change this behavior for Maven 4 (even with the possibility to turn it off), this list will have a lot of fun with support... Again, these are my two cents. Regards, Jörg