<?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">

    <!--

        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.servicemix.features</groupId>
        <artifactId>features</artifactId>
        <version>4.0-m1</version>
    </parent>

    <groupId>org.apache.servicemix.features</groupId>
    <artifactId>apache-servicemix</artifactId>
    <packaging>pom</packaging>
    <version>4.0-m1</version>
    <name>Apache ServiceMix Features :: Assembly</name>

    <dependencies>
        <dependency>
            <groupId>org.apache.servicemix.kernel</groupId>
            <artifactId>apache-servicemix-kernel</artifactId>
            <version>${servicemix.kernel.version}</version>
            <type>zip</type>
<exclusions>
	<exclusion>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
	</exclusion>
</exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.kernel</groupId>
            <artifactId>apache-servicemix-kernel</artifactId>
            <version>${servicemix.kernel.version}</version>
            <type>tar.gz</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-activation_1.1_spec</artifactId>
            <version>${geronimo.activation.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-javamail_1.4_spec</artifactId>
            <version>${geronimo.javamail.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.components</groupId>
            <artifactId>geronimo-connector</artifactId>
            <version>${geronimo.connector.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.prefs</artifactId>
            <version>${felix.prefs.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.nmr</groupId>
            <artifactId>org.apache.servicemix.nmr.api</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.nmr</groupId>
            <artifactId>org.apache.servicemix.nmr.commands</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.nmr</groupId>
            <artifactId>org.apache.servicemix.nmr.core</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.nmr</groupId>
            <artifactId>org.apache.servicemix.nmr.osgi</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.nmr</groupId>
            <artifactId>org.apache.servicemix.nmr.management</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.nmr</groupId>
            <artifactId>org.apache.servicemix.nmr.spring</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.servicemix.jbi</groupId>
            <artifactId>org.apache.servicemix.jbi.api</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.jbi</groupId>
            <artifactId>org.apache.servicemix.jbi.commands</artifactId>
            <version>${servicemix.nmr.version}</version>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-jdk14</artifactId>
				</exclusion>
			</exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.jbi</groupId>
            <artifactId>org.apache.servicemix.jbi.deployer</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.jbi</groupId>
            <artifactId>org.apache.servicemix.jbi.runtime</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.jbi</groupId>
            <artifactId>org.apache.servicemix.jbi.osgi</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.jbi</groupId>
            <artifactId>org.apache.servicemix.jbi.management</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.howl-1.0.1-1</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.asm-2.2.3</artifactId>
            <version>${servicemix.kernel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.jencks-2.1</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.saaj-impl-1.3</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.woodstox-3.2.3</artifactId>
            <version>${servicemix.nmr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.cxf-2.0.5</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.neethi-2.0.2</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.xmlschema-1.3.2</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.xmlresolver-1.2</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.jaxb-impl-2.0.3</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.jaxb-api-2.0</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.jaxws-api-2.0</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.wsdl4j-1.6.1</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-classloader</artifactId>
            <version>${xbean.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-extender</artifactId>
            <version>${spring.osgi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
            <version>${spring.osgi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-io</artifactId>
            <version>${spring.osgi.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jms_1.1_spec</artifactId>
            <version>${geronimo.jms.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
            <version>${geronimo.j2ee.management.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-annotation_1.0_spec</artifactId>
            <version>${geronimo.annotation.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
            <version>${geronimo.wsmetadata.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.activemq</groupId>
            <artifactId>org.apache.servicemix.activemq</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.transaction</groupId>
            <artifactId>org.apache.servicemix.transaction</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.management</groupId>
            <artifactId>org.apache.servicemix.management.core</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.cxf</groupId>
            <artifactId>org.apache.servicemix.cxf.binding.nmr</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.cxf</groupId>
            <artifactId>org.apache.servicemix.cxf.transport.nmr</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.cxf</groupId>
            <artifactId>org.apache.servicemix.cxf.transport.osgi</artifactId>
            <version>${version}</version>
        </dependency>
        <!--
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-core</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-cxf</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-ejbd</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-http</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-javaagent</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-jee</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-loader</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-server</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-webservices</artifactId>
            <version>${openejb.version}</version>
        </dependency>
        -->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
            <version>${activemq.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-finder</artifactId>
            <version>${xbean.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-naming</artifactId>
            <version>${xbean.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-reflect</artifactId>
            <version>${xbean.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-spring</artifactId>
            <version>${xbean.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-bundle</artifactId>
            <version>${pax.web.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-jsp</artifactId>
            <version>${pax.web.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web-extender</groupId>
            <artifactId>pax-web-ex-war</artifactId>
            <version>${pax.web.extender.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web-extender</groupId>
            <artifactId>pax-web-ex-whiteboard</artifactId>
            <version>${pax.web.extender.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-war</artifactId>
            <version>${pax.url.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.prefs</artifactId>
            <version>${felix.prefs.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-util</artifactId>
            <version>${jetty.version}</version>
        </dependency>
		<!-- Dependencies not included directly, but repackaged in bundles.
     	     Listed for legal reasons (and LICENSE file generation) -->
			<dependency>
				<groupId>javax.xml.bind</groupId>
				<artifactId>jaxb-api</artifactId>
				<version>${jaxb.api.version}</version>
				<exclusions>
					<exclusion>
						<groupId>javax.activation</groupId>
						<artifactId>activation</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>com.sun.xml.bind</groupId>
				<artifactId>jaxb-impl</artifactId>
				<version>${jaxb.impl.version}</version>
				<exclusions>
					<exclusion>
						<groupId>javax.activation</groupId>
						<artifactId>activation</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
	            <groupId>javax.xml.ws</groupId>
				<artifactId>jaxws-api</artifactId>
				<version>${jaxws.api.version}</version>
			</dependency>
			<dependency>
	            <groupId>com.sun.xml.messaging.saaj</groupId>
				<artifactId>saaj-impl</artifactId>
				<version>1.3</version>
				<exclusions>
					<exclusion>
						<groupId>javax.xml.soap</groupId>
						<artifactId>saaj-api</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
	            <groupId>asm</groupId>
	            <artifactId>asm-all</artifactId>
				<version>${asm.version}</version>
			</dependency>
			<dependency>
	            <groupId>wsdl4j</groupId>
	            <artifactId>wsdl4j</artifactId>
				<version>1.6.1</version>
			</dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>${pom.basedir}/src/main/filtered-resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <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>unpack-unix</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.servicemix.kernel</groupId>
                                    <artifactId>apache-servicemix-kernel</artifactId>
						            <version>${servicemix.kernel.version}</version>
                                    <type>tar.gz</type>
                                    <outputDirectory>target/dependencies/unix</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-win</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.servicemix.kernel</groupId>
                                    <artifactId>apache-servicemix-kernel</artifactId>
						            <version>${servicemix.kernel.version}</version>
                                    <type>zip</type>
                                    <outputDirectory>target/dependencies/win</outputDirectory>
                                </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>target/classes/features.xml</file>
                                    <type>xml </type>
                                    <classifier>features</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <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>${pom.artifactId}-${pom.version}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <tarLongFileMode>gnu</tarLongFileMode>
                        </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>${pom.artifactId}-${pom.version}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                        </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>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>assembly-src</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.1</version>
                        <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>

