<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2016-2026 Linagora

 This program/library is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 2.1 of the License, or (at your
 option) any later version.

 This program/library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with this program/library; If not, see http://www.gnu.org/licenses/
 for the GNU Lesser General Public License version 2.1.
-->
<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>
	<parent>
		<artifactId>petals-soap-parent</artifactId>
		<groupId>org.ow2.petals.samples.soap</groupId>
		<version>5.2.0-1.0.0</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<name>Petals samples for BC SOAP - Apache CXF server providing external web-services</name>
	<artifactId>cxf-server</artifactId>
	<groupId>org.ow2.petals.samples.soap</groupId>
	<!-- No version set -->
	<packaging>jar</packaging>
	<description>cxf-server</description>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<!-- Align different versions provided by WSS4J -->
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>1.17.1</version>
			</dependency>
			<dependency>
				<!-- Align different versions provided by WSS4J -->
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>33.3.1-jre</version>
			</dependency>
			<dependency>
				<!-- Align different versions provided by WSS4J -->
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcprov-jdk18on</artifactId>
				<version>1.78.1</version>
			</dependency>
			<dependency>
				<!-- Align different versions provided by WSS4J -->
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcpkix-jdk18on</artifactId>
				<version>1.78.1</version>
			</dependency>
			<dependency>
				<!-- Align different versions provided by CXF and WSS4J -->
				<groupId>org.apache.santuario</groupId>
				<artifactId>xmlsec</artifactId>
				<version>3.0.5</version>
			</dependency>
			<dependency>
				<!-- Align different versions provided by CXF and WSS4J -->
				<groupId>com.fasterxml.woodstox</groupId>
				<artifactId>woodstox-core</artifactId>
				<version>7.1.0</version>
			</dependency>
			<dependency>
				<!-- CXF requires this version of JaxB that is upper than the Petals's default one -->
				<groupId>org.glassfish.jaxb</groupId>
				<artifactId>jaxb-runtime</artifactId>
				<version>4.0.5</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
   
	<dependencies>
		<dependency>
			<groupId>jakarta.activation</groupId>
			<artifactId>jakarta.activation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.annotation</groupId>
			<artifactId>jakarta.annotation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.xml.bind</groupId>
			<artifactId>jakarta.xml.bind-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.xml.ws</groupId>
			<artifactId>jakarta.xml.ws-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-broker</artifactId>
			<version>${activemq.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-kahadb-store</artifactId>
			<version>${activemq.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-client</artifactId>
			<version>${activemq.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-core</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>${cxf.version}</version>
			<exclusions>
				<exclusion>
					<!-- Already included in jakarta.xml.ws-api provided by itself -->
					<groupId>jakarta.jws</groupId>
					<artifactId>jakarta.jws-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
			<version>${cxf.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-jetty</artifactId>
			<version>${cxf.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-jms</artifactId>
			<version>${cxf.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-addr</artifactId>
			<version>${cxf.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-policy</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-security</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-server</artifactId>
			<version>${jetty.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.wss4j</groupId>
			<artifactId>wss4j-ws-security-common</artifactId>
			<!-- Version must be aligned with the one coming with CXF -->
			<version>3.0.4</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-jdk14</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-codegen-plugin</artifactId>
				<version>${cxf.version}</version>
				<executions>
					<execution>
						<id>generate-sources</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
						<configuration>
							<wsdlOptions>
								<wsdlOption>
									<wsdl>${basedir}/src/main/resources/wsdl/articleServiceContinuation.wsdl</wsdl>
									<extraargs>
										<extraarg>-b</extraarg>
										<extraarg>${basedir}/src/main/resources/wsdl/async_binding.xml</extraarg>
									</extraargs>
								</wsdlOption>
							</wsdlOptions>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>analyze</id>
						<configuration>
							<usedDependencies>
								<!-- We don't provide unit test in this project -->
								<usedDependency>org.junit.jupiter:junit-jupiter-api</usedDependency>
								<!-- These following dependencies are needed for Apache CXF -->
								<usedDependency>org.apache.cxf:cxf-rt-transports-http</usedDependency>
								<usedDependency>org.apache.cxf:cxf-rt-transports-http-jetty</usedDependency>
								<usedDependency>org.apache.cxf:cxf-rt-transports-jms</usedDependency>
								<usedDependency>org.apache.cxf:cxf-rt-ws-addr</usedDependency>
								<usedDependency>org.apache.activemq:activemq-kahadb-store</usedDependency>
								<!-- The following dependency is indirectly used by source code at compilation time -->
								<usedDependency>org.apache.activemq:activemq-client</usedDependency>
							</usedDependencies>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<mainClass>org.ow2.petals.samples.soap.cxf.server.Server</mainClass>
							<useUniqueVersions>false</useUniqueVersions>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<excludePackageNames>org.ow2.petals.samples.soap.cxf.server.service.*</excludePackageNames>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.basepom.maven</groupId>
				<artifactId>duplicate-finder-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-no-duplicate-classes</id>
						<configuration>
							<ignoredResourcePatterns combine.children="append">
								<!-- Resource duplicated and different between WSS4J libraries -->
								<ignoredResourcePattern>schemas/ws-policy-200409.xsd</ignoredResourcePattern>
								<ignoredResourcePattern>schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd</ignoredResourcePattern>
								<ignoredResourcePattern>schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd</ignoredResourcePattern>
								<ignoredResourcePattern>schemas/xml.xsd</ignoredResourcePattern>
								<ignoredResourcePattern>schemas/xmldsig-core-schema.xsd</ignoredResourcePattern>
							</ignoredResourcePatterns>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!-- To launch the CXF server: "mvn clean verify exec:java" -->
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<configuration>
					<mainClass>org.ow2.petals.samples.soap.cxf.server.Server</mainClass>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<!-- SCM information not needed -->
</project>
