<?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>io.github.extrawest</groupId>
    <artifactId>bdd-charge-point-tester-via-ocpp-j</artifactId>
    <version>0.1.2</version>

    <name>bdd-charge-point-tester-via-ocpp-j</name>
    <description>OCPP operation tester for the Charge Points</description>
    <url>https://github.com/extrawest/BDD-Charge-Point-Tester-via-OCPP-J-</url>
    <inceptionYear>2023</inceptionYear>
    <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>
            <id>oleksandr.ostapchuk</id>
            <name>Oleksandr Ostapchuk</name>
            <email>oleksandr.ostapchuk@extrawest.com</email>
            <timezone>+2</timezone>
        </developer>
        <developer>
            <id>vladyslav.tertyshnyi</id>
            <name>Vladyslav Tertyshnyi</name>
            <email>vladyslav.tertyshnyi@extrawest.com</email>
            <timezone>+2</timezone>
        </developer>
    </developers>
    <organization>
        <name>Extrawest</name>
        <url>https://www.extrawest.com/</url>
    </organization>
    <scm>
        <connection>scm:git:git@github.com:extrawest/BDD-Charge-Point-Tester-via-OCPP-J-.git</connection>
        <developerConnection>scm:git:ssh://github.com:extrawest/BDD-Charge-Point-Tester-via-OCPP-J-.git</developerConnection>
        <url>https://github.com/extrawest/BDD-Charge-Point-Tester-via-OCPP-J-/tree/main</url>
    </scm>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <java.version>17</java.version>
        <org.java-websocket.version>1.5.1</org.java-websocket.version>
        <google.gson.version>2.9.1</google.gson.version>
        <eu.chargetime.ocpp.version>1.0.1</eu.chargetime.ocpp.version>
        <cucumber.version>7.11.0</cucumber.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.java-websocket</groupId>
            <artifactId>Java-WebSocket</artifactId>
            <version>${org.java-websocket.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${google.gson.version}</version>
        </dependency>
        <dependency>
            <groupId>eu.chargetime.ocpp</groupId>
            <artifactId>v1_6</artifactId>
            <version>${eu.chargetime.ocpp.version}</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-spring</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-test</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.name}</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <classifier>exec</classifier>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.4.2</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>**/SpringIntegrationTest.java</mainClass>
                                </manifest>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jreleaser</groupId>
                <artifactId>jreleaser-maven-plugin</artifactId>
                <version>1.5.0</version>
                <configuration>
                    <jreleaser>
                        <project>
                            <description>OCPP operation tester for the Charge Points</description>
                            <website>https://github.com/extrawest/BDD-Charge-Point-Tester-via-OCPP-J-/tree/main</website>
                            <docsUrl>https://github.com/extrawest/BDD-Charge-Point-Tester-via-OCPP-J-/tree/main</docsUrl>
                            <license>APACHE-2.0</license>
                            <copyright>2023 Extrawest</copyright>
                        </project>
                        <signing>
                            <active>ALWAYS</active>
                            <armored>true</armored>
                        </signing>
                        <deploy>
                            <maven>
                                <nexus2>
                                    <maven-central>
                                        <active>ALWAYS</active>
                                        <url>https://s01.oss.sonatype.org/service/local</url>;
                                        <closeRepository>false</closeRepository>
                                        <releaseRepository>false</releaseRepository>
                                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                                    </maven-central>
                                </nexus2>
                            </maven>
                        </deploy>
                    </jreleaser>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.5.0</version>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <!-- Sonatype Repository -->
        <repository>
            <id>sonatype-nexus-releases</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>

        <!-- GitHub Releases -->
        <snapshotRepository>
            <id>github-releases</id>
            <url>https://maven.pkg.github.com/extrawest/BDD-Charge-Point-Tester-via-OCPP-J-</url>
            <name>GitHub Package Registry</name>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

</project>
