<?xml version="1.0" encoding="UTF-8"?>
<!--
 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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.aries</groupId>
        <artifactId>parent</artifactId>
        <version>2.0.0</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>

    <groupId>org.apache.aries.subsystem</groupId>
    <artifactId>org.apache.aries.subsystem</artifactId>
    <packaging>bundle</packaging>
    <name>Apache Aries Subsystems Bundle</name>
    <version>2.0.9-SNAPSHOT</version>
    <description>This is a standalone bundle to support Aries Subsystems.</description>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/subsystem/subsystem-bundle</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/subsystem/subsystem-bundle</developerConnection>
        <url>http://svn.apache.org/viewvc/aries/trunk/application/subsystem-bundle</url>
    </scm>

    <properties>
        <aries.osgi.activator>
            org.apache.aries.subsystem.core.internal.Activator
        </aries.osgi.activator>
    	<aries.osgi.import>
            org.osgi.service.repository;version="[1.0,1.1)",
            org.osgi.service.subsystem;version="[1.1,1.2)",
            org.apache.aries.application.*;resolution:=optional,
            *
        </aries.osgi.import>
        <aries.osgi.export.pkg>
            org.apache.aries.subsystem,
            org.osgi.service.repository,
            org.osgi.service.subsystem
        </aries.osgi.export.pkg>
        <aries.osgi.private.pkg>
            org.apache.aries.subsystem.*
        </aries.osgi.private.pkg>
        <lastReleaseVersion>1.0.0</lastReleaseVersion>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.aries.subsystem</groupId>
            <artifactId>org.apache.aries.subsystem.api</artifactId>
            <version>2.0.9-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.subsystem</groupId>
            <artifactId>org.apache.aries.subsystem.core</artifactId>
            <version>2.0.9-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries</groupId>
            <artifactId>org.apache.aries.util</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.api</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.modeller</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.application</groupId>
            <artifactId>org.apache.aries.application.utils</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.proxy</groupId>
            <artifactId>org.apache.aries.proxy</artifactId>
            <version>1.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.resolver</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.equinox</groupId>
            <artifactId>org.eclipse.equinox.coordinator</artifactId>
            <version>1.1.0.v20120522-1841</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.equinox</groupId>
            <artifactId>org.eclipse.equinox.region</artifactId>
            <version>1.2.101.v20150831-1342</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>org.eclipse.osgi</artifactId>
            <version>3.10.0.v20140606-1445</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Use the shade plugin with the dependency plugin to unjar the various jars
                 so that the associated sources and javadoc jars are complete.
                 To build the main jar, the maven-bundle-plugin is used, that's why everything is excluded. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>org.apache.aries.subsystem:org.apache.aries.subsystem.api</include>
                                    <include>org.apache.aries.subsystem:org.apache.aries.subsystem.core</include>
                                </includes>
                            </artifactSet>
                            <filters>
                                <filter>
                                    <artifact>org.apache.aries.subsystem:org.apache.aries.subsystem.api</artifact>
                                    <excludes>
                                        <exclude>org/**</exclude>
                                    </excludes>
                                </filter>
                                <filter>
                                    <artifact>org.apache.aries.subsystem:org.apache.aries.subsystem.core</artifact>
                                    <excludes>
                                        <exclude>org/**</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <createSourcesJar>${createSourcesJar}</createSourcesJar>
                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.aries.versioning</groupId>
                <artifactId>org.apache.aries.versioning.plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-verify</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>version-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>deploy</id>
            <properties>
                <createSourcesJar>true</createSourcesJar>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.apache.aries.subsystem</groupId>
                                            <artifactId>org.apache.aries.subsystem.api</artifactId>
                                            <classifier>sources</classifier>
                                        </artifactItem>
                                        <artifactItem>
                                            <groupId>org.apache.aries.subsystem</groupId>
                                            <artifactId>org.apache.aries.subsystem.core</artifactId>
                                            <classifier>sources</classifier>
                                        </artifactItem>
                                    </artifactItems>
                                    <outputDirectory>${project.build.directory}/sources</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>process-classes</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- 
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>package</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <minmemory>128m</minmemory>
                            <maxmemory>512m</maxmemory>
                            <sourcepath>${project.build.directory}/sources</sourcepath>
                        </configuration>
                    </plugin>
                    -->
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
