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

    <parent>
        <groupId>io.github.o2alexanderfedin.javafv</groupId>
        <artifactId>java-fv-parent</artifactId>
        <version>13.1</version>
    </parent>

    <artifactId>lsp</artifactId>
    <packaging>jar</packaging>

    <name>Java-FV LSP Server</name>
    <description>Language Server Protocol implementation for Java-FV formal verification</description>

    <properties>
        <lsp4j.version>0.24.0</lsp4j.version>
    </properties>

    <dependencies>
        <!-- LSP4J for Language Server Protocol -->
        <dependency>
            <groupId>org.eclipse.lsp4j</groupId>
            <artifactId>org.eclipse.lsp4j</artifactId>
            <version>${lsp4j.version}</version>
        </dependency>

        <!-- Compiler plugin module for analyzers -->
        <dependency>
            <groupId>io.github.o2alexanderfedin.javafv</groupId>
            <artifactId>compiler-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Verifier module for solver infrastructure -->
        <dependency>
            <groupId>io.github.o2alexanderfedin.javafv</groupId>
            <artifactId>verifier</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Yices module for Yices2 binary bundling -->
        <dependency>
            <groupId>io.github.o2alexanderfedin.javafv</groupId>
            <artifactId>java-fv-yices</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- JSON processing for config files -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.10.1</version>
        </dependency>

        <!-- Caffeine for concurrent caching -->
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Java-FV contract annotations (needed for ContractMethod benchmark fixture) -->
        <dependency>
            <groupId>io.github.o2alexanderfedin.javafv</groupId>
            <artifactId>java-fv-annotations</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- JMH Benchmarks -->
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-core</artifactId>
            <version>1.37</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-generator-annprocess</artifactId>
            <version>1.37</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>test-compile-with-jmh</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>org.openjdk.jmh</groupId>
                                    <artifactId>jmh-generator-annprocess</artifactId>
                                    <version>1.37</version>
                                </path>
                            </annotationProcessorPaths>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <!-- Assembly plugin for uber JAR -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>io.github.o2alexanderfedin.javafv.lsp.JavaFVLanguageServerLauncher</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <finalName>java-fv-lsp</finalName>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
