<?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>2.2.4</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.62</bcprov.version>
        <commons.compress.version>1.18</commons.compress.version>
        <ehcache.version>2.10.6</ehcache.version>
        <geronimo.javamail.version>1.8.4</geronimo.javamail.version>
        <jasypt.version>1.9.3</jasypt.version>
        <junit.version>4.12</junit.version>
        <kerby.version>1.1.1</kerby.version>
        <neethi.version>3.1.1</neethi.version>
        <opensaml.version>3.3.0</opensaml.version>
        <slf4j.version>1.7.26</slf4j.version>
        <woodstox.core.version>5.0.3</woodstox.core.version>
        <wsdl4j.version>1.6.3</wsdl4j.version>
        <xalan.version>2.7.2</xalan.version>
        <xz.version>1.8</xz.version>
        <xmlsec.version>2.1.4</xmlsec.version>
        <xmlunit.version>1.6</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>
            </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>com.fasterxml.woodstox</groupId>
                <artifactId>woodstox-core</artifactId>
                <version>${woodstox.core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.javamail</groupId>
                <artifactId>geronimo-javamail_1.4_mail</artifactId>
                <version>${geronimo.javamail.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>xalan</groupId>
                <artifactId>xalan</artifactId>
                <version>${xalan.version}</version>
            </dependency>
            <dependency>
                <groupId>xalan</groupId>
                <artifactId>serializer</artifactId>
                <version>${xalan.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>wsdl4j</groupId>
                <artifactId>wsdl4j</artifactId>
                <version>${wsdl4j.version}</version>
            </dependency>
            <dependency>
                <groupId>xmlunit</groupId>
                <artifactId>xmlunit</artifactId>
                <version>${xmlunit.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sf.ehcache</groupId>
                <artifactId>ehcache</artifactId>
                <version>${ehcache.version}</version>
            </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>

        </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.0.2</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>
