<?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">
    <parent>
        <groupId>org.apache.camel.k</groupId>
        <artifactId>camel-k-support</artifactId>
        <version>3.2.0</version>
    </parent>

    <prerequisites>
        <maven>${maven-version}</maven>
    </prerequisites>

    <modelVersion>4.0.0</modelVersion>
    <packaging>maven-plugin</packaging>

    <artifactId>camel-k-maven-plugin</artifactId>

    <properties>
        <maven-version>3.6.3</maven-version>
        <maven-plugin-tools-version>3.6.0</maven-plugin-tools-version>
        <maven-shaded-version>3.1.0</maven-shaded-version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-common-artifact-filters</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.camel.k</groupId>
            <artifactId>camel-k-catalog-model</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-openapi-rest-dsl-generator</artifactId>
            <version>${camel-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core-catalog</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-catalog</artifactId>
            <version>${camel-quarkus-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-core</artifactId>
            <version>${camel-quarkus-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-catalog</artifactId>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jandex</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <mojoDependencies />
                </configuration>
                <executions>
                    <execution>
                        <id>default-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <configuration>
                    <scriptVariables>
                        <runtimeVersion>${project.version}</runtimeVersion>
                        <camelVersion>${camel-version}</camelVersion>
                        <camelQuarkusVersion>${camel-quarkus-version}</camelQuarkusVersion>
                        <quarkusVersion>${quarkus-version}</quarkusVersion>
                        <quarkusNativeBuilderImage>${quarkus-native-builder-image}</quarkusNativeBuilderImage>
                    </scriptVariables>
                    <pomIncludes>
                        <pomInclude>generate-catalog/pom.xml</pomInclude>
                        <pomInclude>generate-catalog-with-exclusions/pom.xml</pomInclude>
                        <pomInclude>generate-rest-dsl-from-v3/pom.xml</pomInclude>
                        <pomInclude>generate-rest-dsl-from-v2/pom.xml</pomInclude>
                        <pomInclude>generate-dependencies/pom.xml</pomInclude>
                    </pomIncludes>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <cloneClean>true</cloneClean>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <addTestClassPath>true</addTestClassPath>
                    <streamLogs>true</streamLogs>
                    <goals>
                        <goal>prepare-package</goal>
                    </goals>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-tests</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                            <goal>verify</goal>
                        </goals>
                        <configuration>
                            <properties>
                                <com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize>true
                                </com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize>
                                <failIfNoTests>false</failIfNoTests>
                            </properties>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy</artifactId>
                        <version>${groovy-version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-yaml</artifactId>
                        <version>${groovy-version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-json</artifactId>
                        <version>${groovy-version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-xml</artifactId>
                        <version>${groovy-version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-collections4</artifactId>
                        <version>${commons-collections4-version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

  <scm>
    <tag>camel-k-runtime-project-3.2.0</tag>
  </scm>
</project>
