The thing is how to know if the JAR file is going to contain `module-info.class` or not? The inclusion of the content is delegated to ~Maven~ Plexus Archiver: ```java archiver.getArchiver().addDirectory( contentDirectory, getIncludes(), getExcludes() ); ``` And in general the idea of `ModularJarArchiver` is to be safe to be used for "regular" JAR files as well. You can think for it as an `JarArchiver` that can handle modules if needed. The old `JarArchiver` could be used where you want to treat JAR strictly as archive - such as source JAR or if you explicitly want the module descriptor to be left unmodified (but is there such use case for the JAR plugin?)
That being said I agree that would be better if we know in advance if we need `ModularJarArchiver` or `JarArchiver` based on the existance of module descriptor (at very least will make the code intention more explicit and easy to read), so if there is some acceptable way to know that I'll modify the PR. [ Full content available at: https://github.com/apache/maven-jar-plugin/pull/2 ] This message was relayed via gitbox.apache.org for devnull@infra.apache.org