<?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.camel.springboot</groupId>
        <artifactId>tooling</artifactId>
        <version>3.22.2</version>
    </parent>

    <artifactId>camel-spring-boot-dependencies-generator</artifactId>
    <packaging>pom</packaging>
    <name>Camel SB Tooling :: Dependencies BOM Generator</name>

    <dependencyManagement>

        <dependencies>

            <!-- Additional libraries related to Avro (version from Camel) -->
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro</artifactId>
                <version>${avro-version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-mapred</artifactId>
                <version>${avro-version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-protobuf</artifactId>
                <version>${avro-version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-ipc</artifactId>
                <version>${avro-version}</version>
            </dependency>


            <!-- Add a uniform jackson 1 (version from Camel) -->
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-core-asl</artifactId>
                <version>${jackson-version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-jaxrs</artifactId>
                <version>${jackson-version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>${jackson-version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-xc</artifactId>
                <version>${jackson-version}</version>
            </dependency>

            <!-- Dependencies from Camel parent at the end -->
            <dependency>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-parent</artifactId>
                <version>${camel-version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.camel.springboot</groupId>
                <artifactId>camel-spring-boot-generator-maven-plugin</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-dependencies-bom</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <checkConflicts>
                        <boms>
                            <bom>
                                <groupId>org.springframework.boot</groupId>
                                <artifactId>spring-boot-dependencies</artifactId>
                                <version>${spring-boot-version}</version>
                            </bom>
                            <!-- Other BOMs imported by SB are now checked transitively -->
                        </boms>
                    </checkConflicts>
                    <dependencies>
                        <includes>
                            <include>*:*</include>
                        </includes>
                        <excludes>
                            <!-- These artifacts should not be included in the final (generated) BOM -->

                            <!-- Different versions from the ones provided by spring-boot -->
                            <exclude>de.flapdoodle*:*</exclude>
                            <exclude>org.apache.activemq:*</exclude>
                            <exclude>org.apache.commons:commons-pool2</exclude>
                            <exclude>org.apache.httpcomponents:httpasyncclient</exclude>
                            <exclude>org.apache.httpcomponents:httpclient</exclude>
                            <exclude>org.apache.httpcomponents:httpclient-cache</exclude>
                            <exclude>org.apache.httpcomponents:httpclient-osgi</exclude>
                            <exclude>org.apache.httpcomponents:httpcore</exclude>
                            <exclude>org.apache.httpcomponents:httpcore-nio</exclude>
                            <exclude>org.apache.httpcomponents:httpmime</exclude>
                            <exclude>org.apache.derby:derby</exclude>
                            <exclude>org.apache.logging.log4j:*</exclude>
                            <exclude>org.assertj:assertj-core:*</exclude>

                            <exclude>org.codehaus.groovy:*</exclude>
                            <exclude>org.hibernate:hibernate-entitymanager</exclude>
                            <exclude>org.hsqldb:*</exclude>
                            <exclude>org.mockito:*</exclude>
                            <exclude>org.awaitility:awaitility</exclude>
                            <exclude>org.hamcrest:hamcrest</exclude>
                            <exclude>com.datastax.oss:java-driver-core</exclude>
                            <exclude>com.datastax.oss:java-driver-query-builder</exclude>

                            <exclude>org.slf4j:jul-to-slf4j</exclude>
                            <exclude>org.slf4j:log4j-over-slf4j</exclude>
                            <exclude>org.slf4j:slf4j-api</exclude>
                            <exclude>org.slf4j:slf4j-log4j12</exclude>
                            <exclude>org.slf4j:slf4j-simple</exclude>

                            <exclude>org.springframework*:*</exclude>

                            <exclude>commons-codec:*</exclude>
                            <exclude>commons-collections:*</exclude>
                            <exclude>commons-dbcp:*</exclude>
                            <exclude>org.apache.commons:commons-dbcp2</exclude>
                            <exclude>commons-pool:*</exclude>

                            <exclude>com.github.ben-manes.caffeine:caffeine</exclude>
                            <exclude>com.datastax.cassandra:*</exclude>

                            <exclude>com.fasterxml.jackson.*:*</exclude>

                            <exclude>com.google.code.gson:*</exclude>
                            <exclude>javax.servlet:javax.servlet-api</exclude>
                            <exclude>junit:*</exclude>
                            <exclude>org.junit.jupiter:*</exclude>
                            <exclude>org.junit.vintage:*</exclude>
                            <exclude>org.junit.platform:*</exclude>
                            <exclude>net.sf.ehcache:ehcache</exclude>
                            <exclude>org.yaml:snakeyaml</exclude>

                            <exclude>xml-apis:*</exclude>

                            <!-- Different versions required by some modules -->
                            <exclude>com.google.inject:*</exclude>
                            <exclude>com.google.guava:*</exclude>
                            <exclude>io.netty*:*</exclude>
                            <exclude>org.scala-lang:*</exclude>
                            <exclude>org.apache.lucene:*</exclude>
                            <exclude>io.projectreactor*:*</exclude>
                            <exclude>org.reactivestreams*:*</exclude>
                            <exclude>io.dropwizard.metrics*:*</exclude>
                            <exclude>com.nimbusds:oauth2-oidc-sdk</exclude>
                            <exclude>com.squareup.okhttp3:okhttp</exclude>
                            <exclude>io.micrometer:micrometer-core</exclude>

                            <!-- Kafka -->
                            <exclude>org.apache.kafka:*</exclude>

                            <!-- Jetty -->
                            <exclude>org.eclipse.jetty:jetty-rewrite</exclude>
                            <exclude>org.eclipse.jetty:jetty-util-ajax</exclude>

                            <!-- Unrelated -->
                            <exclude>org.apache.servicemix.bundles:*</exclude>
                            <exclude>org.ops4j.pax*:*</exclude>
                            <exclude>org.codehaus.mojo:*</exclude>
                            <exclude>org.apache.servicemix:*</exclude>
                            <exclude>org.apache.aries.blueprint:*</exclude>
                            <exclude>org.apache.felix:*</exclude>
                            <exclude>org.apache.maven.archetype:*</exclude>
                            <exclude>org.osgi:*</exclude>

                            <!-- Modified on Camel due to CAMEL-17435 -->
                            <exclude>com.sun.xml.messaging.saaj:saaj-impl:*</exclude>
                            <exclude>jakarta.xml.bind:jakarta.xml.bind-api:*</exclude>
                            <exclude>javax.annotation:javax.annotation-api:*</exclude>
                            <exclude>javax.xml.ws:jaxws-api:*</exclude>
                            <exclude>org.glassfish.jaxb:jaxb-runtime:*</exclude>

                            <!-- Unuseful -->
                            <exclude>org.springframework:springloaded</exclude>
                            <exclude>com.zaxxer:HikariCP-java6</exclude>

                        </excludes>
                    </dependencies>

                    <sourcePom>${basedir}/target-template-pom.xml</sourcePom>
                    <targetPom>${basedir}/../camel-spring-boot-dependencies/pom.xml</targetPom>
                </configuration>

            </plugin>
        </plugins>
    </build>

</project>
