Server Notifier

Listeners to send notifications when your favorite app container start

Лицензия

Лицензия

Группа

Группа

fr.jcgay.server-notifier
Идентификатор

Идентификатор

server-notifier
Последняя версия

Последняя версия

0.1
Дата

Дата

Тип

Тип

pom
Описание

Описание

Server Notifier
Listeners to send notifications when your favorite app container start
Система контроля версий

Система контроля версий

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

Скачать server-notifier

Имя Файла Размер
server-notifier-0.1.pom 5 KB
Обзор

Как подключить последнюю версию

<!-- 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"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

  • 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

Версии библиотеки

Версия
0.1