<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-shaded</artifactId>
        <version>20.0</version>
    </parent>

    <artifactId>flink-shaded-jackson-parent</artifactId>
    <name>flink-shaded-jackson-parent</name>
    <packaging>pom</packaging>
    <version>2.18.2-20.0</version>

    <modules>
        <module>flink-shaded-jackson-2</module>
        <module>flink-shaded-jackson-module-jsonSchema-2</module>
        <!-- It's under jackson-parent even though it's not its subproject in order to apply the
         same jackson shading from the parent pom. This jackson shading is what we're interested in
         principle, because that way we can configure JsonPath mappings.-->
        <module>flink-shaded-jsonpath</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <id>shade-flink</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                            <dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
                            <artifactSet>
                                <includes>
                                    <include>com.fasterxml.jackson.*:*</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <!-- This needs to match flink-shaded-swagger -->
                                    <pattern>com.fasterxml.jackson</pattern>
                                    <shadedPattern>${shading.prefix}.jackson2.com.fasterxml.jackson</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>