Skip to content
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

[MSHADE-366] "Access denied" during 'minimizeJar' #161

Merged
merged 4 commits into from Oct 20, 2022

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Oct 20, 2022

Follow-up on #104 and #83.
JIRA: https://issues.apache.org/jira/browse/MSHADE-366

The fact that the build output directory has to be handled is legit because the minifier calls project.getRuntimeClassPathElements() which returns a list of the project output dir and all dependencies jars. It has to be handled specifically. Any other directory will print a warning as currently.

It could be considered to switch the call to project.getRuntimeClassPathElements() to another call but that seems out of scope for this bug fix PR.

JanMosigItemis and others added 3 commits October 20, 2022 16:38
Now ignoring directories when scanning the classpath for services.
- Simplify Jan's solution from apache#83 in order to use 'continue' instead of
  nested 'if-else'.
- Factor out two helper methods from 'removeServices', because that
  method was way too big to still be readable.
- DRY-refactor Jan's new test cases into one checking two conditions.
- do not ignore directories, print a warning as before
- ignore the project's build output directory which is always returned by getRuntimeClassPathElements()
@gnodet gnodet added this to the 3.4.1 milestone Oct 20, 2022
@gnodet gnodet added the bug label Oct 20, 2022
@gnodet gnodet merged commit 41bd72f into apache:master Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants