<?xml version="1.0" encoding="UTF-8"?>
<!--
  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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.wss4j</groupId>
        <artifactId>wss4j</artifactId>
        <version>3.0.0</version>
    </parent>
    <artifactId>wss4j-parent</artifactId>
    <packaging>pom</packaging>
    <name>Apache WSS4J parent</name>
    <description>Apache WSS4J parent pom</description>
    <url>https://ws.apache.org/wss4j/</url>

    <properties>
        <bcprov.version>1.70</bcprov.version>
        <commons.compress.version>1.21</commons.compress.version>
        <cryptacular.version>1.2.5</cryptacular.version>
        <ehcache.version>3.10.1</ehcache.version>
        <hamcrest.version>2.2</hamcrest.version>
        <jakarta.mail.api.version>2.1.0</jakarta.mail.api.version>
        <jasypt.version>1.9.3</jasypt.version>
        <jaxb-runtime.version>3.0.2</jaxb-runtime.version>
        <junit.version>5.9.0</junit.version>
        <kerby.version>2.0.2</kerby.version>
        <neethi.version>3.2.0</neethi.version>
        <opensaml.version>4.2.0</opensaml.version>
        <slf4j.version>2.0.1</slf4j.version>
        <wsdl4j.version>1.6.3</wsdl4j.version>
        <woodstox.version>6.3.1</woodstox.version>
        <xz.version>1.9</xz.version>
        <xmlsec.version>3.0.1</xmlsec.version>
        <xmlunit.version>2.9.0</xmlunit.version>
        <!-- OSGi related properties -->
        <wss4j.osgi.import />
        <wss4j.osgi.symbolic.name>${project.groupId}.${project.artifactId}</wss4j.osgi.symbolic.name>
        <wss4j.osgi.export>org.apache.wss4j.*</wss4j.osgi.export>
        <wss4j.osgi.dynamic.import />
        <wss4j.manifest.location>${project.build.outputDirectory}/META-INF/MANIFEST.MF</wss4j.manifest.location>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.santuario</groupId>
                <artifactId>xmlsec</artifactId>
                <version>${xmlsec.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.activation</groupId>
                        <artifactId>jakarta.activation</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>${bcprov.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>${bcprov.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.neethi</groupId>
                <artifactId>neethi</artifactId>
                <version>${neethi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-reload4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.mail</groupId>
                <artifactId>jakarta.mail-api</artifactId>
                <version>${jakarta.mail.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>wsdl4j</groupId>
                <artifactId>wsdl4j</artifactId>
                <version>${wsdl4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.xmlunit</groupId>
                <artifactId>xmlunit-core</artifactId>
                <version>${xmlunit.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>jakarta.activation</groupId>
                        <artifactId>jakarta.activation-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.xmlunit</groupId>
                <artifactId>xmlunit-matchers</artifactId>
                <version>${xmlunit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ehcache</groupId>
                <artifactId>ehcache</artifactId>
                <version>${ehcache.version}</version>
                <classifier>jakarta</classifier>
                <exclusions>
                    <exclusion>
                        <groupId>javax.xml.bind</groupId>
                        <artifactId>jaxb-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.glassfish.jaxb</groupId>
                        <artifactId>jaxb-runtime</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt</artifactId>
                <version>${jasypt.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${commons.compress.version}</version>
            </dependency>
            <dependency>
                <groupId>org.tukaani</groupId>
                <artifactId>xz</artifactId>
                <version>${xz.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.messaging.saaj</groupId>
                <artifactId>saaj-impl</artifactId>
                <version>2.0.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.activation</groupId>
                        <artifactId>jakarta.activation</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
                <version>${jaxb-runtime.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.activation</groupId>
                        <artifactId>jakarta.activation</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                    <exclude>**/package.html</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources-filtered</directory>
                <includes>
                    <include>**</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>target/generated/src/main/resources</directory>
                <includes>
                    <include>**</include>
                </includes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <includes>
                    <include>**</include>
                </includes>
            </testResource>
            <testResource>
                <directory>target/generated/src/test/resources</directory>
                <includes>
                    <include>**</include>
                </includes>
            </testResource>
        </testResources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <archive>
                            <manifestFile>${wss4j.manifest.location}</manifestFile>
                            <manifestEntries>
                                <Specification-Title>${project.name}</Specification-Title>
                                <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
                                <Implementation-Title>${project.name}</Implementation-Title>
                                <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
                                <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <!--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>org.apache.felix</groupId>
                						<artifactId>maven-bundle-plugin</artifactId>
                						<versionRange>[2.4.0,)</versionRange>
                						<goals>
                							<goal>cleanVersions</goal>
                						</goals>
                					</pluginExecutionFilter>
                					<action>
                						<ignore />
                					</action>
                				</pluginExecution>
                				<pluginExecution>
                					<pluginExecutionFilter>
                						<groupId>org.apache.maven.plugins</groupId>
                						<artifactId>maven-remote-resources-plugin</artifactId>
                						<versionRange>[1.0.0,)</versionRange>
                						<goals>
                							<goal>process</goal>
                						</goals>
                					</pluginExecutionFilter>
                					<action>
                						<ignore />
                					</action>
                				</pluginExecution>
                			</pluginExecutions>
                		</lifecycleMappingMetadata>
                	</configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>versions</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>cleanVersions</goal>
                        </goals>
                        <configuration>
                            <versions>
                                <wss4j.osgi.version.clean>${project.version}</wss4j.osgi.version.clean>
                            </versions>
                        </configuration>
                    </execution>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                        <configuration>
                            <instructions>
                                <Bundle-SymbolicName>${wss4j.osgi.symbolic.name}</Bundle-SymbolicName>
                                <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
                                <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
                                <Implementation-Version>${wss4j.osgi.version.clean}</Implementation-Version>
                                <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
                                <Specification-Version>${wss4j.osgi.version.clean}</Specification-Version>
                                <Bundle-DocURL>http://ws.apache.org/wss4j</Bundle-DocURL>
                                <_failok>true</_failok>
                                <_nouses>true</_nouses>
                                <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
                                <Export-Package>${wss4j.osgi.export}</Export-Package>
                                <Import-Package>
                                    ${wss4j.osgi.import},
                                    *
                                </Import-Package>
                                <DynamicImport-Package>
                                    ${wss4j.osgi.dynamic.import}
                                </DynamicImport-Package>
                                <Automatic-Module-Name>${wss4j.module.name}</Automatic-Module-Name>
                            </instructions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
