Send Notification

Easily send notification to popular tools and services

License

License

GroupId

GroupId

fr.jcgay.send-notification
ArtifactId

ArtifactId

send-notification
Last Version

Last Version

0.16.0
Release Date

Release Date

Type

Type

jar
Description

Description

Send Notification
Easily send notification to popular tools and services

Download send-notification

How to add to project

<!-- https://jarcasting.com/artifacts/fr.jcgay.send-notification/send-notification/ -->
<dependency>
    <groupId>fr.jcgay.send-notification</groupId>
    <artifactId>send-notification</artifactId>
    <version>0.16.0</version>
</dependency>
// https://jarcasting.com/artifacts/fr.jcgay.send-notification/send-notification/
implementation 'fr.jcgay.send-notification:send-notification:0.16.0'
// https://jarcasting.com/artifacts/fr.jcgay.send-notification/send-notification/
implementation ("fr.jcgay.send-notification:send-notification:0.16.0")
'fr.jcgay.send-notification:send-notification:jar:0.16.0'
<dependency org="fr.jcgay.send-notification" name="send-notification" rev="0.16.0">
  <artifact name="send-notification" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.jcgay.send-notification', module='send-notification', version='0.16.0')
)
libraryDependencies += "fr.jcgay.send-notification" % "send-notification" % "0.16.0"
[fr.jcgay.send-notification/send-notification "0.16.0"]

Dependencies

compile (11)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.25
com.google.code.findbugs : jsr305 jar 3.0.2
com.google.auto.value : auto-value-annotations jar 1.6.3
com.google.code.jgntp : jgntp jar 1.2.1
com.squareup.okhttp : okhttp jar 2.7.5
com.squareup.mimecraft : mimecraft jar 1.1.1
fr.jcgay.snp4j : snp4j jar 0.3
net.coobird : thumbnailator jar 0.4.8
com.google.guava : guava jar 18.0
com.dorkbox : Notify jar 3.7
com.profesorfalken : jPowerShell jar 3.0.4

provided (1)

Group / Artifact Type Version
com.google.auto.value : auto-value jar 1.6.3

test (8)

Group / Artifact Type Version
org.codehaus.groovy : groovy jar 2.5.6
org.spockframework : spock-core jar 1.3-groovy-2.5
cglib : cglib-nodep jar 3.2.10
org.slf4j : slf4j-simple jar 1.7.25
org.assertj : assertj-core jar 3.12.2
com.github.stefanbirkner : system-rules jar 1.19.0
com.github.tomakehurst : wiremock jar 2.22.0
org.objenesis : objenesis jar 3.0.1

Project Modules

There are no modules declared in this project.

send-notification

A toolbox in Java to send notifications.

Usage

Add dependency with your favorite build tool.

Example with Maven:

    <dependencies>
     [...]
        <dependency>
            <groupId>fr.jcgay.send-notification</groupId>
            <artifactId>send-notification</artifactId>
            <version>0.16.0</version>
        </dependency>
     [...]
    </dependencies>

Get a notifier:

    Notifier notifier = new SendNotification()
        .setApplication(application)
        .initNotifier();

The application is not mandatory, you'll get a default one if it's not set.

Then send notification:

    try {
        notifier.send(notification);
    } finally {
        notifier.close;
    }

CLI

Download bundle, extract it, add the bin directory to your $PATH.
For OS X users, you can use a brew formula here.

> send-notification -h

Usage: <main class> [options] notifier(s)
  Options:
    -h, --help
       show help
       Default: false
  * -i, --icon
       notification icon
    -l, --level
       notification level (INFO, WARNING, ERROR)
  * -m, --message
       notification message
    -s, --subtitle
       notification subtitle
  * -t, --title
       notification title
    -v, --version
       show version
       Default: false

(*) are mandatory parameters.

Example:

send-notification notifysend -m "Build success !" -t "maven-notifier" -i "success.png"

Available notifiers

Go to Wiki to read full configuration guide for each notifier.

Notifier Screenshot
Growl, for Windows and OS X. Growl
Snarl, for Windows Snarl
terminal-notifier, OS X terminal-notifier
notification center OS X (since Mavericks) notification-center
notify-send for Linux notify-send
SystemTray since Java 6 System Tray
Pushbullet pushbullet
Kdialog for KDE Kdialog
notifu for Windows notifu
AnyBar for OS X and Linux anybar
Toaster for Windows 8 toaster
Notify since Java 6 Notify
BurntToast for Windows 10 (NB must be enabled manually) BurntToast
Slack Slack

Build status

Build Status Coverage Status Quality Gate

Build

You will need Maven and a JDK 8. If your default JDK is higher than 8, Maven will use a configured toolchains.

mvn verify

Multiple VMs are available in vm for Windows, Linux and macOS to integrate with the various notifiers.

Release

mvn -B release:prepare release:perform

Versions

Version
0.16.0
0.15.1
0.15.0
0.14.0
0.13.0
0.12.0
0.11.0
0.10.2
0.10.1
0.10
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1