<?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>0.2.0</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>

        <camel.version>3.0.0-RC1</camel.version>
        <quarkus.version>0.22.0</quarkus.version>
        <jetty.version>9.4.18.v20190429</jetty.version>
        <xstream.version>1.4.11</xstream.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>

        <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>
        <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-release-plugin -->
        <tagNameFormat>@{project.version}</tagNameFormat>

    </properties>

    <modules>
        <module>poms/bom</module>
        <module>poms/bom-deployment</module>
        <module>poms/build-parent</module>
        <module>extensions</module>
        <module>integration-tests</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>0.2.0</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>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </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>
    </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-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>
                                    <bannedDependencies>
                                        <excludes>
                                            <exclude>com.sun.xml.messaging.saaj:saaj-impl</exclude>
                                        </excludes>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <failIfNoTests>false</failIfNoTests>
                        <systemProperties>
                            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        </systemProperties>
                    </configuration>
                </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>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <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>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>license</id>
            <build>
                <defaultGoal>license:format</defaultGoal>
                <plugins>
                    <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>KEYS</exclude>
                                <exclude>**/NOTICE</exclude>
                                <exclude>**/LICENSE</exclude>
                                <exclude>**/NOTICE.txt</exclude>
                                <exclude>**/LICENSE.txt</exclude>
                                <exclude>doap.rdf</exclude>
                                <exclude>**/README</exclude>
                                <exclude>**/*.adoc</exclude>
                                <exclude>**/node_modules/**</exclude>
                                <exclude>**/cacerts</exclude>
                                <exclude>**/*.p12</exclude>
                                <exclude>**/*.txt</exclude>
                                <exclude>.mvn/**</exclude>
                                <exclude>mvnw*</exclude>
                                <exclude>**/META-INF/persistence*.xsd</exclude>
                                <exclude>**/pom.xml.versionsBackup</exclude>
                                <exclude>ide-config/**</exclude>
                            </excludes>
                            <mapping>
                                <java>SLASHSTAR_STYLE</java>
                                <groovy>SLASHSTAR_STYLE</groovy>
                                <properties>CAMEL_PROPERTIES_STYLE</properties>
                                <spring.factories>CAMEL_PROPERTIES_STYLE</spring.factories>
                                <spring.provides>CAMEL_PROPERTIES_STYLE</spring.provides>
                            </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>
            </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>quarkus-snapshots</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <quarkus.version>999-SNAPSHOT</quarkus.version>
            </properties>
            <repositories>
                <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>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>
