<?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 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.eclipse.sensinact.gateway.distribution</groupId>
    <artifactId>distribution</artifactId>
    <version>0.0.2-SNAPSHOT</version>
  </parent>
  <artifactId>launcher</artifactId>
  <name>Eclipse sensiNact Feature Launcher</name>
  <description>This project contains code for launching sensiNact gateway features</description>
  <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>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-json_1.1_spec</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </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>
      </plugin>
      <plugin>
        <groupId>
          biz.aQute.bnd</groupId>
        <artifactId>bnd-export-maven-plugin</artifactId>
        <!-- Use 6.4.0 to avoid requiring Java 17 to run -->
        <version>6.4.0</version>
        <executions>
          <execution>
            <id>
              export</id>
            <goals>
              <goal>export</goal>
            </goals>
            <configuration>
              <resolve>true</resolve>
              <failOnChanges>false</failOnChanges>
              <includeDependencyManagement>true</includeDependencyManagement>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>
          org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>
              generate-repo</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <!-- We use the local repository as the output, not the copied files -->
            <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>
        <groupId>
          org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>