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

    <!--

        Licensed to the Apache Software Foundation (ASF) under one or more
        contributor license agreements.  See the NOTICE file distributed with
        this work for additional information regarding copyright ownership.
        The ASF licenses this file to You under the Apache License, Version 2.0
        (the "License"); you may not use this file except in compliance with
        the License.  You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.
    -->

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.karaf.assemblies.features</groupId>
        <artifactId>features</artifactId>
        <version>4.3.7</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>org.apache.karaf.features</groupId>
    <artifactId>base</artifactId>
    <name>Apache Karaf :: Assemblies :: Features :: Base</name>

    <properties>
        <appendedResourcesDirectory>${basedir}/../../../etc/appended-resources</appendedResourcesDirectory>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.karaf</groupId>
                <artifactId>karaf-bom</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>${javax.annotation.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.activation-api-1.2.1</artifactId>
            <version>1.2.1_3</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>txw2</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.istack</groupId>
            <artifactId>istack-commons-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.specs</groupId>
            <artifactId>org.apache.karaf.specs.locator</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.specs</groupId>
            <artifactId>org.apache.karaf.specs.java.xml</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.specs</groupId>
            <artifactId>org.apache.karaf.specs.java.xml.ws</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.specs</groupId>
            <artifactId>org.apache.karaf.specs.activator</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf</groupId>
            <artifactId>org.apache.karaf.main</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf</groupId>
            <artifactId>org.apache.karaf.client</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.boot</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.diagnostic</groupId>
            <artifactId>org.apache.karaf.diagnostic.boot</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/filtered-resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <useDefaultDelimiters>false</useDefaultDelimiters>
                    <delimiters>
                        <delimiter>@@</delimiter>
                    </delimiters>
                </configuration>
                <executions>
                    <execution>
                        <id>filter</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.karaf.specs</groupId>
                                    <artifactId>org.apache.karaf.specs.locator</artifactId>
                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.karaf.specs</groupId>
                                    <artifactId>org.apache.karaf.specs.java.xml</artifactId>
                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.karaf.specs</groupId>
                                    <artifactId>org.apache.karaf.specs.java.xml.ws</artifactId>
                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>jakarta.xml.bind</groupId>
                                    <artifactId>jakarta.xml.bind-api</artifactId>
                                    <outputDirectory>target/classes/resources/lib/jdk9plus</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>javax.annotation</groupId>
                                    <artifactId>javax.annotation-api</artifactId>
                                    <outputDirectory>target/classes/resources/lib/jdk9plus</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.servicemix.specs</groupId>
                                    <artifactId>org.apache.servicemix.specs.activation-api-1.2.1</artifactId>
                                    <outputDirectory>target/classes/resources/lib/jdk9plus</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.glassfish.jaxb</groupId>
                                    <artifactId>jaxb-runtime</artifactId>
                                    <outputDirectory>target/classes/resources/lib/jdk9plus</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.glassfish.jaxb</groupId>
                                    <artifactId>txw2</artifactId>
                                    <outputDirectory>target/classes/resources/lib/jdk9plus</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.istack</groupId>
                                    <artifactId>istack-commons-runtime</artifactId>
                                    <outputDirectory>target/classes/resources/lib/jdk9plus</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.karaf</groupId>
                                    <artifactId>org.apache.karaf.main</artifactId>
                                    <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.osgi</groupId>
                                    <artifactId>osgi.core</artifactId>
                                    <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.karaf.specs</groupId>
                                    <artifactId>org.apache.karaf.specs.activator</artifactId>
                                    <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.karaf</groupId>
                                    <artifactId>org.apache.karaf.client</artifactId>
                                    <outputDirectory>target/classes/resources/system/org/apache/karaf/org.apache.karaf.client/${project.version}</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.felix</groupId>
                                    <artifactId>org.apache.felix.framework</artifactId>
                                    <outputDirectory>target/classes/resources/system/org/apache/felix/org.apache.felix.framework/${felix.framework.version}</outputDirectory>
                                    <destFileName>org.apache.felix.framework-${felix.framework.version}.jar
                                    </destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>${equinox.groupId}</groupId>
                                    <artifactId>${equinox.artifactId}</artifactId>
                                    <outputDirectory>target/classes/resources/system/${equinox.path}/${equinox.artifactId}/${equinox.version}</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.winsw</groupId>
                                    <artifactId>winsw</artifactId>
                                    <version>${winsw.version}</version>
                                    <classifier>net4</classifier>
                                    <type>exe</type>
                                    <outputDirectory>target/classes/resources/bin/contrib</outputDirectory>
                                    <destFileName>karaf-service-win.exe</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>regex-property</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <configuration>
                            <name>equinox.path</name>
                            <value>${equinox.groupId}</value>
                            <regex>\.</regex>
                            <replacement>/</replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>jenkins</id>
            <name>jenkins</name>
            <url>https://repo.jenkins-ci.org/releases/</url>
        </repository>
    </repositories>
</project>
