<?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>

    <groupId>energy.trolie</groupId>
    <artifactId>java-client-sdk-parent</artifactId>
    <version>1.3.0</version>
    <packaging>pom</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Parent POM for the TROLIE Java client SDK, implementing
        an opinionated idiomatic Java API to access TROLIE servers.
    </description>
    <url>https://trolie.energy</url>


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

    <modules>
        <module>java-client</module>
        <module>java-client-examples</module>
    </modules>

    <scm>
        <connection>scm:git:git://github.com/trolie/java-client-sdk.git</connection>
        <developerConnection>scm:git:ssh://github.com:trolie/java-client-sdk.git</developerConnection>
        <url>https://github.com/trolie/java-client-sdk</url>
    </scm>

    <developers>
        <developer>
            <name>Tory McKeag</name>
            <email>tory.mckeag@ge.com</email>
            <organization>GE Vernova</organization>
            <organizationUrl>https://www.gevernova.com</organizationUrl>
            <timezone>America/Los_Angeles</timezone>
        </developer>
        <developer>
            <name>Alec Britton</name>
            <email>alec.britton@ge.com</email>
            <organization>GE Vernova</organization>
            <organizationUrl>https://www.gevernova.com</organizationUrl>
            <timezone>America/Los_Angeles</timezone>
        </developer>
        <developer>
            <name>Aidan Short</name>
            <email>aidan.short@ge.com</email>
            <organization>GE Vernova</organization>
            <organizationUrl>https://www.gevernova.com</organizationUrl>
            <timezone>America/Los_Angeles</timezone>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.release>17</maven.compiler.release>
        <maven.compiler.target>17</maven.compiler.target>

        <!-- Note these are extracted to properties to allow for easy maven deployment to local
             repos without having to fork the POM.  -->
        <snapshot.repository.id>central</snapshot.repository.id>
        <snapshot.repository.url>https://oss.sonatype.org/content/repositories/snapshots</snapshot.repository.url>
        <release.repository.id>central</release.repository.id>
        <release.repository.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.repository.url>


        <!-- Dependency versions -->
        <version.lombok>1.18.36</version.lombok>

        <version.jackson>2.18.2</version.jackson>
        <version.httpclient5>5.4.3</version.httpclient5>

	    <version.slf4j>2.0.13</version.slf4j>
	    <version.logback>1.5.14</version.logback>
		<version.junit>5.11.4</version.junit>
        <version.mockito>5.7.0</version.mockito>
        <version.commons.csv>1.12.0</version.commons.csv>
        <version.commons.lang>3.17.0</version.commons.lang>

    </properties>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${version.lombok}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents.client5</groupId>
                <artifactId>httpclient5</artifactId>
                <version>${version.httpclient5}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-csv</artifactId>
                <version>${version.commons.csv}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${version.commons.lang}</version>
            </dependency>
	      <dependency>
	        <groupId>org.slf4j</groupId>
	        <artifactId>slf4j-api</artifactId>
	        <version>${version.slf4j}</version>
	      </dependency>
	      <dependency>
	        <groupId>ch.qos.logback</groupId>
	        <artifactId>logback-classic</artifactId>
	        <version>${version.logback}</version>
              <scope>provided</scope>
	      </dependency>
	      <dependency>
	        <groupId>ch.qos.logback</groupId>
	        <artifactId>logback-core</artifactId>
	        <version>${version.logback}</version>
              <scope>provided</scope>
	      </dependency>            
		    <dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${version.junit}</version>
				<scope>test</scope>
		    </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${version.mockito}</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
	    <pluginManagement>
	      <plugins>
	        <plugin>
	          <groupId>org.apache.maven.plugins</groupId>
	          <artifactId>maven-surefire-plugin</artifactId>
	          <version>3.5.0</version>
	        </plugin>
	      </plugins>
	    </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</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.7.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- This profile is for users building the repository one their own and not deploying to Maven central.  -->
            <id>local-deployment</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>${snapshot.repository.id}</id>
                    <url>${snapshot.repository.url}</url>
                </snapshotRepository>
                <repository>
                    <id>${release.repository.id}</id>
                    <url>${release.repository.url}</url>
                </repository>
            </distributionManagement>
        </profile>    
        <profile>
            <!-- Profile that activates plugins specifically needed for publishing to
                 Maven Central.  Not required for general dev workflow -->
            <id>publish</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>
                </plugins>
            </build>

        </profile>

    </profiles>


</project>
