<?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.cxf.karaf</groupId>
        <artifactId>karaf-parent</artifactId>
        <version>3.2.5-jbossorg-1</version>
    </parent>
    <artifactId>apache-cxf</artifactId>
    <packaging>pom</packaging>
    <name>Apache CXF Karaf Features</name>
    <description>Apache CXF Karaf Features</description>
    <!-- The validate plugin will export these provided dependencies bundles' export packages first -->
    <dependencies>
        <!-- Framework distribution -->
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${cxf.karaf.version}</version>
            <type>kar</type>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <version>${cxf.karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>provided</scope>
        </dependency>
		
		<dependency>
	        <groupId>org.apache.cxf.karaf</groupId>
		    <artifactId>cxf-karaf-commands</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.cxf.services.wsn</groupId>
		    <artifactId>cxf-services-wsn-osgi</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.cxf.services.sts</groupId>
		    <artifactId>cxf-services-sts-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.cxf.services.ws-discovery</groupId>
		    <artifactId>cxf-services-ws-discovery-service</artifactId>
			<version>${project.version}</version>
		</dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-addr</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-rm</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-policy</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-mex</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-security</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </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.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.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>${cxf.karaf.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>javax.xml.bind</groupId>
                        <artifactId>jaxb-api</artifactId>
                        <version>2.3.0</version>
                    </dependency>
                    <dependency>
                        <groupId>javax.activation</groupId>
                        <artifactId>activation</artifactId>
                        <version>1.1.1</version>
                    </dependency>
                    <dependency>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-core</artifactId>
                        <version>${cxf.jaxb.core.version}</version>
                        <exclusions>
                            <exclusion>
                                <groupId>org.glassfish.jaxb</groupId>
                                <artifactId>jaxb-core</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>org.glassfish.jaxb</groupId>
                                <artifactId>txw2</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-impl</artifactId>
                        <version>${cxf.jaxb.impl.version}</version>
                        <exclusions>
                            <exclusion>
                                <groupId>javax.xml.bind</groupId>
                                <artifactId>jsr173_api</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>javax.xml</groupId>
                                <artifactId>jsr173</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>javax.activation</groupId>
                                <artifactId>activation</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>javax.xml.bind</groupId>
                                <artifactId>activation</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>javax.xml.bind</groupId>
                                <artifactId>jaxb-api</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>verify</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>mvn:org.apache.karaf.features/framework/${cxf.karaf.version}/xml/features</descriptor>
                                <descriptor>mvn:org.apache.karaf.features/standard/${cxf.karaf.version}/xml/features</descriptor>
                                <descriptor>mvn:org.apache.karaf.features/spring/${cxf.karaf.version}/xml/features</descriptor>
								<descriptor>mvn:org.ops4j.pax.web/pax-web-features/6.0.2/xml/features</descriptor>
                                <descriptor>file:${project.build.directory}/classes/features.xml</descriptor>
                            </descriptors>
                            <distribution>org.apache.karaf.features:framework</distribution>
                            <javase>1.8</javase>
                            <framework>
                                <feature>framework</feature>
                            </framework>
                            <features>
                                <feature>cxf-*</feature>
                                <!-- <feature>cxf-management-web</feature> -->
                                <!-- <feature>cxf-wsn</feature> -->
                            </features>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
