<?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">
  <parent>
    <artifactId>parent</artifactId>
    <groupId>org.sonarsource.parent</groupId>
    <version>60.0.52</version>
    <relativePath>pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.sonarsource.sonarlint.ls</groupId>
  <artifactId>sonarlint-language-server</artifactId>
  <name>SonarLint Language Server</name>
  <version>2.4.1.46285</version>
  <description>SonarLint Language Server</description>
  <issueManagement>
    <system>JIRA</system>
    <url>https://jira.sonarsource.com/browse/SLLS</url>
  </issueManagement>
  <organization>
    <name>SonarSource</name>
    <url>http://www.sonarsource.com/</url>
  </organization>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>false</addClasspath>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <mainClass>org.sonarsource.sonarlint.ls.ServerMain</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-test-plugins</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.sonarsource.java</groupId>
                  <artifactId>sonar-java-plugin</artifactId>
                  <version>${sonar.java.version}</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/plugins</outputDirectory>
                  <destFileName>java.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>org.sonarsource.javascript</groupId>
                  <artifactId>sonar-javascript-plugin</artifactId>
                  <version>${sonar.javascript.version}</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/plugins</outputDirectory>
                  <destFileName>javascript.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>org.sonarsource.python</groupId>
                  <artifactId>sonar-python-plugin</artifactId>
                  <version>${sonar.python.version}</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/plugins</outputDirectory>
                  <destFileName>python.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>org.sonarsource.php</groupId>
                  <artifactId>sonar-php-plugin</artifactId>
                  <version>${sonar.php.version}</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/plugins</outputDirectory>
                  <destFileName>php.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>org.sonarsource.html</groupId>
                  <artifactId>sonar-html-plugin</artifactId>
                  <version>${sonar.html.version}</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/plugins</outputDirectory>
                  <destFileName>html.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>org.sonarsource.xml</groupId>
                  <artifactId>sonar-xml-plugin</artifactId>
                  <version>${sonar.xml.version}</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/plugins</outputDirectory>
                  <destFileName>xml.jar</destFileName>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <minimizeJar>false</minimizeJar>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <source>8</source>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
          <environmentVariables>
            <PATH>${basedir}/src/test/resources/fake-ts-project/node${path.separator}${env.PATH}</PATH>
          </environmentVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.8.0</version>
        <executions>
          <execution>
            <id>install node and npm</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
          </execution>
          <execution>
            <id>npm install</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>install</arguments>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <nodeVersion>v11.12.0</nodeVersion>
          <workingDirectory>src/test/resources/fake-ts-project</workingDirectory>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>coverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.4</version>
            <executions>
              <execution>
                <id>prepare-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>report</id>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>commercial</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-commercial-plugins</id>
                <phase>validate</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>com.sonarsource.cpp</groupId>
                      <artifactId>sonar-cfamily-plugin</artifactId>
                      <version>6.31.0.44497</version>
                      <destFileName>cfamily.jar</destFileName>
                      <type>jar</type>
                    </artifactItem>
                  </artifactItems>
                  <outputDirectory>${project.build.directory}/plugins</outputDirectory>
                  <overWriteReleases>false</overWriteReleases>
                  <overWriteSnapshots>true</overWriteSnapshots>
                  <stripVersion>false</stripVersion>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>1.9</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.11.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.8.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>4.2.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.22.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>4.4.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>byte-buddy-agent</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <sonar.xml.version>2.5.0.3376</sonar.xml.version>
    <jdk.min.version>11</jdk.min.version>
    <sonarlint.core.version>8.4.0.45663</sonarlint.core.version>
    <artifactsToPublish>${project.groupId}:${project.artifactId}:jar</artifactsToPublish>
    <sonar.php.version>3.5.0.5655</sonar.php.version>
    <sonar.javascript.version>6.2.1.12157</sonar.javascript.version>
    <sonar.html.version>3.2.0.2082</sonar.html.version>
    <sonar.python.version>2.13.0.7236</sonar.python.version>
    <sonar.java.version>7.7.0.28547</sonar.java.version>
    <gitRepositoryName>sonarlint-language-server</gitRepositoryName>
  </properties>
</project>
