<?xml version="1.0" encoding="UTF-8"?>
<!--
/*********************************************************************
* Copyright (c) 2022 Kentyou and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.eclipse.sensinact.gateway.distribution</groupId>
    <artifactId>distribution</artifactId>
    <version>0.0.2-SNAPSHOT</version>
  </parent>
  <groupId>org.eclipse.sensinact.gateway.distribution</groupId>
  <artifactId>launcher</artifactId>
  <version>0.0.2-SNAPSHOT</version>
  <name>Eclipse sensiNact Feature Launcher</name>
  <description>This project contains code for launching sensiNact gateway features</description>
  <licenses>
    <license>
      <name>EPL 2.0</name>
      <url>http://www.eclipse.org/legal/epl-2.0</url>
      <distribution>repo</distribution>
      <comments>Except for 3rd party content and examples.</comments>
    </license>
  </licenses>
  <properties>
    <verify.test.bndruns>true</verify.test.bndruns>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.component.annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi.core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.cm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.feature</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.cm.json</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.feature</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.johnzon</groupId>
      <artifactId>johnzon-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.util.converter</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.json</groupId>
      <artifactId>jakarta.json-api</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.sensinact.gateway.distribution</groupId>
      <artifactId>test-utils</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>biz.aQute.bnd</groupId>
        <artifactId>bnd-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>biz.aQute.bnd</groupId>
        <artifactId>bnd-resolver-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>verify-export</id>
            <phase>package</phase>
            <goals>
              <goal>verify</goal>
            </goals>
            <configuration>
              <includeDependencyManagement>true</includeDependencyManagement>
              <scopes>
                <scope>compile</scope>
                <scope>runtime</scope>
              </scopes>
              <bundles>
                <bundle>${project.build.directory}/${project.build.finalName}.jar</bundle>
              </bundles>
              <bndruns>
                <bndrun>export.bndrun</bndrun>
              </bndruns>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>biz.aQute.bnd</groupId>
        <artifactId>bnd-export-maven-plugin</artifactId>
        <version>6.4.0</version>
        <executions>
          <execution>
            <id>export</id>
            <goals>
              <goal>export</goal>
            </goals>
            <configuration>
              <resolve>true</resolve>
              <failOnChanges>true</failOnChanges>
              <includeDependencyManagement>true</includeDependencyManagement>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-repo</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <localRepositoryDirectory>${project.build.directory}/it/repository</localRepositoryDirectory>
              <artifactItems>
                <artifactItem>
                  <groupId>org.apache.felix</groupId>
                  <artifactId>org.apache.felix.http.jetty</artifactId>
                  <version>5.0.0</version>
                </artifactItem>
                <artifactItem>
                  <groupId>org.apache.felix</groupId>
                  <artifactId>org.apache.felix.http.servlet-api</artifactId>
                  <version>2.1.0</version>
                </artifactItem>
                <artifactItem>
                  <groupId>org.apache.felix</groupId>
                  <artifactId>org.apache.felix.gogo.shell</artifactId>
                  <version>1.1.4</version>
                </artifactItem>
                <artifactItem>
                  <groupId>org.apache.felix</groupId>
                  <artifactId>org.apache.felix.gogo.runtime</artifactId>
                  <version>1.1.4</version>
                </artifactItem>
                <artifactItem>
                  <groupId>org.apache.felix</groupId>
                  <artifactId>org.apache.felix.gogo.command</artifactId>
                  <version>1.1.2</version>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>