<?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</groupId>
        <artifactId>apache</artifactId>
        <version>21</version>
    </parent>

    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-parent</artifactId>
    <version>1.0.0-M5</version>
    <packaging>pom</packaging>

    <name>Camel Quarkus</name>
    <description>Apache Camel extensions for Quarkus</description>
    <url>http://camel.apache.org</url>
    <inceptionYear>2019</inceptionYear>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <ahc.version>2.10.4</ahc.version>
        <camel.version>3.1.0</camel.version>
        <google-http-client.version>1.22.0</google-http-client.version>
        <guava.version>26.0-jre</guava.version>
        <hapi.version>4.1.0</hapi.version>
        <quarkus.version>1.3.0.Final</quarkus.version>
        <httpmime.version>4.1.3</httpmime.version>
        <jackson.version>2.10.2</jackson.version>
        <jetty.version>9.4.18.v20190429</jetty.version>
        <xstream.version>1.4.11</xstream.version>
        <httpclient.cache.version>4.5.5</httpclient.cache.version>
        <snakeyaml.version>1.25</snakeyaml.version>
        <xalan.version>2.7.2</xalan.version>
        <xerces.version>2.12.0</xerces.version>
        <kotlin.version>1.3.61</kotlin.version>
        <!-- Keep spring.version aligned with the version used by Camel -->
        <spring.version>5.2.3.RELEASE</spring.version>
        <retrofit.version>2.5.0</retrofit.version>
        <consul-client.version>1.3.3</consul-client.version>
        <stax2.version>4.2</stax2.version>

        <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.testTarget>${maven.compiler.target}</maven.compiler.testTarget>
        <maven.compiler.testSource>${maven.compiler.source}</maven.compiler.testSource>

        <!-- maven-enforcer-plugin -->
        <supported-maven-versions>[3.5.3,)</supported-maven-versions>

        <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
        <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
        <groovy-maven-plugin.version>2.1.1</groovy-maven-plugin.version>
        <groovy.version>2.5.8</groovy.version>
        <jandex-maven-plugin.version>1.0.7</jandex-maven-plugin.version>
        <properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
        <mycila-license.version>3.0</mycila-license.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
        <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.1.0</maven-source-plugin.version>
        <maven-assembly-plugin.version>3.1.1</maven-assembly-plugin.version>
        <maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
        <!-- NOTE: We pin to this version due to https://github.com/apache/camel-quarkus/issues/723 -->
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>

        <!-- maven-release-plugin -->
        <tagNameFormat>@{project.version}</tagNameFormat>
    </properties>

    <modules>
        <module>poms</module>
        <module>tooling</module>
        <module>extensions-core</module>
        <module>extensions-support</module>
        <module>extensions</module>
        <module>catalog</module>
        <module>integration-tests</module>
        <module>examples</module>
        <module>docs</module>
    </modules>

    <developers>
        <developer>
            <name>The Apache Camel Team</name>
            <email>dev@camel.apache.org</email>
            <url>http://camel.apache.org</url>
            <organization>Apache Software Foundation</organization>
            <organizationUrl>http://apache.org/</organizationUrl>
            <properties>
                <picUrl>http://camel.apache.org/banner.data/apache-camel-7.png</picUrl>
            </properties>
        </developer>
    </developers>

    <mailingLists>
        <mailingList>
            <name>Development List</name>
            <subscribe>dev-subscribe@camel.apache.org</subscribe>
            <unsubscribe>dev-unsubscribe@camel.apache.org</unsubscribe>
            <post>dev@camel.apache.org</post>
        </mailingList>
        <mailingList>
            <name>User List</name>
            <subscribe>users-subscribe@camel.apache.org</subscribe>
            <unsubscribe>users-unsubscribe@camel.apache.org</unsubscribe>
            <post>users@camel.apache.org</post>
        </mailingList>
        <mailingList>
            <name>Commits List</name>
            <subscribe>commits-subscribe@camel.apache.org</subscribe>
            <unsubscribe>commits-unsubscribe@camel.apache.org</unsubscribe>
            <post>commits@camel.apache.org</post>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:git:http://gitbox.apache.org/repos/asf/camel-quarkus.git</connection>
        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/camel-quarkus.git</developerConnection>
        <url>https://gitbox.apache.org/repos/asf?p=camel-quarkus.git;a=summary</url>
        <tag>1.0.0-M5</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/apache/camel-quarkus/issues</url>
    </issueManagement>

    <repositories>
        <repository>
            <id>apache.snapshots</id>
            <url>https://repository.apache.org/snapshots/</url>
            <name>Apache Snapshot Repo</name>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>apache.snapshots</id>
            <url>https://repository.apache.org/snapshots/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Only plugins relevant to both end user applications and Camel Quarkus extensions -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <compilerArgs>
                            <arg>-Xlint:unchecked</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <failIfNoTests>false</failIfNoTests>
                        <systemProperties>
                            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        </systemProperties>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-maven-plugin</artifactId>
                    <version>${quarkus.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.gmaven</groupId>
                    <artifactId>groovy-maven-plugin</artifactId>
                    <version>${groovy-maven-plugin.version}</version>
                </plugin>

                <!-- license-maven-plugin is not necessarily relevant for user applications.
                     It is managed here so that we can have its config defined on a single place.
                     It is executed from profiles only -->
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${mycila-license.version}</version>
                    <configuration>
                        <failIfUnknown>true</failIfUnknown>
                        <header>header.txt</header>
                        <excludes>
                            <exclude>**/*.adoc</exclude>
                            <exclude>**/*.csv</exclude>
                            <exclude>**/*.graphql</exclude>
                            <exclude>**/*.ics</exclude>
                            <exclude>**/*.lock</exclude>
                            <exclude>**/*.mp3</exclude>
                            <exclude>**/*.mp4</exclude>
                            <exclude>**/*.mvel</exclude>
                            <exclude>**/*.p12</exclude>
                            <exclude>**/*.pem</exclude>
                            <exclude>**/*.txt</exclude>
                            <exclude>**/.factorypath</exclude>
                            <exclude>**/LICENSE.txt</exclude>
                            <exclude>**/LICENSE</exclude>
                            <exclude>**/META-INF/persistence*.xsd</exclude>
                            <exclude>**/NOTICE.txt</exclude>
                            <exclude>**/NOTICE</exclude>
                            <exclude>**/README</exclude>
                            <exclude>**/cacerts</exclude>
                            <exclude>**/camel-quarkus-test-list.xml</exclude>
                            <exclude>**/node_modules/**</exclude>
                            <exclude>**/pom.xml.versionsBackup</exclude>
                            <exclude>.mvn/**</exclude>
                            <exclude>KEYS</exclude>
                            <exclude>doap.rdf</exclude>
                            <exclude>ide-config/**</exclude>
                            <exclude>mvnw*</exclude>
                            <exclude>node/**</exclude>
                            <exclude>**/resources/routes.1</exclude>
                            <exclude>**/resources/routes.2</exclude>
                        </excludes>
                        <mapping>
                            <groovy>SLASHSTAR_STYLE</groovy>
                            <java>SLASHSTAR_STYLE</java>
                            <Jenkinsfile>SLASHSTAR_STYLE</Jenkinsfile>
                            <Jenkinsfile.quarkus>SLASHSTAR_STYLE</Jenkinsfile.quarkus>
                            <properties>CAMEL_PROPERTIES_STYLE</properties>
                            <spring.factories>CAMEL_PROPERTIES_STYLE</spring.factories>
                            <spring.provides>CAMEL_PROPERTIES_STYLE</spring.provides>
                            <kt>SLASHSTAR_STYLE</kt>
                        </mapping>
                        <headerDefinitions>
                            <headerDefinition>license-properties-headerdefinition.xml</headerDefinition>
                        </headerDefinitions>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.camel</groupId>
                            <artifactId>camel-buildtools</artifactId>
                            <version>${camel.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

    <profiles>
        <profile>
            <!-- To disable sanity checks while building: add '-Denforce=false' to the command line -->
            <id>enforce</id>
            <activation>
                <property>
                    <name>enforce</name>
                    <value>!false</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>camel-quarkus-enforcer-rules</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <dependencyConvergence />
                                        <requireMavenVersion>
                                            <version>${supported-maven-versions}</version>
                                        </requireMavenVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.gmaven</groupId>
                        <artifactId>groovy-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>validate-github-workflows</id>
                                <inherited>false</inherited>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <phase>process-resources</phase>
                                <configuration>
                                    <source>file:///${project.basedir}/tooling/scripts/validate-github-workflows.groovy</source>
                                </configuration>
                            </execution>
                            <execution>
                                <id>validate-extension-metadata</id>
                                <inherited>false</inherited>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <phase>verify</phase>
                                <configuration>
                                    <source>file:///${project.basedir}/tooling/scripts/validate-extension-metadata.groovy</source>
                                    <properties>
                                        <extensionDirs>extensions-core,extensions-support,extensions</extensionDirs>
                                    </properties>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.yaml</groupId>
                                <artifactId>snakeyaml</artifactId>
                                <version>${snakeyaml.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>linux</id>
            <activation>
                <os>
                    <name>Linux</name>
                </os>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemProperties>
                                <java.security.egd>file:/dev/./urandom</java.security.egd>
                            </systemProperties>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jdk-8-classpath</id>
            <activation>
                <jdk>[9,</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <release>8</release>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <release>8</release>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>format</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>license-format</id>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.gmaven</groupId>
                        <artifactId>groovy-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sort-poms</id>
                                <inherited>false</inherited>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <phase>process-resources</phase>
                                <configuration>
                                    <properties>
                                        <sortModulesPaths>extensions/pom.xml,integration-tests/pom.xml</sortModulesPaths>
                                        <sortDependencyManagementPaths>poms/bom/pom.xml,poms/bom-deployment/pom.xml</sortDependencyManagementPaths>
                                        <updateMvndRuleDirs>examples,integration-tests</updateMvndRuleDirs>
                                    </properties>
                                    <source>file:///${project.basedir}/tooling/scripts/sort-poms.groovy</source>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>check-format</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>license-format</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- We want to deploy the artifact to a staging location for perusal -->
                    <plugin>
                        <inherited>true</inherited>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>${maven-deploy-plugin.version}</version>
                        <configuration>
                            <updateReleaseInfo>true</updateReleaseInfo>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <additionalOptions>${javadoc.opts}</additionalOptions>
                        </configuration>
                    </plugin>
                    <!-- We want to sign the artifact, the POM, and all attached artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                            <useAgent>${gpg.useagent}</useAgent>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>deploy</id>
            <activation>
                <property>
                    <name>deploy</name>
                </property>
            </activation>
            <build>
                <defaultGoal>deploy</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <additionalOptions>${javadoc.opts}</additionalOptions>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <javadoc.opts>-Xdoclint:none</javadoc.opts>
            </properties>
        </profile>

        <profile>
            <id>docker</id>
            <activation>
                <property>
                    <name>docker</name>
                </property>
            </activation>
            <properties>
                <quarkus.native.container-build>true</quarkus.native.container-build>
                <quarkus.native.container-runtime>docker</quarkus.native.container-runtime>
            </properties>
        </profile>

        <profile>
            <id>snapshots</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>apache.snapshots</id>
                    <url>https://repository.apache.org/snapshots/</url>
                    <name>Apache Snapshot Repo</name>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                </repository>
                <repository>
                    <id>oss-snapshots-repo</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>apache.snapshots</id>
                    <url>https://repository.apache.org/snapshots/</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                </pluginRepository>
                <pluginRepository>
                    <id>oss-snapshots-repo</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

</project>
