<?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>com.mulesoft.connectivity</groupId>
        <artifactId>interpreted-connectivity-link-weave</artifactId>
        <version>1.6.0-3.develop</version>
    </parent>

    <artifactId>connectivity-content-document-service-impl</artifactId>
    <packaging>dw-library</packaging>
    

    <properties>
        <pathToTop>..</pathToTop>
        <build.helper.maven.plugin.version>3.6.1</build.helper.maven.plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jackson-databind.version>2.20.0</jackson-databind.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-content-document-service</artifactId>
            <version>${project.version}</version>
            <classifier>dw-library</classifier>
        </dependency>

         <!-- Test dependencies -->
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>parser</artifactId>
            <version>${data.weave.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>core-modules</artifactId>
            <version>${data.weave.version}</version>
            <scope>test</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>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.10.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.10.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>3.0</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
    

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build.helper.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>add-dw-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/dw</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-dw-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/test/dw</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.mule.weave</groupId>
                <artifactId>data-weave-maven-plugin</artifactId>
                <version>${data.weave.maven.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <tests>
                        <runnerJvmDebug>false</runnerJvmDebug>
                        <htmlReport>false</htmlReport>
                        <coverageEnabled>false</coverageEnabled>
                        <coverageFormat>sonar</coverageFormat>
                    </tests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.4.2</version>
                <executions>
                    <execution>
                        <id>java-classes</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>java-classes</classifier>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <executions>
                    <execution>
                        <id>run-junit-tests</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
