<?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</groupId>
	    <artifactId>assemblies</artifactId>
        <version>2.3.0.redhat-60024</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>org.apache.karaf</groupId>
    <artifactId>apache-karaf</artifactId>
    <packaging>pom</packaging>
    <name>Apache Karaf :: Assembly</name>

    <properties>
        <appendedResourcesDirectory>${basedir}/../etc/appended-resources</appendedResourcesDirectory>
    </properties>

    <dependencies>
         <dependency>
            <groupId>org.apache.karaf</groupId>
            <artifactId>org.apache.karaf.main</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf</groupId>
            <artifactId>org.apache.karaf.exception</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf</groupId>
            <artifactId>org.apache.karaf.client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.spring</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.blueprint</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.features</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.kar</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.wrap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.command</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.management</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.obr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.diagnostic</groupId>
            <artifactId>org.apache.karaf.diagnostic.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.diagnostic</groupId>
            <artifactId>org.apache.karaf.diagnostic.common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.diagnostic</groupId>
            <artifactId>org.apache.karaf.diagnostic.command</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.diagnostic</groupId>
            <artifactId>org.apache.karaf.diagnostic.management</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.admin</groupId>
            <artifactId>org.apache.karaf.admin.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.admin</groupId>
            <artifactId>org.apache.karaf.admin.command</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.admin</groupId>
            <artifactId>org.apache.karaf.admin.management</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.console</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.obr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.log</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.packages</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.commands</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.ssh</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.dev</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.dev2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.boot</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.modules</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.command</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.management</groupId>
            <artifactId>org.apache.karaf.management.server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.management.mbeans</groupId>
            <artifactId>org.apache.karaf.management.mbeans.config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.admin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.branding</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.console</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.features</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.webconsole</groupId>
            <artifactId>org.apache.karaf.webconsole.gogo</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-extender</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-annotation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.bundlerepository</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.fileinstall</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.mina</groupId>
            <artifactId>mina-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.configadmin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.eventadmin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.metatype</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.webconsole</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-service</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-mvn</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-wrap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sshd</groupId>
            <artifactId>sshd-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse</groupId>
            <artifactId>osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework.security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint.cm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.proxy</groupId>
            <artifactId>org.apache.aries.proxy.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.proxy</groupId>
            <artifactId>org.apache.aries.proxy.impl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries</groupId>
            <artifactId>org.apache.aries.util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx.blueprint.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx.blueprint.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-servlet_2.5_spec</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-continuation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-all</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-api</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-spi</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-runtime</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-jetty</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-jsp</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-extender-war</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-extender-whiteboard</artifactId>
            <optional>true</optional>
        </dependency>
         <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-deployer</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.activator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.jaxp-api-1.4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.jaxb-api-2.2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.jaxws-api-2.2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.saaj-api-1.3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.stax-api-1.2</artifactId>
        </dependency>

        <!--Xerces jar to be included in lib/endorsed -->
        <dependency>
            <groupId>org.apache.xerces</groupId>
            <artifactId>xml-apis</artifactId>
            <version>${xml.api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>${xerces.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.bundles</groupId>
            <artifactId>org.apache.karaf.bundles.xerces-2.11.0</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!--xalan jar to be included in lib/endorsed-->
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>${xalan.version}</version>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>serializer</artifactId>
            <version>${xalan.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.bundles</groupId>
            <artifactId>org.apache.karaf.bundles.xalan-2.7.1</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.bundles</groupId>
            <artifactId>org.apache.karaf.bundles.xalan-serializer-2.7.1</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <!-- needed for xerces -->
        <repository>
            <id>servicemix.m2-repo</id>
            <name>ServiceMix Maven 2 repository</name>
            <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/filtered-resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/resources/extra</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/*</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <useDefaultDelimiters>false</useDefaultDelimiters>
                    <delimiters>
                        <delimiter>${*}</delimiter>
                    </delimiters>
                </configuration>
                <executions>
                    <execution>
                        <id>filter</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.karaf</groupId>
                                    <artifactId>org.apache.karaf.main</artifactId>
                                    <outputDirectory>target/dependencies/lib</outputDirectory>
                                    <destFileName>karaf.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.karaf</groupId>
                                    <artifactId>org.apache.karaf.client</artifactId>
                                    <outputDirectory>target/dependencies/lib/bin</outputDirectory>
                                    <destFileName>karaf-client.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.karaf.jaas</groupId>
                                    <artifactId>org.apache.karaf.jaas.boot</artifactId>
                                    <outputDirectory>target/dependencies/lib</outputDirectory>
                                    <destFileName>karaf-jaas-boot.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </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>src/main/resources/extra/jetty.xml</file>
                                  <type>xml</type>
                                  <classifier>jettyconfig</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>unix-minimal-bin</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/descriptors/unix-minimal-bin.xml</descriptor>
                            </descriptors>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <tarLongFileMode>gnu</tarLongFileMode>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unix-bin</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/descriptors/unix-bin.xml</descriptor>
                            </descriptors>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <tarLongFileMode>gnu</tarLongFileMode>
                        </configuration>
                    </execution>
                    <execution>
                        <id>windows-minimal-bin</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/descriptors/windows-minimal-bin.xml</descriptor>
                            </descriptors>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <appendAssemblyId>true</appendAssemblyId>
                            <assemblyId />
                        </configuration>
                    </execution>
                    <execution>
                        <id>windows-bin</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/descriptors/windows-bin.xml</descriptor>
                            </descriptors>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <duplicateBehaviour>skip</duplicateBehaviour>
                            <assemblyId />
                        </configuration>
                    </execution>
                    <execution>
                        <id>unix-src</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/descriptors/unix-src.xml</descriptor>
                            </descriptors>
                            <tarLongFileMode>gnu</tarLongFileMode>
                        </configuration>
                    </execution>
                    <execution>
                        <id>windows-src</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/descriptors/windows-src.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>features-maven-plugin</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <id>add-features-to-repo</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-features-to-repo</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                              <descriptor>mvn:org.apache.karaf.assemblies.features/standard/${project.version}/xml/features</descriptor>
                              <descriptor>mvn:org.apache.karaf.assemblies.features/enterprise/${project.version}/xml/features</descriptor>
                            </descriptors>
                            <features>
                                <feature>config</feature>
                                <feature>ssh</feature>
                                <feature>management</feature>
				<feature>wrapper</feature>
                            </features>
                            <includeMvnBasedDescriptors>true</includeMvnBasedDescriptors>
                            <repository>target/features-repo</repository>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>manual</id>

            <dependencies>
                <dependency>
                    <groupId>org.apache.karaf</groupId>
                    <artifactId>manual</artifactId>
                    <type>pdf</type>
                </dependency>
                <dependency>
                    <groupId>org.apache.karaf</groupId>
                    <artifactId>manual</artifactId>
                    <type>html</type>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-manual</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.apache.karaf</groupId>
                                            <artifactId>manual</artifactId>
                                            <type>pdf</type>
                                            <outputDirectory>target/dependencies</outputDirectory>
                                            <destFileName>karaf-manual-${project.version}.pdf</destFileName>
                                        </artifactItem>
                                        <artifactItem>
                                            <groupId>org.apache.karaf</groupId>
                                            <artifactId>manual</artifactId>
                                            <type>html</type>
                                            <outputDirectory>target/dependencies</outputDirectory>
                                            <destFileName>karaf-manual-${project.version}.html</destFileName>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>assembly-src</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unix-src</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/main/descriptors/unix-src.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                            <execution>
                                <id>windows-src</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/main/descriptors/windows-src.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
