<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2026 Goldman Sachs

 Licensed 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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.finos.legend.pure</groupId>
    <artifactId>legend-pure-lsp</artifactId>
    <version>5.108.0</version>
  </parent>
  <artifactId>legend-pure-lsp-server</artifactId>
  <version>5.108.0</version>
  <name>Legend Pure - LSP - Server</name>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.errorprone</groupId>
        <artifactId>error_prone_annotations</artifactId>
        <version>2.48.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j</artifactId>
      <version>${lsp4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j.jsonrpc</artifactId>
      <version>${lsp4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j.debug</artifactId>
      <version>${lsp4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j.jsonrpc.debug</artifactId>
      <version>${lsp4j.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>${gson.version}</version>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m4</artifactId>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m3-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-runtime-java-engine-interpreted</artifactId>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-runtime-java-engine-mixed</artifactId>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m3-precisePrimitives</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-mapping-pure</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-mapping-grammar</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-store-pure</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-store-grammar</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-graph-pure</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-graph-grammar</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-path-pure</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-path-grammar</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-diagram-pure</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-diagram-grammar</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-tds-pure</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-dsl-tds-grammar</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-store-relational-pure</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m2-store-relational-grammar</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-runtime-java-extension-interpreted-dsl-path</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-runtime-java-extension-interpreted-dsl-tds</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-runtime-java-extension-interpreted-store-relational</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.finos.legend.pure.lsp.LegendPureLspServer</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-runtime-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <includeScope>runtime</includeScope>
              <outputDirectory>${project.build.directory}/dependency</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <id>shaded-server-jar</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>shaded</shadedClassifierName>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <exclude>module-info.class</exclude>
                    <exclude>META-INF/versions/*/module-info.class</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>org.finos.legend.pure.lsp.LegendPureLspServer</mainClass>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer" />
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/LspTestSuite.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
