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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to