<?xml version="1.0"?>
<!--
  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>
    <artifactId>cxf-core</artifactId>
    <packaging>bundle</packaging>
    <name>Apache CXF Core</name>
    <description>Apache CXF Core</description>
    <url>http://cxf.apache.org</url>
    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>3.1.18</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>
    <properties>
        <cxf.bundle.activator>org.apache.cxf.bus.osgi.CXFActivator</cxf.bundle.activator>
        <cxf.osgi.export>
            !org.apache.cxf.internal,
            META-INF.cxf,
            org.apache.cxf.*
        </cxf.osgi.export>
        <cxf.osgi.import>
            com.ctc.wstx*;resolution:=optional,
            org.codehaus.stax2*;resolution:=optional,
            com.sun*;resolution:=optional,
            org.slf4j*;resolution:=optional;version="${cxf.osgi.slf4j.version}",
            org.apache.log4j*;resolution:=optional,
            net.sf.cglib*;resolution:=optional;version="${cxf.cglib.osgi.version}",
            org.springframework.osgi.io;resolution:=optional;version="${cxf.osgi.spring.osgi.version}",
            org.springframework.osgi.util;resolution:=optional;version="${cxf.osgi.spring.osgi.version}",
            org.springframework.aop*;resolution:=optional;version="${cxf.osgi.spring.version}",
            org.springframework.beans*;resolution:=optional;version="${cxf.osgi.spring.version}",
            org.springframework.context*;resolution:=optional;version="${cxf.osgi.spring.version}",
            org.springframework.core*;resolution:=optional;version="${cxf.osgi.spring.version}",
            org.springframework.util*;resolution:=optional;version="${cxf.osgi.spring.version}",
            org.objectweb.asm*;resolution:=optional;version="${cxf.osgi.asm.version}",
            javax.activation;version="${cxf.osgi.javax.activation.version}",
            javax.annotation;version="${cxf.osgi.javax.annotation.version}",
            javax.xml.bind*;version="${cxf.osgi.javax.bind.version}",
            javax.xml.stream*;version="${cxf.osgi.javax.stream.version}",
            javax.validation*;resolution:=optional;version="${cxf.validation.api.package.version}", 
            com.sun.xml.bind.api;resolution:=optional,
            com.sun.xml.bind.api.impl;resolution:=optional,
            com.sun.xml.internal.bind.api;resolution:=optional,
            com.sun.xml.internal.bind.api.impl;resolution:=optional,
            org.apache.aries*;version="${cxf.aries.version.range}";resolution:=optional
        </cxf.osgi.import>
        <cxf.osgi.dynamic.import>
            org.apache.cxf.bus,org.apache.cxf.*,com.ctc.wstx.*
        </cxf.osgi.dynamic.import>
        <!-- keep in sync with services exported in activator -->
        <cxf.export.service>
            org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/blueprint/core",
            org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/configuration/beans",
            org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/configuration/parameterized-types",
            org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/configuration/security",
            org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://schemas.xmlsoap.org/wsdl/",
        </cxf.export.service>
    </properties>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>${cxf.asm.groupId}</groupId>
            <artifactId>${cxf.asm.artifactId}</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>xml-resolver</groupId>
            <artifactId>xml-resolver</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>woodstox-core-asl</artifactId>
        </dependency>
        <dependency>
            <!-- this is probably not quite what we want in terms of the behavior of the other tests
                 than the schema surgery test. -->
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint.core</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>blueprint-parser</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.xmlschema</groupId>
            <artifactId>xmlschema-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-javamail_1.4_spec</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.fastinfoset</groupId>
            <artifactId>FastInfoset</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.java.dev.msv</groupId>
            <artifactId>msv-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>net.java.dev.msv</groupId>
                    <artifactId>msv-testharness</artifactId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-io</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>create-noncanonicalrev</id>
                        <goals>
                            <goal>create-timestamp</goal>
                        </goals>
                        <configuration>
                            <timestampFormat>'NON-CANONICAL_'yyyy-MM-dd_HH-mm_'${user.name}'</timestampFormat>
                            <timestampPropertyName>nonCanonicalRevision</timestampPropertyName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>create-buildnumber</id>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <configuration>
                            <doCheck>false</doCheck>
                            <doUpdate>false</doUpdate>
                            <revisionOnScmFailure>${nonCanonicalRevision}</revisionOnScmFailure>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-xjc-plugin</artifactId>
                <version>${cxf.xjc-utils.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                        <configuration>
                            <extensions>
                                <extension>org.apache.cxf.xjcplugins:cxf-xjc-javadoc:${cxf.xjc-utils.version}</extension>
                                <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:${cxf.xjc-utils.version}</extension>
                            </extensions>
                            <sourceRoot>${basedir}/target/generated-sources/cxf-xjc-plugin</sourceRoot>
                            <xsdOptions>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/http.xsd</xsd>
                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/http.xjb</bindingFile>
                                    <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
                                    <extensionArgs>
                                        <extensionArg>-npa</extensionArg>
                                        <extensionArg>-Xjavadoc</extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/ws-addr.xsd</xsd>
                                    <packagename>org.apache.cxf.ws.addressing</packagename>
                                    <extensionArgs>
                                        <extensionArg>-Xjavadoc</extensionArg>
                                        <extensionArg>-npa</extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/addressing.xsd</xsd>
                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/addressing.xjb</bindingFile>
                                    <extensionArgs>
                                        <extensionArg>-npa</extensionArg>
                                        <extensionArg>-Xjavadoc</extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/schemas/configuration/security.xsd</xsd>
                                    <bindingFile>${basedir}/src/main/resources/schemas/configuration/security.xjb</bindingFile>
                                    <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
                                    <extensionArgs>
                                        <extensionArg>-npa</extensionArg>
                                        <extensionArg>-Xdv</extensionArg>
                                        <extensionArg>-Xjavadoc</extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/ws-addr-wsdl.xsd</xsd>
                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/ws-addr-wsdl.xjb</bindingFile>
                                    <extension>true</extension>
                                    <extensionArgs>
                                        <extensionArg>-npa</extensionArg>
                                        <extensionArg>-Xjavadoc</extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/addressing200403.xsd</xsd>
                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/addressing200403.xjb</bindingFile>
                                    <extensionArgs>
                                        <extensionArg>-Xjavadoc</extensionArg>
                                        <extensionArg>-npa</extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <header>Apache CXF API</header>
                        <footer>Apache CXF API</footer>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Bundle-SymbolicName>${cxf.osgi.symbolic.name}</Bundle-SymbolicName>
                            <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
                            <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
                            <Implementation-Version>${cxf.osgi.version.clean}</Implementation-Version>
                            <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
                            <Specification-Version>${cxf.osgi.version.clean}</Specification-Version>
                            <Bundle-DocURL>http://cxf.apache.org</Bundle-DocURL>
                            <Fragment-Host>${cxf.fragment.host}</Fragment-Host>
                            <_failok>true</_failok>
                            <_nouses>true</_nouses>
                            <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
                            <Export-Package>${cxf.osgi.export}</Export-Package>
                            <Import-Package>
                                ${cxf.osgi.import},
                                *
                            </Import-Package>
                            <DynamicImport-Package>
                                ${cxf.osgi.dynamic.import}
                            </DynamicImport-Package>
                            <Export-Service>
                                ${cxf.export.service}
                            </Export-Service>
                            <Bundle-Activator>${cxf.bundle.activator}</Bundle-Activator>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
