<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>com.xebialabs.xldeploy</groupId>
    <artifactId>xldeploy-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <version>26.3.0</version>
    <url>https://digital.ai</url>

    <name>Deployit Maven Mojo</name>

    <prerequisites>
        <maven>3.6.3</maven>
    </prerequisites>

    <properties>
        <mavenVersion>3.8.7</mavenVersion>
        <year>2023</year>
        <slf4j-api.version>2.0.16</slf4j-api.version>
        <!-- do not change the xlPlatformVersion property name it's used by the dependency updater -->
        <xlPlatformVersion>25.1.13-628.800</xlPlatformVersion>
        <additionalparam>-Xdoclint:none</additionalparam>
        <doclint>none</doclint>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!--
        <maven.compiler.release>11</maven.compiler.release>
        -->
    </properties>

    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.6</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>2.6</version>
            </extension>
        </extensions>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>
            <!-- Java 17+ build configuration -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                    <encoding>UTF-8</encoding>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <forceJavacCompilerUse>true</forceJavacCompilerUse>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.5</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.2.5</version>
            </plugin>
            <!-- end Java 17+ build configuration -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.2</version>
                <configuration>
                    <arguments>-Drelease-active=true</arguments>
                    <stagingRepository>xebialabs-alphas::default::https://nexus.xebialabs.com/nexus/content/repositories/alphas</stagingRepository>
                    <releaseProfiles>enforce-rules</releaseProfiles>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <inherited>false</inherited>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <aggregate>true</aggregate>
                    <header>src/etc/gpl-header.txt</header>
                    <excludes>
                        <exclude>**/package/**</exclude>
                        <exclude>.idea/**</exclude>
                        <exclude>deployit*</exclude>
                        <exclude>**/*.artifact</exclude>
                        <exclude>**/*.war</exclude>
                        <!-- skip XML Velocity templates because the plugin adds a blank line
                             after the comment, and that doesn't work if first line is supposed to
                             be <?xml...> -->
                        <exclude>**/*.xml.vm</exclude>
                    </excludes>
                    <mapping>
                        <!-- use "standard" instead of Javadoc comments -->
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <properties>
                        <year>${project.inceptionYear}</year>
                    </properties>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.12.0</version>
                <configuration>
                    <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>

                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9.1</version>
                <executions>
                    <execution>
                        <id>parse-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <dependencies>
        <!-- Maven  -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${mavenVersion}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.sonatype.sisu</groupId>
                    <artifactId>sisu-guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${mavenVersion}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${mavenVersion}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit</artifactId>
                    <groupId>junit</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-compat</artifactId>
            <version>${mavenVersion}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-provider-api</artifactId>
            <version>3.3.4</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.4.0</version>
        </dependency>

        <!-- Deployit dependencies -->

        <dependency>
            <groupId>com.xebialabs.deployit.engine</groupId>
            <artifactId>remote-booter</artifactId>
            <version>${xlPlatformVersion}</version>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.3.0</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-api.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <version>2.0.5</version>
        </dependency>

        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.10.15</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.5.14</version>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit</artifactId>
                    <groupId>junit</groupId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-archiver</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>1.1.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
            <version>4.2.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
		
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.eclipse.sisu/org.eclipse.sisu.inject -->
        <dependency>
            <groupId>org.eclipse.sisu</groupId>
            <artifactId>org.eclipse.sisu.inject</artifactId>
            <version>0.3.4</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <developers>
        <developer>
            <id>balaji-digital-ai</id>
            <name>Balaji Venkatesan</name>
            <email>Balaji.venkatesan@digital.ai</email>
            <roles>
                <role>Team member</role>
            </roles>
        </developer>
        <developer>
            <id>isaacsatish</id>
            <name>Isaac Satish Gandhi</name>
            <email>igandhi@digital.ai</email>
            <roles>
                <role>Team member</role>
            </roles>
        </developer>
        <developer>
            <id>nitheshrayuduv</id>
            <name>Nithesh Rayudu Vaddey</name>
            <email>nrayudu@digital.ai</email>
            <roles>
                <role>Team member</role>
            </roles>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>xebialabs-releases</id>
            <url>https://nexus.xebialabs.com/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>xebialabs-snapshots</id>
            <url>https://nexus.xebialabs.com/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>run-its</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <debug>true</debug>
                            <showErrors>true</showErrors>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                            </pomIncludes>
                            <preBuildHookScript>setup</preBuildHookScript>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <localRepositoryPath>${project.build.testOutputDirectory}/m2repo</localRepositoryPath>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <goals>
                                <goal>clean</goal>
                                <goal>install</goal>
                            </goals>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.jdom</groupId>
                                <artifactId>jdom2</artifactId>
                                <version>2.0.6</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>install</goal>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>non-release</id>
            <activation>
                <property>
                    <name>!release-active</name>
                </property>
            </activation>
            <repositories>
                <repository>
                    <id>xebialabs-alphas</id>
                    <name>XebiaLabs Alpha Releases</name>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <url>https://nexus.xebialabs.com/nexus/content/repositories/alphas</url>
                </repository>
                <repository>
                    <id>xebialabs-snapshots</id>
                    <url>https://nexus.xebialabs.com/nexus/content/repositories/snapshots/</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
        <profile>
            <id>enforce-rules</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>enforce-repos</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>1.7</version>
                                </requireJavaVersion>
                                <bannedRepositories>
                                    <bannedRepositories>
                                        <bannedRepository>https://nexus.xebialabs.com/nexus/content/repositories/alphas</bannedRepository>
                                        <bannedRepository>https://nexus.xebialabs.com/nexus/content/repositories/snapshots</bannedRepository>
                                    </bannedRepositories>
                                </bannedRepositories>
                            </rules>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>xebialabs-maven2</id>
            <url>https://dist.xebialabs.com/public/maven2/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>xebialabs-releases</id>
            <url>https://nexus.xebialabs.com/nexus/content/repositories/releases</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>knopflerfish</id>
            <url>http://www.knopflerfish.org/maven2</url>
        </repository>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>2.10</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>jira-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.1</version>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>

        </plugins>
    </reporting>

    <scm>
        <connection>scm:git:git@github.com:xebialabs/maven-deployit-plugin.git</connection>
        <url>scm:git:git@github.com:xebialabs/maven-deployit-plugin.git</url>
        <developerConnection>scm:git:git@github.com:xebialabs/maven-deployit-plugin.git</developerConnection>
        <tag>xldeploy-maven-plugin-26.3.0</tag>
    </scm>

</project>
