-
-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jars should include directories #2136
Comments
Can you provide an example? |
Yeah, I created jars with so many build tools and even coded that part multiple times from scratch for various build tools. It could appear as nitpicking to argue for or against additionally explicit directory entries. I nowadays think, it's probably easier to read and probably also easier to process, when these entries are present. And when you told me, that Spring can't find resources properly when directory entries are missing, you had me. It's probably a poor implementation on their side, but nevertheless, it's inconvenient and avoidable. Only thing I am very opinionated about is, that we keep the |
I think the directories may be supposed to precede their contents, too |
Sure. That is also my assumption/understanding. That's why I pointed to the special case with |
Yeah I will. I'm writing some code to repack the current one, adding the required directories, so I'll be all practiced up. |
Move JAR creation code into separate `JarOps` object to create a `os-lib` like user experience. Added support for creating directory entries, to fix #2136 Also prepared to use fixed timestamps to assist creating reproducible jars. Added use of buffered stream when writing the file. Pull request: #2138
Hmm, I thought I was implementing this, although I like your solution better. However, you will note that if you try to add an entry like META-INF/SOMETHING_ELSE you get a collision: |
Oh, I though you will start it once you are on holiday, but I didn't realized that this means "now".
Oh, this is an oversight, as the special case |
Yeah, I had that bug first;-) |
Mill builds jars without entries for directories, but directories are cheap and allow searching for resources and are otherwise harmless and thus should be included. (Evidence suggests that maven includes them by default, supporting the claim of being benign)
The text was updated successfully, but these errors were encountered: