<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>net.sf.ebus</groupId>
    <artifactId>ebus</artifactId>
    <version>7.6.1</version>
  </parent>

  <artifactId>core</artifactId>
  <packaging>jar</packaging>
  <name>eBus Core</name>

  <properties>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>

    <maven.javadoc.skip>${project.javadoc.skip}</maven.javadoc.skip>
  </properties>

  <build>
    <plugins>

      <plugin>
        <groupId>net.sf.smc</groupId>
        <artifactId>smc-maven-plugin</artifactId>
        <version>${smc.version}</version>

        <executions>
          <execution>
            <id>src-build</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>smc</goal>
            </goals>
            <configuration>
              <targetLanguage>java7</targetLanguage>
              <!--
                              <verbose>true</verbose>
                              <vverbose>true</vverbose>
              -->
            </configuration>
          </execution>

          <execution>
            <id>test-build</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>smc</goal>
            </goals>
            <configuration>
              <sourceDirectory>${project.basedir}/src/test/smc</sourceDirectory>
              <targetDirectory>${project.build.directory}/generated-test-sources/smc</targetDirectory>
              <targetLanguage>java7</targetLanguage>
<!--
              <verbose>true</verbose>
-->
            </configuration>
          </execution>

        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>add-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-test-sources/smc</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.16</version>
        <configuration>
          <reuseForks>false</reuseForks>
          <forkCount>1</forkCount>
<!-- Uncomment when running net.sf.eBus.client.PerformanceTest.java unit test.
          <argLine>-Dnet.sf.eBus.config.jsonFile=src/test/resources/performance.conf</argLine>
-->
<!-- Uncomment when running net.sf.eBus.client.monitor.RQMonitorTest.java unit test.
          <argLine>-Dnet.sf.eBus.config.jsonFile=src/test/resources/rqmonitor.conf</argLine>
-->
          <testFailureIgnore>true</testFailureIgnore>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${javac-version}</version>
        <configuration>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <dependencies>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>util</artifactId>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>net</artifactId>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>config</artifactId>
    </dependency>

    <dependency>
      <groupId>org.javassist</groupId>
      <artifactId>javassist</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.decimal4j</groupId>
      <artifactId>decimal4j</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jctools</groupId>
      <artifactId>jctools-core</artifactId>
      <version>4.0.1</version>
    </dependency>

    <dependency>
      <groupId>org.javatuples</groupId>
      <artifactId>javatuples</artifactId>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>config/sun_checks.xml</configLocation>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

</project>
