-
Notifications
You must be signed in to change notification settings - Fork 403
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
Change names of files with the same path - this time by Transformer #102
base: main
Are you sure you want to change the base?
Conversation
…it can use it to modify output stream.
…t is used, both files are in final jar but with changed filename.
Hello, |
} | ||
} | ||
} else { | ||
transform(archiveFile, archive) | ||
transform(mergedJarFile.name, archiveFile, mergedJar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't mergedJar.name
work fine for this? Seems like we've made a bunch of changes that aren't really need as the information is available from the existing API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On that note, I'd prefer if you kept the changes to a minimum. The variable renames makes this a lot harder to review because it's harder to see what the actually change was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for looking at this! WRT variables naming, I was really lost with "archive", it was never clear to me if it is the .jar we are merging into fat jar, or far jar itself.
WRT redundancy, I'll look at this, but AFAIR there was no jar file path in mergedJar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to name the variable sourceJar
then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or sourceArchive
Hi, I was trying to restore the possibility to filter-out files from certain jars, a feature that was supported in the past (according to the old readme, but I never tested it):
I tried to implement this using a Transformer, but I think that this PR is required, because the transformer API does not have any information about the path or the name of the jar which the file comes from... |
The shadowJar plugin makes a single file out of all the dependencies of our services. Occasionally, this leads to file conflicts. Jackson's META-INF/LICENSE conflicts with the directory META-INF/license While we can run the shadowJars, you cannot extract them with `jar -x`, as it ends up with an IOException extracting META-INF/license. This excludes Jackson's META-INF/LICENSE, until we have a better solution, ideally with one of the proposals in the shadow jar project. See GradleUp/shadow#86 See GradleUp/shadow#102
Hello,
What about this one? ;)