<?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.2.15-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>org.apache.karaf.features</groupId>
    <artifactId>standard</artifactId>
    <packaging>pom</packaging>
    <name>Apache Karaf :: Assemblies :: Features :: Standard</name>
    <description>Standard providing core Karaf features</description>

    <properties>
        <appendedResourcesDirectory>${basedir}/../../../../etc/appended-resources</appendedResourcesDirectory>
        <javax.annotation.version>1.3</javax.annotation.version>
        <geronimo.jaspic-spec.version>1.1</geronimo.jaspic-spec.version>
    </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>
        <!-- Framework distribution -->
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <type>kar</type>
            <scope>provided</scope>
        </dependency>

        <!-- standard deps -->
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.console</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.command</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.instance</groupId>
            <artifactId>org.apache.karaf.instance.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.modules</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.config</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.command</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.diagnostic</groupId>
            <artifactId>org.apache.karaf.diagnostic.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.log</groupId>
            <artifactId>org.apache.karaf.log.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.service</groupId>
            <artifactId>org.apache.karaf.service.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.commands</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- wrapper deps -->
        <dependency>
            <groupId>org.apache.karaf.wrapper</groupId>
            <artifactId>org.apache.karaf.wrapper.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- obr deps -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.service.obr</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.bundlerepository</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.obr</groupId>
            <artifactId>org.apache.karaf.obr.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-obr</artifactId>
            <classifier>uber</classifier>
            <scope>provided</scope>
        </dependency>

        <!-- config deps -->
        <dependency>
            <groupId>org.apache.karaf.config</groupId>
            <artifactId>org.apache.karaf.config.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- jetty deps -->
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${servlet.spec.groupId}</groupId>
            <artifactId>${servlet.spec.artifactId}</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- httplite deps -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.httplite.complete</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- package deps -->
        <dependency>
            <groupId>org.apache.karaf.package</groupId>
            <artifactId>org.apache.karaf.package.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- http deps -->
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-runtime</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-jetty</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.http</groupId>
            <artifactId>org.apache.karaf.http.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- http-whiteboard deps -->
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-jsp</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-extender-whiteboard</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- war deps -->
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-extender-war</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-deployer</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-war</artifactId>
            <classifier>uber</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-commons</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.web</groupId>
            <artifactId>org.apache.karaf.web.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- kar deps -->
        <dependency>
            <groupId>org.apache.karaf.kar</groupId>
            <artifactId>org.apache.karaf.kar.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.kar</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- webconsole-base deps -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.metatype</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.console</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- webconsole deps -->
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.instance</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.features</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.gogo</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.http</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.webconsole.plugins.event</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- ssh deps -->
        <dependency>
            <groupId>org.apache.sshd</groupId>
            <artifactId>sshd-osgi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sshd</groupId>
            <artifactId>sshd-scp</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sshd</groupId>
            <artifactId>sshd-sftp</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.not-yet-commons-ssl</artifactId>
            <version>0.3.11_1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcutil-jdk15on</artifactId>
            <version>${bouncycastle.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.ssh</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- management deps -->
        <dependency>
            <groupId>org.apache.karaf.management</groupId>
            <artifactId>org.apache.karaf.management.server</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx.api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx.whiteboard</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- scheduler deps -->
        <dependency>
            <groupId>org.apache.karaf.scheduler</groupId>
            <artifactId>org.apache.karaf.scheduler.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- eventadmin deps -->
        <dependency>
            <groupId>org.apache.karaf.services</groupId>
            <artifactId>org.apache.karaf.services.eventadmin</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- jasypt-encryption deps -->
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.jasypt</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.jasypt</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Spring Security Crypto encryption deps -->
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.spring-security-crypto</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- scr deps -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.scr</groupId>
            <artifactId>org.apache.karaf.scr.management</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/feature</directory>
                <filtering>true</filtering>
                <targetPath>${project.build.directory}/feature</targetPath>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <configuration>
                    <startLevel>30</startLevel>
                </configuration>
                <executions>
                    <execution>
                        <id>verify</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>mvn:org.apache.karaf.features/framework/${project.version}/xml/features</descriptor>
                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
                            </descriptors>
                            <distribution>org.apache.karaf.features:framework</distribution>
                            <javase>9</javase>
                            <framework>
                                <feature>framework</feature>
                            </framework>
                            <ignoreMissingConditions>true</ignoreMissingConditions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>target/feature/feature.xml</file>
									<classifier>features</classifier>
                                    <type>xml</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>test</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.karaf.tooling</groupId>
                        <artifactId>karaf-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>verify</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
