You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "reckart (via GitHub)" <gi...@apache.org> on 2026/08/18 07:58:14 UTC
[I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
reckart opened a new issue, #12759:
URL: https://github.com/apache/maven/issues/12759
### Affected version
4.0.0-rc6
### Bug description
I have configured a pre-commit hook in one of my projects with runs `spotless:apply` to check formatting before a commit. When this hook is exercised via Sourcetree, then I get gatekeeper warnings about the jiline native library.
In Maven 4.0.0-rc5, it was possible to remove the quarantine flag from the libraries in the `lib/jline-native/Mac` folder and the problem went away.
Since Maven 4.0.0-rc6, there is no `lib/jline-native/Mac` anymore and the problem is back.
Workaround: copy the `lib/jline-native/Mac` from 4.0.0-rc5 to the 4.0.0-rc6 folder. Then the gatekeeper warnings disappear again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #12759:
URL: https://github.com/apache/maven/issues/12759#issuecomment-5416369865
The next JLine release (4.4.0) will ship with properly **signed** macOS native libraries — Apple `codesign` with Developer ID certificate and hardened runtime (jline/jline3#2173, merged yesterday). This means Gatekeeper will accept the binaries even with the quarantine flag.
Once JLine 4.4.0 is released, we can bump the JLine version in Maven and **re-include the Mac native libraries** in the distribution (remove the `<excludes>org/jline/nativ/Mac/**</excludes>` added in #10747). Signed binaries won't trigger Gatekeeper regardless of how Maven is launched (terminal, Sourcetree, or any other GUI app).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on issue #12759:
URL: https://github.com/apache/maven/issues/12759#issuecomment-5393539432
@reckart can you reproduce it also with 3.10.0-rc-1?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #12759:
URL: https://github.com/apache/maven/issues/12759#issuecomment-5334040232
This is a known side-effect of the fix for #10747 (commit f81a828777), which intentionally excluded the Mac native binaries from the distribution:
```xml
<excludes>org/jline/nativ/Mac/**</excludes>
```
The rationale was that when Maven's archive is downloaded and extracted, macOS applies the `com.apple.quarantine` extended attribute to all files. The pre-extracted `.jnilib` files in `lib/jline-native/Mac/` got quarantined, triggering Gatekeeper popups. By removing them, JLine falls back to extracting the native library from the JAR at runtime — which in a **terminal** context doesn't inherit the quarantine flag.
However, in your scenario (Sourcetree launching Maven via a pre-commit hook), this fix actually made things **worse**:
| Version | Behavior | Workaround |
|---------|----------|------------|
| **rc-5** | Pre-extracted Mac natives exist, get quarantined on download | `xattr -d com.apple.quarantine lib/jline-native/Mac/**` — **permanent fix** |
| **rc-6** | Mac natives removed, JLine extracts from JAR to temp dir each launch | **None** — fresh temp extraction each time, quarantine reapplied each time |
When Maven is launched from a GUI app like Sourcetree, the JLine JAR itself is quarantined, and files extracted from it to the temp directory inherit the quarantine attribute on every invocation — so there's no way to permanently clear it.
Your workaround of copying the cleared `Mac/` folder from rc-5 works because JLine finds the pre-extracted native first (with quarantine already cleared) and skips the JAR fallback entirely.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "reckart (via GitHub)" <gi...@apache.org>.
reckart commented on issue #12759:
URL: https://github.com/apache/maven/issues/12759#issuecomment-5392632045
Then I didn't get why #10747 removed the pre-extracted Mac files from disk.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #12759:
URL: https://github.com/apache/maven/issues/12759#issuecomment-5388517163
@reckart No, the workaround (copying back the `Mac/` folder and clearing the quarantine flag) should work on **both** Sonoma and Sequoia. Our comment didn't intend to distinguish between the two.
The Sequoia vs Sonoma Gatekeeper difference is about the **GUI bypass flow**, not the quarantine attribute itself:
- **Sonoma (14):** you could Ctrl+click → Open to bypass Gatekeeper for unnotarized code
- **Sequoia (15):** that override was removed — you must go to System Settings → Privacy & Security → "Open Anyway" (within 1 hour of the first warning)
But the `xattr -d com.apple.quarantine` terminal command works identically on both. So the pre-extracted workaround (copy `lib/jline-native/Mac/` from rc-5 and clear quarantine) is valid regardless of macOS version.
The core issue here is that in rc-6, there's **no file to clear the quarantine from** — JLine re-extracts the native lib from the JAR to a fresh temp path on every invocation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on issue #12759:
URL: https://github.com/apache/maven/issues/12759#issuecomment-5393514158
> Then I didn't get why [#10747](https://github.com/apache/maven/issues/10747) removed the pre-extracted Mac files from disk.
https://github.com/apache/maven/issues/10747#issuecomment-4330122531
> The on-demand unpacking does not lead to setting the quarantine flag in Mac OS so it doesn't trigger the Mac OS warning.
it is not true?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "reckart (via GitHub)" <gi...@apache.org>.
reckart commented on issue #12759:
URL: https://github.com/apache/maven/issues/12759#issuecomment-5338766727
@gnodet you're saying the pre-extracted workaround works only on macOS Sonoma but will fail on macOS Sequoia?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Gatekeeper warning for jline native library when running precommit hook in Sourcetree [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #12759: Gatekeeper warning for jline native library when running precommit hook in Sourcetree
URL: https://github.com/apache/maven/issues/12759
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org