<?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-rt-transports-http</artifactId>
    <packaging>bundle</packaging>
    <name>Apache CXF Runtime HTTP Transport</name>
    <description>Apache CXF Runtime HTTP Transport</description>
    <url>https://cxf.apache.org</url>
    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>3.3.3</version>
        <relativePath>../../../parent/pom.xml</relativePath>
    </parent>
    <properties>
        <cxf.module.name>org.apache.cxf.transport.http</cxf.module.name>
        <cxf.bundle.activator>org.apache.cxf.transport.http.osgi.HTTPTransportActivator</cxf.bundle.activator>
        <cxf.osgi.import>
            javax.net,
            javax.servlet*;version="${cxf.osgi.javax.servlet.version}",
            org.apache.aries*;version="${cxf.aries.version.range}";resolution:=optional,
            org.springframework*;resolution:="optional";version="${cxf.osgi.spring.version}",
            org.osgi.service.http,
            javax.xml.bind*;version="${cxf.osgi.javax.bind.version}",
            javax.activation;version="${cxf.osgi.javax.activation.version}",
            com.sun.activation.registries;resolution:=optional
        </cxf.osgi.import>
        <cxf.osgi.export>
            org.apache.cxf.transports.http*,
            org.apache.cxf.transport.http.*,
            org.apache.cxf.transport.https.*,
            org.apache.cxf.transport.servlet.*
        </cxf.osgi.export>
        <!-- keep in sync with services exported in activator -->
        <cxf.export.service>
            org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/transports/http/configuration"
        </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>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>org.apache.cxf</groupId>
            <artifactId>cxf-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-wsdl</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-policy</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>${cxf.servlet-api.group}</groupId>
            <artifactId>${cxf.servlet-api.artifact}</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint.core</artifactId>
            <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.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <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>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <fork>${cxf.xjcplugin.forkmode}</fork>
                            <additionalJvmArgs>${cxf.xjc.jvmArgs}</additionalJvmArgs>
                            <xsdOptions>
                                <xsdOption>
                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/http-conf.xsd</xsd>
                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/http-conf.xjb</bindingFile>
                                    <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
                                    <extensionArgs>
                                        <extensionArg>-Xdv</extensionArg>
                                        <extensionArg>-Xproperty-listener</extensionArg>
                                        <extensionArg>-Xjavadoc</extensionArg>
                                    </extensionArgs>
                                    <deleteDirs>
                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
                                    </deleteDirs>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <extensions>
                        <extension>org.apache.cxf.xjcplugins:cxf-xjc-pl:${cxf.xjc-utils.version}</extension>
                        <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>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>versions</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>cleanVersions</goal>
                        </goals>
                        <configuration>
                            <versions>
                                <cxf.osgi.version.clean>${project.version}</cxf.osgi.version.clean>
                            </versions>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${cxf.osgi.symbolic.name}</Bundle-SymbolicName>
                        <Include-Resource>
                          {maven-resources},
                          mozilla/public-suffix-list.txt=${basedir}/target/classes/mozilla/public-suffix-list.txt
                        </Include-Resource>
                        <Import-Package>
                            ${cxf.osgi.import},
                            *
                        </Import-Package>
                        <Export-Package>
                            ${cxf.osgi.export}
                        </Export-Package>
                        <Export-Service>
                            ${cxf.export.service}
                        </Export-Service>
                        <Bundle-Activator>${cxf.bundle.activator}</Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.googlecode.maven-download-plugin</groupId>
                <artifactId>download-maven-plugin</artifactId>
                <version>1.3.0</version><!-- 1.4.0 fails due to old cache on Jenkins nodes https://github.com/maven-download-plugin/maven-download-plugin/issues/80 -->
                <executions>
                    <execution>
                        <id>download-public-suffix-list</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>wget</goal>
                        </goals>
                        <configuration>
                            <url>https://publicsuffix.org/list/effective_tld_names.dat</url>
                            <outputDirectory>${project.build.outputDirectory}/mozilla</outputDirectory>
                            <outputFileName>public-suffix-list.txt</outputFileName>
                        </configuration>
                    </execution>
                </executions>
             </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            com.googlecode.maven-download-plugin
                                        </groupId>
                                        <artifactId>
                                            download-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.2.0,)
                                        </versionRange>
                                        <goals>
                                            <goal>wget</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
