<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<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.apache.sling</groupId>
        <artifactId>sling</artifactId>
        <version>46</version>
        <relativePath />
    </parent>

    <artifactId>htl-maven-plugin</artifactId>
    <!--
        The versioning scheme defined here corresponds to SLING-7406 (<module_version>-<htl_specification_version>). Take care when
        releasing to only increase the first part, unless the module provides support for a newer version of the HTL specification.
    -->
    <version>2.0.4-1.4.0</version>
    <packaging>maven-plugin</packaging>

    <name>Apache Sling HTL Maven Plugin</name>
    <description>The Apache Sling HTL Maven Plugin provides support for validating HTML Template Language scripts from projects.</description>
    <url>https://sling.apache.org/components/htl-maven-plugin/</url>

    <scm>
        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-htl-maven-plugin.git</connection>
        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-htl-maven-plugin.git</developerConnection>
        <url>https://github.com/apache/sling-htl-maven-plugin/tree/master</url>
        <tag>htl-maven-plugin-2.0.4-1.4.0</tag>
    </scm>

    <prerequisites>
        <maven>3.3.9</maven><!-- due to https://issues.apache.org/jira/browse/MNG-5440 -->
    </prerequisites>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.outputTimestamp>2021-10-05T09:32:04Z</project.build.outputTimestamp>
        <site.jira.version.id>12336741,12338350,12338646,12338974,12341271,12342047,12342267,12342272,12343462,
            12343846,12344079,12344332,12344876,12345571,12346551,12346590,12346596,12348677,12348837</site.jira.version.id>
        <maven.version>3.3.9</maven.version>
        <maven.site.path>${project.artifactId}-archives/${project.artifactId}-LATEST</maven.site.path>
        <sightly.runtime.version>1.2.6-1.4.0</sightly.runtime.version>
        <argLine />
        <!-- the github id used for the ribbon for Maven sites: https://maven.apache.org/skins/maven-fluido-skin/#GitHub_ribbons -->
        <github.project.id>apache/sling-htl-maven-plugin</github.project.id>
    </properties>

    <!-- force maven-plugin-testing-harness to use newer plexus container (https://issues.apache.org/jira/browse/MPLUGINTESTING-53) -->
    <dependencyManagement>
        <dependencies>
            <!-- maven -->
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>${maven.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-compat</artifactId>
                <version>${maven.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-model</artifactId>
                <version>${maven.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>${maven.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-aether-provider</artifactId>
                <version>${maven.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.compiler</artifactId>
            <version>2.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.sightly.runtime</artifactId>
            <version>${sightly.runtime.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
            <version>1.2.14-1.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.sightly.compiler.java</artifactId>
            <version>1.2.2-1.4.0</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0.24</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-build-api</artifactId>
            <version>0.0.7</version>
        </dependency>


        <!-- Testing Dependencies -->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
            <version>1.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-compat</artifactId>
            <scope>test</scope>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.0.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generated-helpmojo</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/*.iml</exclude>
                        <exclude>**/target/**/*</exclude>
                        <exclude>src/site/markdown/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <configuration>
                    <checkoutDirectory>${user.home}/maven-sites/${maven.site.path}</checkoutDirectory>
                    <tryUpdate>true</tryUpdate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>4.3.0</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                </configuration>
                <executions>
                    <execution>
                        <id>find-bugs</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jacoco-report</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>check-coverage</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${project.build.directory}/jacoco-merged.exec</dataFile>
                                    <haltOnFailure>true</haltOnFailure>
                                    <rules>
                                        <rule>
                                            <element>BUNDLE</element>
                                            <limits>
                                                <limit>
                                                    <counter>INSTRUCTION</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>0.80</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                        <rule>
                                            <element>CLASS</element>
                                            <limits>
                                                <limit>
                                                    <counter>INSTRUCTION</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>0.80</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                    </rules>
                                    <excludes>
                                        <exclude>org/apache/sling/maven/htl/HelpMojo.class</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <configuration>
                    <useJql>true</useJql>
                    <sortColumnNames>resolutiondate DESC</sortColumnNames>
                    <columnNames>Type,Key,Summary,Fix Version</columnNames>
                    <resolutionIds>Fixed</resolutionIds>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

</project>