<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
-->
<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">

  <parent>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-parent</artifactId>
    <version>33</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <name>Apache Commons SCXML</name>
  <artifactId>commons-scxml2</artifactId>
  <version>2.0-SNAPSHOT</version>

  <inceptionYear>2005</inceptionYear>
  <description>A Java Implementation of a State Chart XML Engine</description>

  <url>http://commons.apache.org/proper/commons-scxml/</url>

  <issueManagement>
    <system>jira</system>
    <url>http://issues.apache.org/jira/browse/SCXML</url>
  </issueManagement>

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/scxml/trunk</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/scxml/trunk</developerConnection>
    <url>http://svn.apache.org/viewvc/commons/proper/scxml/trunk</url>
  </scm>

  <developers>
    <developer>
      <name>Rahul Akolkar</name>
      <id>rahul</id>
      <email>rahul AT apache.org</email>
      <organization>The Apache Software Foundation</organization>
    </developer>
    <developer>
      <name>Martin Cooper</name>
      <id>martinc</id>
      <organization>The Apache Software Foundation</organization>
    </developer>
    <developer>
      <name>Ate Douma</name>
      <id>ate</id>
      <email>ate AT douma.nu</email>
      <organization>Hippo B.V.</organization>
    </developer>
    <developer>
      <name>Woonsan Ko</name>
      <id>woonsan</id>
      <email>woonsan AT apache.org</email>
      <organization>The Apache Software Foundation</organization>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Jaroslav Gergic</name>
    </contributor>
    <contributor>
      <name>Peter Costa</name>
    </contributor>
    <contributor>
      <name>Wendy Smoak</name>
    </contributor>
    <contributor>
      <name>Heiko Eichberger</name>
    </contributor>
    <contributor>
      <name>Niall Pemberton</name>
    </contributor>
    <contributor>
      <name>Sitthichai Rernglertpricha</name>
    </contributor>
    <contributor>
      <name>Nestor Urquiza</name>
    </contributor>
    <contributor>
      <name>Michael Heuer</name>
    </contributor>
    <contributor>
      <name>Ingmar Kliche</name>
    </contributor>
    <contributor>
      <name>Michael Tillberg</name>
    </contributor>
    <contributor>
      <name>Andy Bailey</name>
    </contributor>
    <contributor>
      <name>Sebastian Bazley</name>
    </contributor>
    <contributor>
      <name>Ross Yakulis</name>
    </contributor>
    <contributor>
      <name>SeongSoo Park</name>
    </contributor>
    <contributor>
      <name>Tony Seebregts</name>
    </contributor>
    <contributor>
      <name>Elaine Wong</name>
    </contributor>
    <contributor>
      <name>Edzard Hoefig</name>
    </contributor>
    <contributor>
      <name>Daniel Schwager</name>
    </contributor>
    <contributor>
      <name>Jakob Sachse</name>
    </contributor>
    <contributor>
      <name>Joel Truher</name>
    </contributor>
    <contributor>
      <name>Ales Dolecek</name>
    </contributor>
  </contributors>

  <dependencies>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.3</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-jexl</artifactId>
      <version>2.1.1</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>commons-jxpath</groupId>
      <artifactId>commons-jxpath</artifactId>
      <version>1.3</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <version>2.2.2</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.9.2</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.4</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <distributionManagement>
    <site>
      <id>apache.website</id>
      <name>Apache Commons Site</name>
      <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-scxml/</url>
    </site>
  </distributionManagement>

  <properties>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <commons.componentid>scxml2</commons.componentid>
    <commons.release.version>2.0-alpha-1</commons.release.version>
    <commons.release.desc>(Java 6.0+)</commons.release.desc>
    <commons.rc.version>RC1</commons.rc.version>
    <commons.jira.id>SCXML</commons.jira.id>
    <commons.jira.pid>12310492</commons.jira.pid>
    <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-scxml</commons.scmPubUrl>
    <commons.scmPubCheckoutDirectory>site-content</commons.scmPubCheckoutDirectory>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <!-- Allow override of the logging level -->
    <simplelog.defaultlog>fatal</simplelog.defaultlog>
  </properties>

  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <testSourceDirectory>src/test/java</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>src/test/java</directory>
        <includes>
          <include>**/*.xml</include>
          <include>**/*.xsl</include>
          <include>**/*.gif</include>
        </includes>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <!-- Suppress most logging output -->
            <org.apache.commons.logging.Log>org.apache.commons.logging.impl.SimpleLog</org.apache.commons.logging.Log>
            <org.apache.commons.logging.simplelog.defaultlog>${simplelog.defaultlog}</org.apache.commons.logging.simplelog.defaultlog>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/bin.xml</descriptor>
            <descriptor>src/assembly/src.xml</descriptor>
          </descriptors>
          <tarLongFileMode>gnu</tarLongFileMode>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-publish-plugin</artifactId>
        <configuration>
          <ignorePathsToDelete>
            <ignorePathToDelete>javadocs</ignorePathToDelete>
          </ignorePathsToDelete>
        </configuration>
      </plugin>
      <!-- add convenience support for command-line testing and debugging using
           the org.apache.commons.scxml2.test.StandaloneJexlExpressions class

           Example usage: mvn exec:java -Dexec.args="test.scxml"

           See StandaloneJexlExpressions.java for further instructions
       -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.3.2</version>
        <configuration>
          <mainClass>org.apache.commons.scxml2.test.StandaloneJexlExpressions</mainClass>
          <classpathScope>test</classpathScope>
          <cleanupDaemonThreads>false</cleanupDaemonThreads>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <!-- Should agree with config in reporting section -->
        <configuration>
          <excludes combine.children="append">
            <!--exclude stylesheet adapted from http://www.w3.org/Voice/2013/scxml-irp/confXPath.xsl -->
            <exclude>src/test/java/org/apache/commons/scxml2/w3c/confMinimal.xsl</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <!--
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <configuration>
          <xmlPath>${basedir}/src/changes/changes.xml</xmlPath>
          <issueLinkTemplate>%URL%/%ISSUE%</issueLinkTemplate>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
               <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>${basedir}/scxml-checks.xml</configLocation>
          <enableRulesSummary>false</enableRulesSummary>
          <headerFile>${basedir}/scxml-asl-header.txt</headerFile>
        </configuration>
      </plugin>
      <!--
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <configuration>
          <comparisonVersion>0.9</comparisonVersion>
        </configuration>
      </plugin>
      -->
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <!-- Should agree with config in build section -->
        <configuration>
          <excludes combine.children="append">
            <!--exclude stylesheet adapted from http://www.w3.org/Voice/2013/scxml-irp/confXPath.xsl -->
            <exclude>src/test/java/org/apache/commons/scxml2/w3c/confMinimal.xsl</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>rc</id>
      <distributionManagement>
        <!-- Cannot define in parent ATM, see COMMONSSITE-26 -->
        <site>
          <id>apache.website</id>
          <name>Apache Commons Release Candidate Staging Site</name>
          <url>${commons.deployment.protocol}://people.apache.org/www/people.apache.org/builds/commons/${commons.componentid}/${commons.release.version}/${commons.rc.version}/site</url>
        </site>
      </distributionManagement>
    </profile>

    <profile>
      <id>setup-checkout</id>
      <activation>
        <file>
          <missing>site-content</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
            <executions>
              <execution>
                <id>prepare-checkout</id>
                <phase>pre-site</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <exec executable="svn">
                      <arg line="checkout --depth immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}" />
                    </exec>

                    <exec executable="svn">
                      <arg line="update --set-depth exclude ${commons.scmPubCheckoutDirectory}/javadocs" />
                    </exec>

                    <pathconvert pathsep=" " property="dirs">
                      <dirset dir="${commons.scmPubCheckoutDirectory}" includes="*" />
                    </pathconvert>
                    <exec executable="svn">
                      <arg line="update --set-depth infinity ${dirs}" />
                    </exec>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- download the W3C IRP tests and ecma and xpath stylesheets to transform them, using:
           $ mvn -P w3Tests.get
       -->
      <id>w3cTests.get</id>
      <build>
        <defaultGoal>test</defaultGoal>
        <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
        </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.3.2</version>
            <executions>
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>java</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <mainClass>org.apache.commons.scxml2.w3c.W3CTests</mainClass>
              <arguments>
                <argument>get</argument>
              </arguments>
              <systemProperties>
                <systemProperty>
                  <key>org.apache.commons.logging.Log</key>
                  <value>org.apache.commons.logging.impl.SimpleLog</value>
                </systemProperty>
                <systemProperty>
                  <key>org.apache.commons.logging.simplelog.defaultlog</key>
                  <value>${simplelog.defaultlog}</value>
                </systemProperty>
              </systemProperties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- make the W3C IRP tests by transforming them with the datamodel specific stylesheets using:
           $ mvn -P w3cTests.make
      -->
      <id>w3cTests.make</id>
      <dependencies>
        <!-- needed for XPath 2.0 support to transform w3c txml tests -->
        <dependency>
          <groupId>net.sf.saxon</groupId>
          <artifactId>Saxon-HE</artifactId>
          <version>9.6.0-1</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <defaultGoal>test</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.3.2</version>
            <executions>
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>java</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <mainClass>org.apache.commons.scxml2.w3c.W3CTests</mainClass>
              <arguments>
                <argument>make</argument>
              </arguments>
              <systemProperties>
                <systemProperty>
                  <key>org.apache.commons.logging.Log</key>
                  <value>org.apache.commons.logging.impl.SimpleLog</value>
                </systemProperty>
                <systemProperty>
                  <key>org.apache.commons.logging.simplelog.defaultlog</key>
                  <value>${simplelog.defaultlog}</value>
                </systemProperty>
              </systemProperties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- Run one or multiple W3C IRP tests using optional system parameters for datamodel and/or test id, using:
           $ mvn -P w3cTests.run [-Ddatamodel=<ecma|xpath|minimal>] [-Dtest=<testId>]

           Also see: src/test/java/org/apache/commons/scxml2/w3c/tests.xml
           which contains configurations per test (if it default is enabled/disabled, status, etc.)
           For precise details if and how tests are executed, see the W3CTests.java class
      -->
      <id>w3cTests.run</id>
      <build>
        <defaultGoal>test</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.3.2</version>
            <executions>
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>java</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <mainClass>org.apache.commons.scxml2.w3c.W3CTests</mainClass>
              <arguments>
                <argument>run</argument>
              </arguments>
              <systemProperties>
                <systemProperty>
                  <key>org.apache.commons.logging.Log</key>
                  <value>org.apache.commons.logging.impl.SimpleLog</value>
                </systemProperty>
                <systemProperty>
                  <key>org.apache.commons.logging.simplelog.defaultlog</key>
                  <value>${simplelog.defaultlog}</value>
                </systemProperty>
              </systemProperties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
