<!--

     Copyright 2005-2014 Red Hat, Inc.

     Red Hat 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
      <groupId>io.fabric8</groupId>
      <artifactId>fabric-project</artifactId>
      <version>1.1.0.Beta6</version>
    </parent>

    <artifactId>fabric-core</artifactId>
    <packaging>bundle</packaging>

    <name>Fabric8 :: Core</name>

    <properties>
        <fuse.osgi.import>
          *
        </fuse.osgi.import>
        <fuse.osgi.export>
            io.fabric8.api.jmx;version=${project.version},
            io.fabric8.api.locks;version=${project.version},
            io.fabric8.api.proxy;version=${project.version};-noimport:=true,
            io.fabric8.service*;version=${project.version};-noimport:=true,
            io.fabric8.internal*;version=${project.version};-noimport:=true,
        </fuse.osgi.export>
        <fuse.osgi.private.pkg>
            io.fabric8.internal,
            io.fabric8.utils;-split-package:=first,
            org.apache.felix.utils.properties;-split-package:=first,
            org.apache.felix.utils.version;-split-package:=first
        </fuse.osgi.private.pkg>
        <fuse.osgi.services.export>
            io.fabric8.api.FabricService,
            io.fabric8.api.DataStore,
            io.fabric8.api.ZooKeeperClusterBootstrap,
            io.fabric8.api.ZooKeeperClusterService
        </fuse.osgi.services.export>
        <fuse.osgi.service.component>
            <!-- Use explicit file locations because there is no support for wildcard resource discovery in non-osgi environments -->
            OSGI-INF/io.fabric8.api.jmx.ClusterBootstrapManager.xml,
            OSGI-INF/io.fabric8.api.jmx.ClusterServiceManager.xml,
            OSGI-INF/io.fabric8.api.jmx.MetaTypeFacade.xml,
            OSGI-INF/io.fabric8.api.jmx.MQManager.xml,
            OSGI-INF/io.fabric8.internal.locks.LockServiceImpl.xml,
            OSGI-INF/io.fabric8.internal.ZooKeeperClusterBootstrapImpl.xml,
            OSGI-INF/io.fabric8.internal.ZooKeeperClusterServiceImpl.xml,
            OSGI-INF/io.fabric8.service.child.ChildContainerProvider.xml,
            OSGI-INF/io.fabric8.service.ChecksumPlaceholderResolver.xml,
            OSGI-INF/io.fabric8.service.ComponentConfigurer.xml,
            OSGI-INF/io.fabric8.service.ContainerPlaceholderResolver.xml,
            OSGI-INF/io.fabric8.service.EncryptedPropertyResolver.xml,
            OSGI-INF/io.fabric8.service.EnvPlaceholderResolver.xml,
            OSGI-INF/io.fabric8.service.FabricMBeanRegistrationListener.xml,
            OSGI-INF/io.fabric8.service.FabricServiceImpl.xml,
            OSGI-INF/io.fabric8.service.PortPlaceholderResolver.xml,
            OSGI-INF/io.fabric8.service.ProfilePropertyPointerResolver.xml,
            OSGI-INF/io.fabric8.service.MvelUrlHandler.xml,
            OSGI-INF/io.fabric8.service.ProfileUrlHandler.xml,
            OSGI-INF/io.fabric8.service.VersionPropertyPointerResolver.xml,
            OSGI-INF/io.fabric8.service.ZookeeperPlaceholderResolver.xml,
            OSGI-INF/io.fabric8.service.ZookeeperPortService.xml,
            OSGI-INF/io.fabric8.service.FreeGeoIpService.xml
        </fuse.osgi.service.component>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.admin</groupId>
            <artifactId>org.apache.karaf.admin.management</artifactId>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>fabric-api</artifactId>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>fabric-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>fabric-zookeeper</artifactId>
        </dependency>
        <dependency>
            <groupId>io.fabric8.insight</groupId>
            <artifactId>insight-log</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mvel</groupId>
            <artifactId>mvel2</artifactId>
        </dependency>
        
        <!-- Provided Dependencies -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.log</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.enterprise</artifactId>
            <scope>provided</scope>
        </dependency>



        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>fabric-zookeeper-spring</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>scr</goal>
                        </goals>
                        <configuration>
                            <specVersion>1.2</specVersion>
                            <strictMode>false</strictMode>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Gravia-Enabled>true</Gravia-Enabled>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
