<?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>org.mule</groupId>
        <artifactId>mule-plugin-mgmt-parent-pom</artifactId>
        <version>4.11.2</version>
        <relativePath/>
    </parent>

    <groupId>com.mulesoft.connectivity</groupId>
    <artifactId>interpreted-connectivity-mule-dataweave-service</artifactId>
    <version>1.1.2</version>
    <packaging>pom</packaging>

    <licenses>
        <license>
            <name>CPAL v1.0</name>
            <url>http://www.mulesoft.com/CPAL</url>
        </license>
    </licenses>

    <name>Parent Module - Dataweave service library for Mule Runtime Interpreted Connectivity Extension</name>
    <description>A parent module for Dataweave service library for Mule Runtime Interpreted Connectivity Extension</description>


    <properties>
        <maven.compiler.release>17</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <mule.module.maven.plugin.version>1.11.2</mule.module.maven.plugin.version>
        <mule.api.version>1.11.2</mule.api.version>
        <mule.runtime.version>4.11.2</mule.runtime.version>
        <hamcrest.version>3.0</hamcrest.version>
        <mockito.verion>5.12.0</mockito.verion>
        <junit.jupiter.version>5.13.1</junit.jupiter.version>
        <mockito.version>5.17.0</mockito.version>
        <plexus.utils.version>4.0.2</plexus.utils.version>
        <commons.collections.version>4.4</commons.collections.version>

        <!-- DataWeave -->
        <data.weave.version>2.11.1</data.weave.version>
        <data.weave.maven.plugin.version>2.11.0-20251202</data.weave.maven.plugin.version>
        <data.weave.testing.framework.version>2.11.0-20251202</data.weave.testing.framework.version>
        <data.weave.http.version>2.11.0-20251202</data.weave.http.version>
        <data.weave.http.netty.module.version>${data.weave.http.version}</data.weave.http.netty.module.version>

        <linkweave.version>1.5.8</linkweave.version>

        <!-- Formatter Checkstyle -->
        <checkstyle.version>10.24.0</checkstyle.version>
        <skipVerifications>false</skipVerifications>
        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <formatterGoal>validate</formatterGoal>
        <importGoal>check</importGoal>

        <!--Plugins-->
        <maven.checkstyle.plugin.version>3.6.0</maven.checkstyle.plugin.version>
        <maven.compiler.plugin.version>3.14.0</maven.compiler.plugin.version>
        <maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version>
        <maven.impsort.plugin.version>1.12.0</maven.impsort.plugin.version>
        <maven.jar.plugin.version>3.4.2</maven.jar.plugin.version>
        <maven.resources.plugin.version>3.3.1</maven.resources.plugin.version>
        <maven.shade.plugin.version>3.6.0</maven.shade.plugin.version>
        <maven.surefire.plugin.version>3.5.2</maven.surefire.plugin.version>
        <jacoco.maven.plugin.version>0.8.12</jacoco.maven.plugin.version>
        <javaFormatter.plugin.version>2.26.0</javaFormatter.plugin.version>
        <licensePath>LICENSE_HEADER.txt</licensePath>
        <!--    TODO: Check the license year-->
        <licenseYear>2023</licenseYear>
    </properties>

    <modules>
        <module>connectivity-mule-api</module>
        <module>connectivity-dataweave-lib</module>
        <module>connectivity-mule-language</module>
    </modules>

    <build>
            <plugins>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin.version}</version>
                    <configuration>
                        <source>${maven.compiler.release}</source>
                        <target>${maven.compiler.release}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven.checkstyle.plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <!--
                            CheckStyle Maven plugin uses an old version of CheckStyle by default, which has some bugs.
                            -->
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>verify-style</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${skipVerifications}</skip>
                        <logViolationsToConsole>true</logViolationsToConsole>
                        <failOnViolation>true</failOnViolation>
                        <checkstyleRules>
                            <module name="Checker">
                                <module name="TreeWalker">
                                    <module name="AvoidDoubleBraceInitialization"/>
                                    <!--<module name="AvoidNestedBlocks"/>-->
                                    <module name="AvoidNoArgumentSuperConstructorCall"/>
                                    <module name="AvoidStarImport"/>
                                    <module name="ConstantName"/>
                                    <module name="EmptyBlock"/>
                                    <module name="EmptyCatchBlock"/>
                                    <module name="EmptyStatement"/>
                                    <module name="EqualsAvoidNull"/>
                                    <module name="HideUtilityClassConstructor"/>
                                    <module name="InvalidJavadocPosition"/>
                                    <module name="JavadocBlockTagLocation"/>
                                    <module name="JavadocMethod"/>
                                    <module name="JavadocStyle"/>
                                    <module name="JavadocType">
                                        <property name="allowMissingParamTags" value="true"/>
                                        <property name="allowUnknownTags" value="true"/>
                                    </module>
                                    <module name="MissingSwitchDefault"/>
                                    <module name="NeedBraces"/>
                                    <module name="NoEnumTrailingComma"/>
                                    <module name="NoFinalizer"/>
                                    <module name="RedundantImport"/>
                                    <module name="SimplifyBooleanExpression"/>
                                    <module name="SimplifyBooleanReturn"/>
                                    <module name="UnnecessaryParentheses"/>
                                    <module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
                                    <module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
                                    <module name="UnnecessarySemicolonInEnumeration"/>
                                    <module name="UnnecessarySemicolonInTryWithResources"/>
                                    <module name="UnusedLocalVariable"/>
                                    <module name="UnusedImports"/>
                                </module>
                            </module>
                        </checkstyleRules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code</groupId>
                    <artifactId>impsort-maven-plugin</artifactId>
                    <version>${maven.impsort.plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.plexus</groupId>
                            <artifactId>plexus-utils</artifactId>
                            <version>${plexus.utils.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <groups>org.mule.,com.mulesoft.,java.,javax.</groups>
                        <staticGroups>org.mule.,com.mulesoft.,java.,javax.</staticGroups>
                    </configuration>
                    <executions>
                        <execution>
                            <id>validate-imports</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>${importGoal}</goal>
                            </goals>
                            <configuration>
                                <skip>${skipVerifications}</skip>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${javaFormatter.plugin.version}</version>
                    <configuration>
                        <compilerCompliance>${maven.compiler.release}</compilerCompliance>
                        <compilerSource>${maven.compiler.release}</compilerSource>
                        <compilerTargetPlatform>${maven.compiler.release}</compilerTargetPlatform>
                        <configFile>${formatterConfigPath}</configFile>
                        <configJsFile>${formatterConfigPath}</configJsFile>
                        <aggregator>false</aggregator>
                        <executionRoot>true</executionRoot>
                    </configuration>
                    <executions>
                        <execution>
                            <id>apply-format</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>${formatterGoal}</goal>
                            </goals>
                            <configuration>
                                <skipFormatting>${skipVerifications}</skipFormatting>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>enforce-java</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <rules>
                                    <requireJavaVersion>
                                        <version>17.0</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.maven.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <configuration>
                                <formats>
                                    <format>XML</format>
                                </formats>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.mule.tools.maven</groupId>
                    <artifactId>mule-module-maven-plugin</artifactId>
                    <version>${mule.module.maven.plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                            <configuration>
                                <skip>false</skip>
                                <fillOptionalPackages>false</fillOptionalPackages>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
    </build>

    <repositories>
        <repository>
            <id>mule-releases</id>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>

        <repository>
            <id>mule-snapshots</id>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/snapshots</url>
        </repository>
    </repositories>
    <distributionManagement>
        <downloadUrl>http://www.mulesoft.org/display/MULE/Download</downloadUrl>
        <repository>
            <id>mule-releases</id>
            <name>Mule Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>mule-snapshots</id>
            <name>Mule Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.jupiter.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <scm>
        <connection>scm:git:git://github.com/mulesoft-emu/interpreted-connectivity-mule-dataweave-service.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft-emu/interpreted-connectivity-mule-dataweave-service.git</developerConnection>
        <url>https://github.com/mulesoft-emu/interpreted-connectivity-mule-dataweave-service</url>
    </scm>
</project>
