<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.sonarsource.html</groupId>
    <artifactId>html</artifactId>
    <version>3.13.0.4821</version>
  </parent>

  <artifactId>sonar-html-plugin</artifactId>
  <packaging>sonar-plugin</packaging>

  <name>SonarSource HTML analyzer :: Sonar Plugin</name>
  <description>Code analyzer for HTML</description>
  <url>http://redirect.sonarsource.com/plugins/web.html</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:SonarSource/sonar-html.git</connection>
    <developerConnection>scm:git:git@github.com:SonarSource/sonar-html.git</developerConnection>
    <url>https://github.com/SonarSource/sonar-html</url>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <sonar.pluginName>HTML Code Quality and Security</sonar.pluginName>
    <sonar.pluginClass>org.sonar.plugins.html.HtmlPlugin</sonar.pluginClass>
    <sonar.skipDependenciesPackaging>true</sonar.skipDependenciesPackaging>
    <sonar.sonarLintSupported>true</sonar.sonarLintSupported>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.sonarsource.api.plugin</groupId>
      <artifactId>sonar-plugin-api</artifactId>
      <version>${sonar.plugin.api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.sslr</groupId>
      <artifactId>sslr-core</artifactId>
      <version>${sslr.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.analyzer-commons</groupId>
      <artifactId>sonar-analyzer-commons</artifactId>
      <version>${analyzerCommons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.analyzer-commons</groupId>
      <artifactId>sonar-analyzer-recognizers</artifactId>
      <version>${analyzerCommons.version}</version>
    </dependency>

    <!-- JSF Expression parser -->
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>jakarta.el</artifactId>
      <version>${jakarta.el.version}</version>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.sonarqube</groupId>
      <artifactId>sonar-plugin-api-impl</artifactId>
      <version>${sonarqube.api.impl.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
        <dependency>
      <groupId>org.sonarsource.sonarqube</groupId>
      <artifactId>sonar-testing-harness</artifactId>
      <version>${sonarqube.api.impl.version}</version>
      <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
          </exclusion>
        </exclusions>
    </dependency>
        <dependency>
      <groupId>org.sonarsource.sslr</groupId>
      <artifactId>sslr-testing-harness</artifactId>
      <version>${sslr.version}</version>
      <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
          </exclusion>
        </exclusions>
    </dependency>

     <dependency>
        <groupId>org.sonarsource.api.plugin</groupId>
        <artifactId>sonar-plugin-api-test-fixtures</artifactId>
        <version>${sonar.plugin.api.version}</version>
        <scope>test</scope>
      </dependency>

  </dependencies>


  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>false</shadedArtifactAttached>
              <minimizeJar>true</minimizeJar>
              <createDependencyReducedPom>false</createDependencyReducedPom>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
        <artifactId>sonar-packaging-maven-plugin</artifactId>
        <configuration>
          <!-- SonarHTML replaces SonarWeb but we keep the plugin key "web" to make it easier for users to migrate -->
          <pluginKey>web</pluginKey>
          <jreMinVersion>${jdk.min.version}</jreMinVersion>
          <!-- this value is translated to Sonar-Version property in META-INF/MANIFEST.MF file inside jar. It is used at runtime
          by products to detect compatibility. We keep LTS -->
          <pluginApiMinVersion>9.9</pluginApiMinVersion>
          <requiredForLanguages>web,jsp,js,php</requiredForLanguages>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-plugin-size</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <rules>
                <requireFilesSize>
                  <minsize>500000</minsize>
                  <maxsize>700000</maxsize>
                  <files>
                    <file>${project.build.directory}/${project.build.finalName}.jar</file>
                  </files>
                </requireFilesSize>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
