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

    <groupId>org.apache.karaf.features</groupId>
    <artifactId>enterprise-legacy</artifactId>
    <packaging>pom</packaging>
    <name>Apache Karaf :: Assemblies :: Features :: Enterprise Legacy</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>

        <!-- Framework distribution -->
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <type>kar</type>
            <scope>provided</scope>
        </dependency>

        <!-- transaction deps -->
        <dependency>
            <groupId>org.apache.aries.transaction</groupId>
            <artifactId>org.apache.aries.transaction.blueprint</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.transaction</groupId>
            <artifactId>org.apache.aries.transaction.manager</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- jpa deps -->
        <dependency>
            <groupId>org.apache.aries</groupId>
            <artifactId>org.apache.aries.util</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jpa</groupId>
            <artifactId>org.apache.aries.jpa.api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jpa</groupId>
            <artifactId>org.apache.aries.jpa.blueprint.aries</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jpa</groupId>
            <artifactId>org.apache.aries.jpa.container</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jpa</groupId>
            <artifactId>org.apache.aries.jpa.container.context</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- jndi deps -->
        <dependency>
            <groupId>org.apache.aries.jndi</groupId>
            <artifactId>org.apache.aries.jndi.api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jndi</groupId>
            <artifactId>org.apache.aries.jndi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jndi</groupId>
            <artifactId>org.apache.aries.jndi.rmi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jndi</groupId>
            <artifactId>org.apache.aries.jndi.url</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jndi</groupId>
            <artifactId>org.apache.aries.jndi.legacy.support</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- application-without-isolation deps -->
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.resolver.obr</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.install</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.management</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.utils</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.modeller</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.default.local.platform</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.deployment.management</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- without isolation -->
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.runtime</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- subsystems -->
        <dependency>
            <groupId>org.apache.karaf.services</groupId>
            <artifactId>org.apache.karaf.services.coordinator</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.subsystem</groupId>
            <artifactId>org.apache.karaf.subsystem.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.cdi</groupId>
            <artifactId>pax-cdi-features</artifactId>
            <version>${pax.cdi.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <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.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>

</project>
