<!--

    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.

-->
<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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.ops4j.pax.cdi</groupId>
        <version>1.0.0</version>
        <artifactId>pax-cdi-parent</artifactId>
        <relativePath>../pax-cdi-parent</relativePath>
    </parent>
    <artifactId>pax-cdi-extension</artifactId>
    <packaging>bundle</packaging>

    <name>OPS4J Pax CDI Portable Extension for OSGi</name>

    <properties>
        <bundle.symbolicName>org.ops4j.pax.cdi.extension</bundle.symbolicName>
        <bundle.namespace>org.ops4j.pax.cdi.extension</bundle.namespace>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>6.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>osgi.enterprise</artifactId>
                <version>6.0.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.enterprise</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.cdi</groupId>
            <artifactId>pax-cdi-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.cdi</groupId>
            <artifactId>pax-cdi-spi</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.swissbox</groupId>
            <artifactId>pax-swissbox-tracker</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-atinject_1.0_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr</artifactId>
            <version>2.0.12</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.tinybundles</groupId>
            <artifactId>tinybundles</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.weld.se</groupId>
            <artifactId>weld-se-core</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.configadmin</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.karaf.bundle</groupId>
            <artifactId>org.apache.karaf.bundle.core</artifactId>
            <version>4.0.4</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
                        <Import-Package>
                            org.osgi.framework;version="[1.7,2)",
                            org.osgi.framework.wiring;version="[1.1,2)",
                            org.slf4j;version="[1.6,2)";resolution:=optional,
                            org.apache.karaf.bundle.core;version="[3,5)";resolution:=optional,
                            org.apache.webbeans.proxy;resolution:=optional,
                            org.apache.webbeans.intercept;resolution:=optional,
                            *
                        </Import-Package>
                        <Export-Package>
                            org.ops4j.pax.cdi.extension.api*,
                            org.ops4j.pax.cdi.extension.impl*
                        </Export-Package>
                        <Private-Package>
                            org.osgi.util.function,
                            org.osgi.util.promise,
                            org.osgi.service.component,
                            org.apache.felix.scr.component,
                            org.apache.felix.scr.impl.helper,
                            org.apache.felix.scr.impl.manager,
                            org.apache.felix.scr.impl.metadata,
                            org.ops4j.pax.swissbox.lifecycle,
                            org.ops4j.pax.cdi.extension.impl.*
                        </Private-Package>
                        <Provide-Capability>
                            org.ops4j.pax.cdi.extension; extension=pax-cdi-extension;
                                version:Version=${version;====;${replace;${project.version};-;.}},
                            osgi.cdi.extension; osgi.cdi.extension=pax-cdi-extension;
                                version:Version=${version;====;${replace;${project.version};-;.}}
                        </Provide-Capability>
                        <Bundle-Activator>
                            org.ops4j.pax.cdi.extension.impl.osgi.Activator
                        </Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
