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

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.openhab.core.tools</groupId>
    <artifactId>org.openhab.core.reactor.tools</artifactId>
    <version>4.1.0-SNAPSHOT</version>
  </parent>

  <artifactId>upgradetool</artifactId>

  <packaging>jar</packaging>

  <name>openHAB Core :: Tools :: Upgrade tool</name>
  <description>A tool for upgrading openHAB from 3.4 to 4.0</description>

  <dependencies>
    <dependency>
      <groupId>org.openhab.core.bundles</groupId>
      <artifactId>org.openhab.core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.openhab.core.bundles</groupId>
      <artifactId>org.openhab.core.thing</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.openhab.core.bundles</groupId>
      <artifactId>org.openhab.core.storage.json</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.5.0</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.9.1</version>
    </dependency>
    <dependency>
      <groupId>javax.measure</groupId>
      <artifactId>unit-api</artifactId>
      <version>2.2</version>
    </dependency>
    <dependency>
      <groupId>si.uom</groupId>
      <artifactId>si-units</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>tech.units</groupId>
      <artifactId>indriya</artifactId>
      <version>2.2</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jdt</groupId>
      <artifactId>org.eclipse.jdt.annotation</artifactId>
      <version>2.2.600</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>unpack-eea</id>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.lastnpe.eea</groupId>
                  <artifactId>eea-all</artifactId>
                  <version>${eea.version}</version>
                  <overWrite>true</overWrite>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.openhab.core.tools.UpgradeTool</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
