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

    <parent>
        <groupId>io.quarkiverse</groupId>
        <artifactId>quarkiverse-parent</artifactId>
        <version>21</version>
    </parent>

    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-parent</artifactId>
    <version>3.32.0</version>
    <name>Quarkus CXF - Parent</name>

    <packaging>pom</packaging>

    <url>https://github.com/quarkiverse/quarkiverse-cxf</url>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>dufoli</id>
            <name>Olivier Dufour</name>
            <email>olivier dot duff at gmail(DOT)com</email>
        </developer>
        <developer>
            <id>dufgui</id>
            <name>Guillaume Dufour</name>
        </developer>
        <developer>
            <id>shumonsharif</id>
            <name>Shumon Sharif</name>
            <email>shumon.sharif@gmail.com</email>
        </developer>
    </developers>
    <properties>
        <!-- Primary dependencies -->
        <quarkus.version>3.32.0</quarkus.version>
        <cxf.version>4.1.5</cxf.version>
        <quarkus-enforcer-rules.version>${quarkus.version}</quarkus-enforcer-rules.version>
        <quarkus-antora.version>3.25.0</quarkus-antora.version>

        <!-- Other compile dependency versions (keep sorted alphabetically) -->
        <!-- Items annotated with @sync can be updated by running mvn cq:sync-versions -N -->
        <assertj.version>3.27.7</assertj.version>
        <awaitility.version>4.3.0</awaitility.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.awaitility:awaitility -->
        <cli-assured.version>0.0.1-alpha17</cli-assured.version>
        <commons-beanutils.version>1.11.0</commons-beanutils.version><!-- Transitive of org.jvnet.jaxb:jaxb-plugins -->
        <cxf.xjcplugins.version>4.1.2</cxf.xjcplugins.version><!-- @sync org.apache.cxf:cxf:${cxf.version} prop:cxf.xjc-utils.version -->
        <ehcache.version>3.11.1</ehcache.version>
        <fastinfoset.version>2.1.1</fastinfoset.version>
        <glassfish.jaxb.version>4.0.6</glassfish.jaxb.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.glassfish.jaxb:jaxb-runtime -->
        <jakarta.xml.soap-api.version>3.0.2</jakarta.xml.soap-api.version><!-- @sync org.apache.cxf:cxf-parent:${cxf.version} prop:cxf.jakarta.soapapi.version -->
        <jakarta.xml.ws-api.version>4.0.2</jakarta.xml.ws-api.version><!-- @sync org.apache.cxf:cxf-parent:${cxf.version} prop:cxf.jakarta.wsapi.version -->
        <jasypt.version>1.9.3</jasypt.version><!-- @sync org.apache.wss4j:wss4j-parent:${wss4j.version} prop:jasypt.version -->
        <jaxb-plugins.version>4.0.12</jaxb-plugins.version>
        <jcache.version>1.1.1</jcache.version>
        <httpclient5.version>5.5.1</httpclient5.version>
        <httpcore5.version>5.3.6</httpcore5.version>
        <neethi.version>3.2.1</neethi.version><!-- @sync org.apache.cxf:cxf-parent:${cxf.version} prop:cxf.neethi.version -->
        <mimepull.version>1.10.0</mimepull.version>
        <rest-assured.version>5.5.6</rest-assured.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.rest-assured:rest-assured -->
        <saaj-impl.version>3.0.4</saaj-impl.version><!-- @sync org.apache.cxf:cxf-parent:${cxf.version} prop:cxf.saaj-impl.version -->
        <santuario-xmlsec.version>4.0.4</santuario-xmlsec.version>

        <slf4j.version>2.0.17</slf4j.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.slf4j:slf4j-api -->
        <smallrye-certificate-generator.version>0.9.2</smallrye-certificate-generator.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.certs:smallrye-certificate-generator -->
        <stax2.version>4.2.2</stax2.version><!-- @sync com.fasterxml.woodstox:woodstox-core:${woodstox-core.version} dep:org.codehaus.woodstox:stax2-api -->
        <velocity.version>2.4.1</velocity.version><!-- Dependency of wsdl2java -->
        <woodstox-core.version>7.1.1</woodstox-core.version>
        <wsdl4j.version>1.6.3</wsdl4j.version><!-- Manage WSDL4J to make sure that quarkus-cxf-xjc-plugins pulls the right version via cxf-xjc-wsdlextension -->
        <wss4j.version>4.0.1</wss4j.version><!-- We may ocassionally want to use a bugfix version of WSS4J that is newer than the one used by CXF -->

        <supported-maven.versions>[3.6.2,)</supported-maven.versions>

        <cq-maven-plugin.version>4.21.0</cq-maven-plugin.version>
        <exec-maven-plugin.version>3.6.3</exec-maven-plugin.version>
        <groovy-maven-plugin.version>2.1.1</groovy-maven-plugin.version>
        <groovy.version>3.0.25</groovy.version>
        <hyperfoil-plugin.version>0.28.0</hyperfoil-plugin.version>
        <maven-build-cache-extension.version>1.2.2</maven-build-cache-extension.version>
        <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
        <maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
        <maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
        <keytool-maven-plugin.version>1.7</keytool-maven-plugin.version>
        <maven-idea-plugin.version>2.2.1</maven-idea-plugin.version>
        <maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.5.5</maven-surefire-plugin.version>
        <quarkus-platform-bom-plugin.version>0.0.51</quarkus-platform-bom-plugin.version>
        <rpkgtests-maven-plugin.version>1.0.0</rpkgtests-maven-plugin.version>

        <!-- maven-compiler-plugin -->
        <maven.compiler.release>17</maven.compiler.release>

        <!-- maven-enforcer-plugin -->
        <enforce-non-deployment.skip>false</enforce-non-deployment.skip>

        <!-- keytool-maven-plugin -->
        <keytool.skip>false</keytool.skip>

    </properties>

    <scm>
        <url>https://github.com/quarkiverse/quarkus-cxf</url>
        <connection>scm:git:https://github.com/quarkiverse/quarkus-cxf.git</connection>
        <developerConnection>scm:git:https://github.com/quarkiverse/quarkus-cxf.git</developerConnection>
        <tag>3.32.0</tag>
    </scm>

    <modules>
        <module>bom</module>
        <module>extensions</module>
        <module>bom-test</module>
        <module>test-util-parent</module>
        <module>integration-tests</module>
        <module>perf-tests</module>
    </modules>

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.extensions</groupId>
                <artifactId>maven-build-cache-extension</artifactId>
                <version>${maven-build-cache-extension.version}</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-codegen-plugin</artifactId>
                    <version>${cxf.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>${maven-eclipse-plugin.version}</version>
                    <configuration>
                        <downloadSources>true</downloadSources>
                        <downloadJavadocs>true</downloadJavadocs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.gmaven</groupId>
                    <artifactId>groovy-maven-plugin</artifactId>
                    <version>${groovy-maven-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.groovy</groupId>
                            <artifactId>groovy-all</artifactId>
                            <version>${groovy.version}</version>
                            <type>pom</type>
                            <exclusions>
                                <exclusion>
                                    <!-- groovy-testng depends on testng 7.2.0 which is not on maven central -->
                                    <groupId>org.codehaus.groovy</groupId>
                                    <artifactId>groovy-testng</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>keytool-maven-plugin</artifactId>
                    <version>${keytool-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-idea-plugin</artifactId>
                    <version>${maven-idea-plugin.version}</version>
                    <configuration>
                        <downloadSources>true</downloadSources>
                        <downloadJavadocs>true</downloadJavadocs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <systemPropertyVariables>
                            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                            <user.language>en</user.language>
                            <user.country>US</user.country>
                        </systemPropertyVariables>
                        <environmentVariables>
                            <LANG>en_US.UTF-8</LANG>
                        </environmentVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <systemPropertyVariables>
                            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                            <user.language>en</user.language>
                            <user.country>US</user.country>
                        </systemPropertyVariables>
                        <environmentVariables>
                            <LANG>en_US.UTF-8</LANG>
                        </environmentVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.l2x6.rpkgtests</groupId>
                    <artifactId>rpkgtests-maven-plugin</artifactId>
                    <version>${rpkgtests-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-extension-maven-plugin</artifactId>
                    <version>${quarkus.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>extension-descriptor</goal>
                            </goals>
                            <phase>compile</phase>
                            <configuration>
                                <deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-maven-plugin</artifactId>
                    <version>${quarkus.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.l2x6.cq</groupId>
                    <artifactId>cq-maven-plugin</artifactId>
                    <version>${cq-maven-plugin.version}</version>
                    <configuration>
                        <templatesUriBase>file:${maven.multiModuleProjectDirectory}/src/build/doc-templates</templatesUriBase>
                        <ownLinkPattern>\Qlink:http\Es?\Q://docs.quarkiverse.io/quarkus-cxf/dev/\E([^\[]+).html</ownLinkPattern>
                        <configOptionExcludes>
                            <configOptionExclude>^quarkus\.cxf\.internal</configOptionExclude>
                            <configOptionExclude>^quarkus\.cxf\.wsdl-path</configOptionExclude>
                        </configOptionExcludes>
                        <descriptionReplacements>
                            <descriptionReplacement>&amp;#64;/@</descriptionReplacement>
                        </descriptionReplacements>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>io.quarkus</groupId>
                            <artifactId>quarkus-extension-processor</artifactId>
                            <version>${quarkus.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>io.quarkus</groupId>
                        <artifactId>quarkus-enforcer-rules</artifactId>
                        <version>${quarkus-enforcer-rules.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>${maven.compiler.release}</version>
                                </requireJavaVersion>
                                <dependencyConvergence />
                                <requireMavenVersion>
                                    <version>${supported-maven.versions}</version>
                                </requireMavenVersion>
                                <externalRules>
                                    <location>classpath:enforcer-rules/quarkus-require-maven-version.xml</location>
                                </externalRules>
                                <externalRules>
                                    <location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
                                </externalRules>
                                <externalRules>
                                    <location>${maven.multiModuleProjectDirectory}/src/build/enforcer-rules/quarkus-cxf-banned-dependencies.xml</location>
                                </externalRules>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>update-github-workflows</id>
                        <inherited>false</inherited>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <!-- A Groovy script that updates the list of integration test modules in -->
                            <!-- .github/workflows/build.yml based on the real state in integration-tests -->
                            <!-- directory -->
                            <source>import java.nio.file.Files
                                import java.nio.file.Path
                                import java.nio.file.Paths
                                import java.util.stream.Collectors
                                import java.util.stream.Stream

                                def buildYaml = '.github/workflows/build.yml'
                                def buildXmlPath = project.basedir.toPath().resolve(buildYaml)
                                def buildXmlSource = buildXmlPath.getText('UTF-8')
                                def pattern = java.util.regex.Pattern.compile('testModule: *\\[([^\\]]*)\\]')
                                def matcher = pattern.matcher(buildXmlSource)
                                if (!matcher.find()) {
                                    throw new IllegalStateException('Pattern ' + pattern + ' does not match ' + buildXmlPath)
                                }
                                def foundTestModules = matcher.group(1)

                                def expectedTestModules;
                                def iTestsDir = project.basedir.toPath().resolve('integration-tests')
                                try (java.util.stream.Stream files = Files.list(iTestsDir)) {
                                    def pomFiles = files
                                        .map(path -&gt; iTestsDir.resolve(path).resolve('pom.xml'))
                                        .filter(path -&gt; Files.isRegularFile(path))
                                        .collect(Collectors.toList())
                                    def allTestModules = pomFiles.stream()
                                        .map(Path::getParent)
                                        .map(Path::getFileName)
                                        .map(Path::toString)

                                    def jksTestModules = pomFiles.stream()
                                        .filter(path -&gt; path.getText('UTF-8').contains('&lt;id&gt;jks&lt;/id&gt;'))
                                        .map(Path::getParent)
                                        .map(Path::getFileName)
                                        .map(Path::toString)
                                        .map(path -&gt; path + ' -Djks')

                                    expectedTestModules = Stream.concat(allTestModules, jksTestModules)
                                        .sorted()
                                        .map(path -&gt; "'" + path + "'")
                                        .collect(Collectors.joining(', '))
                                }
                                if (!foundTestModules.equals(expectedTestModules)) {
                                    println('Updating testModule attribute in ' + buildYaml + ':\n  old: ' + foundTestModules + '\n  new: '+expectedTestModules)
                                    def newSource = new StringBuilder()
                                    matcher.appendReplacement(newSource, 'testModule: ['+ expectedTestModules +']')
                                    matcher.appendTail(newSource)
                                    buildXmlPath.setText(newSource.toString(), 'UTF-8')
                                } else {
                                    println('testModule attribute in ' + buildYaml + ' is up to date')
                                }</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <configuration>
                    <excludes><!-- Do not format generated files -->
                        <exclude>**/generated/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
                <configuration>
                    <excludes><!-- Do not format generated files -->
                        <exclude>**/generated/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>docs</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>!true</value>
                </property>
            </activation>
            <modules>
                <module>docs</module>
            </modules>
        </profile>
        <profile>
            <id>format</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.l2x6.cq</groupId>
                        <artifactId>cq-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>format-poms</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                                <inherited>false</inherited>
                                <configuration>
                                    <updateVirtualDependencies>
                                        <updateVirtualDependency>
                                            <basedir>${project.basedir}</basedir>
                                            <includes>
                                                <include>integration-tests/*/pom.xml</include>
                                            </includes>
                                        </updateVirtualDependency>
                                    </updateVirtualDependencies>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <quarkus.build.skip>true</quarkus.build.skip>
                <enforcer.skip>true</enforcer.skip>
                <skipTests>true</skipTests>
                <format.skip>true</format.skip>
            </properties>
        </profile>
    </profiles>

</project>
