<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright Germany 2024 Governikus GmbH & Co. KG

    Licensed 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>
        <artifactId>panstar-sdk</artifactId>
        <groupId>de.governikus.panstar.sdk</groupId>
        <version>4.1.0</version>
    </parent>

    <artifactId>panstar-utils</artifactId>

    <dependencies>
        <dependency>
            <groupId>jakarta.jws</groupId>
            <artifactId>jakarta.jws-api</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.ws</groupId>
            <artifactId>jakarta.xml.ws-api</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk18on</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-saml-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-xmlsec-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>de.governikus.opensaml.extension</groupId>
            <artifactId>opensaml-governikus-extension</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.sun.xml.ws</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsimport</goal>
                        </goals>
                        <configuration>
                            <wsdlFiles>
                                <wsdlFile>TR-03130eID-Server240.wsdl</wsdlFile>
                            </wsdlFiles>
                            <bindingFiles>
                                <bindingFile>TR-03130eID-Server240.jxb</bindingFile>
                                <bindingFile>TR-03130eID-Server240.wsb</bindingFile>
                            </bindingFiles>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <verbose>false</verbose>
                    <keep>true</keep>
                    <extension>true</extension>
                    <xadditionalHeaders>true</xadditionalHeaders>
                    <xnocompile>true</xnocompile>
                    <wsdlDirectory>${basedir}/src/main/resources/wsdl</wsdlDirectory>
                    <bindingDirectory>${basedir}/src/main/resources/wsdl</bindingDirectory>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jvnet.jaxb</groupId>
                <artifactId>jaxb-maven-plugin</artifactId>
                <configuration>
                    <extension>true</extension>
                    <plugins>
                        <plugin>
                            <groupId>org.jvnet.jaxb</groupId>
                            <artifactId>jaxb-plugins</artifactId>
                            <version>${version.jaxb-maven-plugin}</version>
                        </plugin>
                    </plugins>
                </configuration>
                <executions>
                    <execution>
                        <id>xjc</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>${basedir}/src/main/resources/tcToken
                            </schemaDirectory>
                            <schemaIncludes>
                                <schemaInclude>TcToken.xsd</schemaInclude>
                            </schemaIncludes>
                            <bindingDirectory>${basedir}/src/main/resources/tcToken</bindingDirectory>
                            <bindingIncludes>
                                <bindingInclude>TcToken.xjb</bindingInclude>
                            </bindingIncludes>
                            <extension>true</extension>
                            <generateDirectory>${project.build.directory}/generated-sources/xjc-panstar
                            </generateDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>target/generated-sources/wsimport</source>
                                <source>target/generated-sources/xjc</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
