You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Sentry CLI Execution Failure when using Sentry Maven plugin
3
+
description: "Troubleshoot and resolve sentry-cli execution failures when using the Sentry Maven plugin."
4
+
sidebar_order: 1001
5
+
---
6
+
7
+
The Sentry Maven plugin may fail to execute `sentry-cli` in certain environments.
8
+
9
+
## Symptoms
10
+
11
+
A build using `sentry-maven-plugin` fails during execution of `sentry-cli` (e.g. to collect and upload a source bundle).
12
+
13
+
## Solution
14
+
15
+
First, enable debug logs for both the plugin and `sentry-cli`, by setting
16
+
17
+
```xml
18
+
<debug>false</debug>
19
+
<debugSentryCli>true</debugSentryCli>
20
+
```
21
+
22
+
in your `<configuration>` for `sentry-maven-plugin`.
23
+
24
+
You might see similar lines in the logs:
25
+
26
+
```
27
+
[ERROR] Error while attempting to run Sentry CLI:
28
+
org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "/bin/sh" [...]
29
+
```
30
+
31
+
A possible solution is to add the following JVM option to switch the process launch mechanism to `vfork`:
32
+
33
+
```bash
34
+
-Djdk.lang.Process.launchMechanism=vfork
35
+
```
36
+
37
+
## Related Issue
38
+
39
+
For more details about this issue and the investigation process, see [GitHub Issue #169](https://github.com/getsentry/sentry-maven-plugin/issues/169).
40
+
41
+
If this doesn't solve the problem, please [open a issue on GitHub](https://github.com/getsentry/sentry-maven-plugin/issues/new/choose).
0 commit comments