<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>ipf-commons-ihe-xds</artifactId>
    <name>ipf-commons-ihe-xds</name>
    <description>XDS-specific IHE support</description>


    <parent>
        <groupId>org.openehealth.ipf.commons</groupId>
        <artifactId>ipf-commons-ihe</artifactId>
        <version>5.1.0</version>
    </parent>

    <dependencies>
        <!-- Dependencies for main -->
        <dependency>
            <groupId>org.openehealth.ipf.commons</groupId>
            <artifactId>ipf-commons-ihe-ws</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v25</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>

        <!-- Dependencies for test -->
        <dependency>
            <groupId>org.openehealth.ipf.commons</groupId>
            <artifactId>ipf-commons-ihe-core</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>org.openehealth.ipf.commons</groupId>
            <artifactId>ipf-commons-ihe-ws</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>org.openehealth.ipf.commons</groupId>
            <artifactId>ipf-commons-xml</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>generate-stubs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>delombok</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <addOutputDirectory>false</addOutputDirectory>
                            <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                            <outputDirectory>${output-folder}/generated-stubs</outputDirectory>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                                <version>${lombok-version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>${jaxb-plugin-version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.glassfish.jaxb</groupId>
                        <artifactId>jaxb-jxc</artifactId>
                        <version>${jaxb-version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.glassfish.jaxb</groupId>
                        <artifactId>jaxb-runtime</artifactId>
                        <version>${jaxb-version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <sources>
                        <source>${project.build.directory}/generated-stubs/org/openehealth/ipf/commons/ihe/xds/core/requests</source>
                        <source>${project.build.directory}/generated-stubs/org/openehealth/ipf/commons/ihe/xds/core/responses</source>
                    </sources>
                    <schemaSourceExcludeFilters>
		                 <filter implementation="org.codehaus.mojo.jaxb2.shared.filters.pattern.PatternFileFilter">
		                     <patterns>
		                         <pattern>builder/*\.java</pattern>
		                     </patterns>
		                 </filter>
                    </schemaSourceExcludeFilters>
                    <outputDirectory>${project.build.directory}/jaxb2</outputDirectory>
                    <createJavaDocAnnotations>false</createJavaDocAnnotations>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>schemagen</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>add-test-source</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>delombok</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <addOutputDirectory>false</addOutputDirectory>
                    <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                    <outputDirectory>${project.build.directory}/generated-stubs</outputDirectory>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>${lombok-version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>