<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>meteo</artifactId>
        <groupId>no.api.meteo</groupId>
        <version>2.0.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>no.api.meteo</groupId>
    <artifactId>meteo-examples</artifactId>
    <version>2.0.2</version>
    <name>meteo-examples</name>
    <description>Meteo examples</description>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <scan.interval.seconds>3</scan.interval.seconds>
            </properties>
        </profile>
        <profile>
            <id>jrebel</id>
            <activation>
                <property>
                    <name>env</name>
                    <value>jrebel</value>
                </property>
            </activation>
            <properties>
                <scan.interval.seconds>0</scan.interval.seconds>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.zeroturnaround</groupId>
                        <artifactId>jrebel-maven-plugin</artifactId>
                        <configuration>
                            <packaging>war</packaging>
                            <rootPath>${project.basedir}</rootPath>
                            <classpath>
                                <fallback>default</fallback>
                                <resources>
                                    <resource>
                                        <directory>./jetty</directory>
                                    </resource>
                                </resources>
                            </classpath>
                        </configuration>
                        <executions>
                            <execution>
                                <id>generate-rebel-xml</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.25</version>
                <configuration>
                    <webDefaultXml>jetty/webdefault.xml</webDefaultXml>
                    <jettyConfig>jetty/jetty.xml</jettyConfig>
                    <contextPath>/</contextPath>
                    <scanIntervalSeconds>${scan.interval.seconds}</scanIntervalSeconds>
                    <connectors>
                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                            <port>8888</port>
                        </connector>
                    </connectors>
                    <systemProperties>
                        <systemProperty>
                            <name>logback.configurationFile</name>
                            <value>./jetty/logback.xml</value>
                        </systemProperty>
                        <systemProperty>
                            <name>file.encoding</name>
                            <value>UTF-8</value>
                        </systemProperty>
                    </systemProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>no.api.meteo</groupId>
            <artifactId>meteo-core</artifactId>
        </dependency>
        <dependency>
            <groupId>no.api.meteo</groupId>
            <artifactId>meteo-extras</artifactId>
        </dependency>
        <dependency>
            <groupId>no.api.meteo</groupId>
            <artifactId>meteo-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>start</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-2.1-jetty</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-naming</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-client</artifactId>
        </dependency>
    </dependencies>
</project>