Server Notifier

Listeners to send notifications when your favorite app container start

License

License

GroupId

GroupId

fr.jcgay.server-notifier
ArtifactId

ArtifactId

server-notifier
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

pom
Description

Description

Server Notifier
Listeners to send notifications when your favorite app container start
Source Code Management

Source Code Management

https://github.com/jcgay/server-notifier

Download server-notifier

Filename Size
server-notifier-0.1.pom 5 KB
Browse

How to add to project

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

Dependencies

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

Project Modules

  • tomcat-notifier
  • jetty-notifier

#Server Notifier

A collection of desktop notifications for your webapp containers (Tomcat, Jetty) to indicate when it has started or stopped.

Configuration

Notifications are based on send-notification, you should visit its wiki to find which notifier you want to use and how to configure it.
By default it will try to use Growl for Windows, OSX and notify-send for Linux.

Tomcat 7/8

Installation

  • Get tomcat-notifier and copy it in $CATALINA_HOME/lib

  • Configure a new listener in $CATALINA_HOME/conf/Catalina/[host]/[application].xml (ie context.xml) or in $CATALINA_HOME/conf/server.xml depending if you want a notification for just a webapp or for the server globally

    <Listener className="fr.jcgay.servernotifier.tomcat.TomcatNotifierListener" />
    
  • Choose a SLF4J binding to configure logging and copy it in $CATALINA_HOME/lib (you can take slf4j-simple)

You can find example of context.xml or server.xml in example-webapp.

Usage with Maven plugin

Add plugin in pom.xml:

    <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
            <contextFile>src/tomcat/context.xml</contextFile>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>fr.jcgay.server-notifier</groupId>
                <artifactId>tomcat-notifier</artifactId>
                <version>0.1</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>1.7.12</version>
            </dependency>
        </dependencies>
    </plugin>

with context.xml minimal configuration:

<?xml version='1.0' encoding='utf-8'?>
<Context>
	<Listener className="fr.jcgay.servernotifier.tomcat.TomcatNotifierListener" />
</Context>

Jetty 7/8/9

Installation

  • Get jetty-notifier and copty it in $JETTY_HOME/lib/ext

  • Configure a new listener in $JETTY_HOME/etc/jetty.xml

     <Configure id="Server" class="org.eclipse.jetty.server.Server">
         <Call name="addLifeCycleListener">
             <Arg>
                 <New class="fr.jcgay.servernotifier.jetty.JettyNotifierListener"/>
             </Arg>
         </Call>
     </Configure>
    
  • Choose a SLF4J binding to configure logging and copy it in $CATALINA_HOME/lib (you can take slf4j-simple)

You can find example of jetty.xml in example-webapp

Usage with Maven plugin

Add plugin in pom.xml:

    <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>7.6.16.v20140903</version>
        <configuration>
            <jettyXml>src/jetty/jetty.xml</jettyXml>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>fr.jcgay.server-notifier</groupId>
                <artifactId>jetty-notifier</artifactId>
                <version>0.1</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>1.7.12</version>
            </dependency>
        </dependencies>
    </plugin>

with jetty.xml minimal configuration:

    <?xml version="1.0"?>
    <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    <Configure id="Server" class="org.eclipse.jetty.server.Server">
        <Call name="addLifeCycleListener">
            <Arg>
                <New class="fr.jcgay.servernotifier.jetty.JettyNotifierListener"/>
            </Arg>
        </Call>
    </Configure>

Build status

Build Status Coverage Status

Versions

Version
0.1