<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>

  <groupId>io.github.amilasaad</groupId>
  <artifactId>dataweave-utils</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>

  <name>DataWeave Utilities</name>

  <description>
    A robust, reusable DataWeave 2.x utility library containing helper modules for object/array manipulation, string processing, date formatting, data validation, PII masking, and common enterprise integration patterns.
  </description>

  <url>https://github.com/amilasaad/dataweave-utils</url>
  
  <distributionManagement>
    <repository>
      <id>dummy-repo</id>
      <name>Dummy Repo</name>
      <url>https://localhost/dummy</url>
    </repository>
    <snapshotRepository>
      <id>dummy-snapshot-repo</id>
      <name>Dummy Snapshot Repo</name>
      <url>https://localhost/dummy-snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://opensource.org/licenses/MIT</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Amilasaad</name>
      <url>https://github.com/amilasaad</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/amilasaad/dataweave-utils.git</connection>
    <developerConnection>scm:git:ssh://github.com:amilasaad/dataweave-utils.git</developerConnection>
    <url>https://github.com/amilasaad/dataweave-utils/tree/main</url>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <data.weave.version>2.5.0</data.weave.version>
    <data.weave.testing.framework.version>1.2.2</data.weave.testing.framework.version>
    <data.weave.maven.plugin.version>0.3.5</data.weave.maven.plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.mule.weave</groupId>
      <artifactId>runtime</artifactId>
      <version>${data.weave.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.weave</groupId>
      <artifactId>core-modules</artifactId>
      <version>${data.weave.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.weave</groupId>
      <artifactId>data-weave-testing-framework</artifactId>
      <version>${data.weave.testing.framework.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>mulesoft-public</id>
      <name>MuleSoft Public Repository</name>
      <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
    </repository>
    <repository>
      <id>mule-releases</id>
      <name>MuleSoft Releases Repository</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>mulesoft-public</id>
      <name>MuleSoft Public Repository</name>
      <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
    </pluginRepository>
    <pluginRepository>
      <id>mule-releases</id>
      <name>MuleSoft Releases Repository</name>
      <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <resources>
      <resource>
        <directory>src/main/dw</directory>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/dw</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.mule.weave</groupId>
        <artifactId>data-weave-maven-plugin</artifactId>
        <version>${data.weave.maven.plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <docs>
            <homePage>${project.basedir}/README.md</homePage>
            <favicon>${project.basedir}/src/main/resources/favicon/dataweave-utils.png</favicon>
          </docs>
          <cryptoTaintAnalysisSettings>
            <enabled>true</enabled>
            <insecureAlgorithms>MD5,SHA1,DES,RC4</insecureAlgorithms>
            <sensitiveModules>
              dw::crypto::CryptoModule,dw::security::HashModule,dw::util::SecurityModule</sensitiveModules>
          </cryptoTaintAnalysisSettings>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>attach-primary-jar</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
                  <type>jar</type>
                  <classifier>dw-library</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.6.3</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <failOnError>false</failOnError>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.11.0</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>publish-to-central</id>
            <phase>deploy</phase>
            <goals>
              <goal>publish</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
          <waitUntil>published</waitUntil>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>