Jetty Notifier

Listener to send notifications for Jetty 7/8/9

License

License

Categories

Categories

Jetty Container Application Servers
GroupId

GroupId

fr.jcgay.server-notifier
ArtifactId

ArtifactId

jetty-notifier
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Jetty Notifier
Listener to send notifications for Jetty 7/8/9

Download jetty-notifier

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
fr.jcgay.send-notification : send-notification jar 0.3

provided (1)

Group / Artifact Type Version
org.eclipse.jetty : jetty-util jar 7.6.15.v20140411

test (5)

Group / Artifact Type Version
org.codehaus.groovy : groovy jar 2.4.1
org.assertj : assertj-core jar 1.7.1
junit : junit jar 4.12
org.mockito : mockito-core jar 2.0.5-beta
org.slf4j : slf4j-simple jar 1.7.12

Project Modules

There are no modules declared in this project.

#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