<?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>
  <name>TRADACOMS Support Library</name>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule4-tradacoms-support</artifactId>
  <version>2.0.7</version>
  <packaging>pom</packaging>

  <properties>
    <jdk.version>1.8</jdk.version>
    <junit.version>4.13.1</junit.version>
    <edi-parser.version>2.4.39</edi-parser.version>
    <base.scala.version>2.12</base.scala.version>
    <scala.version>${base.scala.version}.21</scala.version>
    <scalatest.version>3.0.1</scalatest.version>
    <scala-maven.version>4.3.0</scala-maven.version>
    <jacoco.version>0.8.14</jacoco.version>
    <weave.version>2.12.0-20260516</weave.version>
    <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
    <maven.resources.plugin.version>3.3.0</maven.resources.plugin.version>
    <maven.clean.plugin.version>3.0.0</maven.clean.plugin.version>
    <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
    <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
    <scalatest.maven.plugin.version>1.0</scalatest.maven.plugin.version>
    <exists.maven.plugin.version>0.3.0</exists.maven.plugin.version>
    <sonar.coverage.exclusions>
      **/com/mulesoft/connectors/tradacoms/*,
      **/com/mulesoft/flatfile/schema/test/*
    </sonar.coverage.exclusions>
  </properties>

  <modules>
    <module>parser</module>
    <module>schemas</module>
    <module>systests</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.mule.weave</groupId>
        <artifactId>core</artifactId>
        <version>${weave.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.compiler.plugin.version}</version>
          <configuration>
            <source>${jdk.version}</source>
            <target>${jdk.version}</target>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>net.alchim31.maven</groupId>
          <artifactId>scala-maven-plugin</artifactId>
          <version>${scala-maven.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven.resources.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven.clean.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven.deploy.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.scalatest</groupId>
          <artifactId>scalatest-maven-plugin</artifactId>
          <version>${scalatest.maven.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.honton.chas</groupId>
          <artifactId>exists-maven-plugin</artifactId>
          <version>${exists.maven.plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>remote</goal>
              </goals>
              <configuration>
                <skipIfSnapshot>true</skipIfSnapshot>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <goals>
              <goal>report</goal>
            </goals>
            <phase>test</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>scala-compile-first</id>
            <phase>process-resources</phase>
            <goals>
              <goal>add-source</goal>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>${maven.deploy.plugin.version}</version>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>mule-releases</id>
      <name>Mule Release Repository</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
    </repository>
    <repository>
      <id>mule-ee-releases</id>
      <name>MuleEE Releases Repository</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases-ee/</url>
    </repository>
    <repository>
      <id>mule-ee-snapshots</id>
      <name>Mule EE Snapshots Repository</name>
      <layout>default</layout>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-snapshots/</url>
    </repository>
  </repositories>

  <distributionManagement>
    <repository>
      <id>mule-ee-releases</id>
      <name>MuleEE Releases Repository</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases/</url>
    </repository>
    <snapshotRepository>
      <id>mule-ee-snapshots</id>
      <name>MuleEE Snapshots Repository</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-snapshots/</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>

  <scm>
    <connection>scm:git:git@github.com:mulesoft/mule4-tradacoms-support.git</connection>
    <developerConnection>scm:git:git@github.com:mulesoft/mule4-tradacoms-support.git</developerConnection>
    <url>https://github.com/mulesoft/mule4-tradacoms-support</url>
    <tag>HEAD</tag>
  </scm>

</project>
