<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz-parent</artifactId>
    <version>2.3.2</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

  <artifactId>quartz-examples</artifactId>
  <packaging>jar</packaging>
  <name>Quartz Example Applications</name>
  
  <properties>
    <skipDeploy>true</skipDeploy>
    <skipJavadoc>true</skipJavadoc>
    <skipCheckstyle>true</skipCheckstyle>
    <mainClass>org.quartz.examples.example1.SimpleExample</mainClass>
  </properties>

  <dependencies> 
    <dependency>
      <groupId>org.quartz-scheduler</groupId>
      <artifactId>quartz</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4j.version}</version>
    </dependency>    
  </dependencies>
  
  <profiles>
    <profile>
      <id>example1</id>
      <properties>
        <mainClass>org.quartz.examples.example1.SimpleExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example2</id>
      <properties>
        <mainClass>org.quartz.examples.example2.SimpleTriggerExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example3</id>
      <properties>
        <mainClass>org.quartz.examples.example3.CronTriggerExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example4</id>
      <properties>
        <mainClass>org.quartz.examples.example4.JobStateExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example5</id>
      <properties>
        <mainClass>org.quartz.examples.example5.MisfireExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example6</id>
      <properties>
        <mainClass>org.quartz.examples.example6.JobExceptionExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example7</id>
      <properties>
        <mainClass>org.quartz.examples.example7.InterruptExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example8</id>
      <properties>
        <mainClass>org.quartz.examples.example8.CalendarExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example9</id>
      <properties>
        <mainClass>org.quartz.examples.example9.ListenerExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example10</id>
      <properties>
        <mainClass>org.quartz.examples.example10.PlugInExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example11</id>
      <properties>
        <mainClass>org.quartz.examples.example11.LoadExample</mainClass>
      </properties>
    </profile>
    <profile>
      <id>example12</id>
      <properties>
        <clientClass>org.quartz.examples.example12.RemoteClientExample</clientClass>
        <serverClass>org.quartz.examples.example12.RemoteServerExample</serverClass>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2</version>
            <configuration>
            </configuration>
            <executions>
              <execution>
                <id>server</id>
                <configuration>
                  <executable>${java.home}/bin/java</executable>
                  <arguments>
                    <argument>-Dlog4j.configuration=file:${project.build.outputDirectory}/log4j.xml</argument>
                    <argument>-Dorg.quartz.properties=${example12}/server.properties
                    </argument>
                    <argument>-Dorg.quartz.scheduler.skipUpdateCheck=true</argument>
                    <argument>-cp</argument>
                    <classpath/>
                    <argument>${serverClass}</argument>
                  </arguments>                
                </configuration>
              </execution>            
              <execution>
                <id>client</id>
                <configuration>
                  <executable>${java.home}/bin/java</executable>
                  <arguments>
                    <argument>-Dlog4j.configuration=file:${project.build.outputDirectory}/log4j.xml</argument>
                    <argument>-Dorg.quartz.properties=${example12}/client.properties
                    </argument>
                    <argument>-Dorg.quartz.scheduler.skipUpdateCheck=true</argument>
                    <argument>-cp</argument>
                    <classpath/>
                    <argument>${clientClass}</argument>
                  </arguments>                
                </configuration>
              </execution>              
            </executions>
          </plugin>
        </plugins>
      </build>      
    </profile>
    <profile>
      <id>example14</id>
      <properties>
        <mainClass>org.quartz.examples.example14.PriorityExample</mainClass>
      </properties>
    </profile>    
  </profiles>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2</version>
        <configuration>
          <executable>${java.home}/bin/java</executable>
          <arguments>
            <argument>-Dlog4j.configuration=file:${project.build.outputDirectory}/log4j.xml</argument>
            <argument>-Dorg.quartz.scheduler.skipUpdateCheck=true</argument>
            <argument>-cp</argument>
            <classpath/>
            <argument>${mainClass}</argument>
          </arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
