I am working on a gradle project that has the build-announcements plugin enabled, and it is causing the build to fail on our continuous integration VM. That machine runs Linux and has notify-send installed, but the dbus-launch binary is not installed. This causes notify-send to exit non-zero which fails the build. Based on GRADLE-1922, it seems like build-announcements should never fail the build, so I think this is a new bug. This happened with Gradle 2.7.
Log excerpt:
13:11:57,208 INFO - [org.gradle.process.internal.DefaultExecHandle] Starting process 'command '/usr/bin/notify-send''. Working directory: <redacted>/trunk/build/snapshot Command: /usr/bin/notify-send -i /home/cbsupp/.gradle/wrapper/dists/gradle-2.7-all/4ryh47z6pv2tj9n03uiw8pzc6/gradle-2.7/media/gradle-icon-32x32.png --hint=int:transient:1 Build successful 34 tasks executed
13:11:57,213 INFO - [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command '/usr/bin/notify-send''
13:11:57,619 ERROR - 13:11:57.617 [ERROR] [system.err] libnotify-Message: Unable to get session bus: Failed to execute dbus-launch to autolaunch D-Bus session
13:11:57,623 INFO - [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter]
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter]
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter] Process 'command '/usr/bin/notify-send'' finished with non-zero exit value 1
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter]
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
13:11:57,665 ERROR - 13:11:57.664 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.