<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="https://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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>net.osslabz</groupId>
    <artifactId>evm-client</artifactId>
    <version>0.0.14</version>

    <name>EvmClient (${project.groupId}:${project.artifactId})</name>
    <description>A simple wrapper around web3j to simplify common use-cases. Also provides pre-configured information
        to access other EVM-compatible chains except Ethereum itself (e.g. Avalanche).
    </description>
    <url>https://github.com/osslabz/evm-client</url>

    <properties>
        <osslabz.encoding>UTF-8</osslabz.encoding>
        <osslabz.java.version>17</osslabz.java.version>

        <project.build.sourceEncoding>${osslabz.encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${osslabz.encoding}</project.reporting.outputEncoding>

        <maven.compiler.source>${osslabz.java.version}</maven.compiler.source>
        <maven.compiler.target>${osslabz.java.version}</maven.compiler.target>
        <maven.compiler.release>${osslabz.java.version}</maven.compiler.release>

        <web3j.groupId>org.web3j</web3j.groupId>
        <web3j.version>4.10.0</web3j.version>
        <okhttp3.version>4.11.0</okhttp3.version>
    </properties>

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

    <developers>
        <developer>
            <name>Raphael Vullriede</name>
            <email>raphael@osslabz.net</email>
            <organization>osslabz.net</organization>
            <organizationUrl>http://www.osslabz.net</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:ssh://git@github.com/osslabz/evm-client.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/osslabz/evm-client.git</developerConnection>
        <url>https://github.com/osslabz/evm-client</url>
        <tag>HEAD</tag>
    </scm>

    <dependencies>
        <!-- JSON-RPC Client -->
        <dependency>
            <groupId>${web3j.groupId}</groupId>
            <artifactId>core</artifactId>
            <version>${web3j.version}</version>
        </dependency>
        <dependency>
            <groupId>${web3j.groupId}</groupId>
            <artifactId>contracts</artifactId>
            <version>${web3j.version}</version>
        </dependency>

        <!-- okhttp has some bug fixes for http/2 in recent versions, let's ensure we use the latest -->

        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>${okhttp3.version}</version>
        </dependency>

        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>logging-interceptor</artifactId>
            <version>${okhttp3.version}</version>
        </dependency>

        <!-- web3j brings https://github.com/TooTallNate/Java-WebSocket but we want to enforce the latest version -->
        <dependency>
            <groupId>org.java-websocket</groupId>
            <artifactId>Java-WebSocket</artifactId>
            <version>1.5.3</version>
        </dependency>


        <!-- common tools -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.28</version>
            <scope>provided</scope>
        </dependency>

        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.7</version>
        </dependency>


        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>

        <!-- default logging impl for tests -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.4.7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <profiles>
        <profile>
            <id>osslabz-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.5.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <doclint>none</doclint>
                                    <failOnError>false</failOnError>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>