-
Notifications
You must be signed in to change notification settings - Fork 5
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
Non jar files should be excluded from the path sent to jshell #16
Comments
Hi @davidnavas ! I took a look to the source code (of my project) and I don't see any part where files that are not jars are filtered out, so maybe instead of filtering out I need to include more files, but not sure how, reading from another variable maybe? feel free to create a PR and I can test whether it breaks other builds, or you can point me where you think in the code the filtering happens. |
Hey! Yes, that's absolutely correct, your project doesn't filter non-jar files. It's not a big deal, as the whole reason why hk2-jar (which isn't a jar) is included is a gradle/ha-api packaging issue, just thought you should know that jshell complains loudly when the classpath includes non-jars. That said, I can create a PR if you want. I was just going to put that "pathSet..." line prior to line 66 of JShellPlugin.groovy. |
Ooh right, right, sorry I did understand the opposite. Yes please if you create a PR I can review it and release tomorrow a beta version in plugins.gradle.org |
It's been ... awhile since I used github. Let's hope I get this right :> |
Let me know if there's a suite of tests to run for this. I copied working code, but it's gone through a couple of copy-paste sessions. |
Hi @davidnavas , I just sent a release candidate to the Gradle Plugins repo with your patch, so please replace in your build.gradle file: id "com.github.mrsarm.jshell.plugin" version "1.2.0" With: id "com.github.mrsarm.jshell.plugin" version "1.2.1-RC6" I'm not sure though if the release is are already available or still pending of approval, just give it a try whenever you can. |
Will try when my on-duty rotation ends and let you know. Thank you very
much!
…On Sun, Jan 29, 2023 at 9:43 AM Mariano Ruiz ***@***.***> wrote:
Hi @davidnavas <https://github.com/davidnavas> , I just sent a release
candidate to the Gradle Plugins repo with your patch, so please replace in
your build.gradle file:
id "com.github.mrsarm.jshell.plugin" version "1.2.0"
With:
id "com.github.mrsarm.jshell.plugin" version "1.2.1-RC6"
I'm not sure though if the release is are already available or still
pending of approval, just give it a try whenever you can.
—
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJWT7GZB34FMCDVVIERZC3WU2T2TANCNFSM6AAAAAAT6QAI3U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@mrsarm I can confirm that 1.2.1-RC6 works great! |
Great @davidnavas ! I will release a new stable version soon before close the ticket. |
See the code
https://github.com/johnpoth/jshell-maven-plugin/blob/master/src/main/java/com/github/johnpoth/jshell/JShellMojo.java#L118
Recommended remediation for gradle plugin:
pathSet = pathSet.findAll{ it.isDirectory() || it.toString().endsWith('.jar') }
[prior to the join()]
Our specific problem is that hk2-jar (org.glassfish.ha/ha-api/3.1.12/*/ha-api-3.1.12.hk2-jar) is being pulled into our classpath, and it is not an actual jar file.
The text was updated successfully, but these errors were encountered: