<?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-jetty</artifactId>
    <packaging>bundle</packaging>
    <name>Apache CXF Runtime HTTP Jetty Transport</name>
    <description>Apache CXF Runtime HTTP Jetty Transport</description>
    <url>https://cxf.apache.org</url>
    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>3.6.6</version>
        <relativePath>../../../parent/pom.xml</relativePath>
    </parent>
    <properties>
        <cxf.module.name>org.apache.cxf.transport.http.jetty</cxf.module.name>
        <cxf.bundle.activator>org.apache.cxf.transport.http_jetty.osgi.HTTPJettyTransportActivator</cxf.bundle.activator>
        <cxf.osgi.import>
            javax.servlet*;version="${cxf.osgi.javax.servlet.version}",
            org.eclipse.jetty*;version="${cxf.jetty.osgi.version}",
            org.osgi.service.blueprint*;resolution:=optional,
            org.apache.aries*;version="${cxf.aries.version.range}";resolution:=optional,
            org.springframework*;resolution:="optional";version="${cxf.osgi.spring.version}",
            javax.xml.bind*;version="${cxf.osgi.javax.bind.version}",
            javax.annotation*;version="${cxf.osgi.javax.annotation.version}"
        </cxf.osgi.import>
        <cxf.osgi.dynamic.import>
            org.eclipse.jetty.jmx
        </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/transports/http-jetty/configuration"
        </cxf.export.service>
    </properties>
    <dependencies>
        <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.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.cmpn</artifactId>
            <scope>provided</scope>
        </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-transports-http</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <optional>true</optional>
        </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.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${cxf.mockito.version}</version>
            <scope>test</scope>
        </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>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-testutils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-wsdl</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>jetty10</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-server</artifactId>
                </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-security</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-jmx</artifactId>
                    <optional>true</optional>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-http</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty.http2</groupId>
                    <artifactId>http2-server</artifactId>
                    <optional>true</optional>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-alpn-server</artifactId>
                    <optional>true</optional>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-alpn-java-server</artifactId>
                    <optional>true</optional>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jetty9x</id>
            <properties>
                <cxf.jetty9.version>9.4.53.v20231009</cxf.jetty9.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-server</artifactId>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-util</artifactId>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-io</artifactId>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-security</artifactId>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-jmx</artifactId>
                    <optional>true</optional>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-http</artifactId>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty.http2</groupId>
                    <artifactId>http2-server</artifactId>
                    <optional>true</optional>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-alpn-server</artifactId>
                    <optional>true</optional>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-alpn-java-server</artifactId>
                    <optional>true</optional>
                    <version>${cxf.jetty9.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <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>
                            <fork>${cxf.xjcplugin.forkmode}</fork>
                            <additionalJvmArgs>${cxf.xjc.jvmArgs}</additionalJvmArgs>
                            <extensions>
                                <extension>org.apache.cxf.xjcplugins:cxf-xjc-bug986:${cxf.xjc-utils.version}</extension>
                                <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:${cxf.xjc-utils.version}</extension>
                            </extensions>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <xsdOptions>
                                <xsdOption>
                                    <extensionArgs>
                                        <arg>-Xbug986</arg>
                                        <arg>-Xdv</arg>
                                    </extensionArgs>
                                    <xsd>${basedir}/src/main/resources/schemas/configuration/http-jetty.xsd</xsd>
                                    <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
                                    <deleteDirs>
                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/configuration/security</deleteDir>
                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/transports/http/configuration</deleteDir>
                                    </deleteDirs>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
