Send Notification Project

Easily send notification to popular tools and services

License

License

GroupId

GroupId

fr.jcgay.send-notification
ArtifactId

ArtifactId

send-notification-project
Last Version

Last Version

0.16.0
Release Date

Release Date

Type

Type

pom
Description

Description

Send Notification Project
Easily send notification to popular tools and services
Source Code Management

Source Code Management

https://github.com/jcgay/send-notification

Download send-notification-project

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • send-notification
  • send-notification-cli

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