<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>blueprint</artifactId>
    <groupId>org.apache.geronimo.blueprint</groupId>
    <version>1.0.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>geronimo-blueprint</artifactId>
  <packaging>bundle</packaging>
  <name>Apache Geronimo Blueprint Bundle</name>
  <description>This bundle contains the standalone implementation along with the API.
        It's composed of the blueprint-api, blueprint-core and blueprint-cm modules.</description>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${pom.groupId}</Bundle-SymbolicName>
            <Bundle-Activator>org.apache.geronimo.blueprint.container.BlueprintExtender</Bundle-Activator>
            <Import-Package>!org.apache.geronimo.blueprint*,
                            org.osgi.service.blueprint*,
                            org.osgi.service.event*;resolution:=optional,
                            net.sf.cglib*;resolution:=optional,
                            *</Import-Package>
            <Export-Package>=org.osgi.service.blueprint;uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect,org.apache.geronimo.blueprint,org.apache.geronimo.blueprint.ext,org.apache.geronimo.blueprint.mutable";version="1.0",
                            org.osgi.service.blueprint.container;version="1.0",
                            org.osgi.service.blueprint.reflect;version="1.0",
                            org.apache.geronimo.blueprint;version="${pom.version}",
                            org.apache.geronimo.blueprint.ext;version="${pom.version}",
                            org.apache.geronimo.blueprint.mutable;version="${pom.version}"</Export-Package>
            <Private-Package>org.apache.geronimo.blueprint.compendium.cm,
                            org.apache.geronimo.blueprint.container,
                            org.apache.geronimo.blueprint.di,
                            org.apache.geronimo.blueprint.namespace,
                            org.apache.geronimo.blueprint.reflect,
                            org.apache.geronimo.blueprint.utils,
                            OSGI-INF*</Private-Package>
            <Include-Resource>{maven-resources},META-INF/NOTICE=../NOTICE</Include-Resource>
            <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
            <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
            <_failok>true</_failok>
          </instructions>
          <unpackBundle>true</unpackBundle>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>org.apache.geronimo.blueprint:geronimo-blueprint-api</include>
                  <include>org.apache.geronimo.blueprint:geronimo-blueprint-core</include>
                  <include>org.apache.geronimo.blueprint:geronimo-blueprint-cm</include>
                </includes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>org.apache.geronimo.blueprint:geronimo-blueprint-api</artifact>
                  <excludes>
                    <exclude>org/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.geronimo.blueprint:geronimo-blueprint-core</artifact>
                  <excludes>
                    <exclude>org/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.geronimo.blueprint:geronimo-blueprint-cm</artifact>
                  <excludes>
                    <exclude>org/**</exclude>
                  </excludes>
                </filter>
              </filters>
              <createSourcesJar>${createSourcesJar}</createSourcesJar>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <createDependencyReducedPom>true</createDependencyReducedPom>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>deploy</id>
      <build>
        <plugins>
          <plugin>
            <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.geronimo.blueprint</groupId>
                      <artifactId>geronimo-blueprint-api</artifactId>
                      <classifier>sources</classifier>
                    </artifactItem>
                    <artifactItem>
                      <groupId>org.apache.geronimo.blueprint</groupId>
                      <artifactId>geronimo-blueprint-core</artifactId>
                      <classifier>sources</classifier>
                    </artifactItem>
                    <artifactItem>
                      <groupId>org.apache.geronimo.blueprint</groupId>
                      <artifactId>geronimo-blueprint-cm</artifactId>
                      <classifier>sources</classifier>
                    </artifactItem>
                  </artifactItems>
                  <outputDirectory>${project.build.directory}/sources</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>process-classes</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <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>
      <properties>
        <createSourcesJar>true</createSourcesJar>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.5.6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix.bundles</groupId>
      <artifactId>org.apache.servicemix.bundles.cglib</artifactId>
      <version>2.1_3_2</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
</project>

