xref: /aosp_15_r20/external/aws-sdk-java-v2/third-party/third-party-jackson-dataformat-cbor/pom.xml (revision 8a52c7834d808308836a99fc2a6e0ed8db339086)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  ~ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License").
6  ~ You may not use this file except in compliance with the License.
7  ~ A copy of the License is located at
8  ~
9  ~  http://aws.amazon.com/apache2.0
10  ~
11  ~ or in the "license" file accompanying this file. This file is distributed
12  ~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  ~ express or implied. See the License for the specific language governing
14  ~ permissions and limitations under the License.
15  -->
16
17<project xmlns="http://maven.apache.org/POM/4.0.0"
18         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20    <parent>
21        <artifactId>third-party</artifactId>
22        <groupId>software.amazon.awssdk</groupId>
23        <version>2.24.3</version>
24    </parent>
25    <modelVersion>4.0.0</modelVersion>
26
27    <artifactId>third-party-jackson-dataformat-cbor</artifactId>
28    <name>AWS Java SDK :: Third Party :: Jackson-dataformat-cbor</name>
29    <url>https://aws.amazon.com/sdkforjava</url>
30
31    <dependencyManagement>
32        <dependencies>
33            <dependency>
34                <groupId>software.amazon.awssdk</groupId>
35                <artifactId>bom-internal</artifactId>
36                <version>${project.version}</version>
37                <type>pom</type>
38                <scope>import</scope>
39            </dependency>
40        </dependencies>
41    </dependencyManagement>
42
43    <dependencies>
44        <dependency>
45            <groupId>software.amazon.awssdk</groupId>
46            <artifactId>third-party-jackson-core</artifactId>
47            <version>${awsjavasdk.version}</version>
48        </dependency>
49
50        <!-- Shaded -->
51        <dependency>
52            <groupId>com.fasterxml.jackson.dataformat</groupId>
53            <artifactId>jackson-dataformat-cbor</artifactId>
54            <version>${jackson.version}</version>
55            <optional>true</optional>
56        </dependency>
57    </dependencies>
58
59    <build>
60        <plugins>
61            <!-- Shade Jackson -->
62            <plugin>
63                <groupId>org.apache.maven.plugins</groupId>
64                <artifactId>maven-shade-plugin</artifactId>
65                <version>3.5.0</version>
66
67                <configuration>
68                    <artifactSet>
69                        <includes>
70                            <include>com.fasterxml.jackson.dataformat:*</include>
71                        </includes>
72                    </artifactSet>
73                    <relocations>
74                        <relocation>
75                            <pattern>com.fasterxml.jackson.dataformat.cbor</pattern>
76                            <shadedPattern>software.amazon.awssdk.thirdparty.jackson.dataformat.cbor</shadedPattern>
77                        </relocation>
78                        <relocation>
79                            <pattern>com.fasterxml.jackson.core</pattern>
80                            <shadedPattern>software.amazon.awssdk.thirdparty.jackson.core</shadedPattern>
81                        </relocation>
82                    </relocations>
83                    <filters>
84                        <filter>
85                            <artifact>com.fasterxml.jackson.dataformat:*</artifact>
86                            <excludes>
87                                <!-- Exclude components that require Jackson-databind, because we don't use it. -->
88                                <exclude>com/fasterxml/jackson/dataformat/cbor/databind/**</exclude>
89                                <exclude>META-INF/**/pom.xml</exclude>
90                                <exclude>META-INF/**/pom.properties</exclude>
91                                <!-- exclude multirelease classes -->
92                                <exclude>META-INF/versions/**/*.class</exclude>
93                            </excludes>
94                        </filter>
95                    </filters>
96                    <transformers>
97                        <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
98                    </transformers>
99                    <shadedArtifactAttached>false</shadedArtifactAttached>
100                    <createDependencyReducedPom>true</createDependencyReducedPom>
101                    <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
102                </configuration>
103                <executions>
104                    <execution>
105                        <phase>package</phase>
106                        <goals>
107                            <goal>shade</goal>
108                        </goals>
109                    </execution>
110                </executions>
111            </plugin>
112
113            <!-- Ensure that IntelliJ loads the shaded jar -->
114            <plugin>
115                <groupId>org.codehaus.mojo</groupId>
116                <artifactId>build-helper-maven-plugin</artifactId>
117                <executions>
118                    <execution>
119                        <id>compile</id>
120                        <phase>package</phase>
121                        <goals>
122                            <goal>attach-artifact</goal>
123                        </goals>
124                        <configuration>
125                            <artifacts>
126                                <artifact>
127                                    <file>${basedir}/target/aws-sdk-java-third-party-jackson-dataformat-cbor-${project.version}.jar</file>
128                                    <type>jar</type>
129                                    <classifier>optional</classifier>
130                                </artifact>
131                            </artifacts>
132                        </configuration>
133                    </execution>
134                </executions>
135            </plugin>
136            <plugin>
137                <groupId>org.apache.maven.plugins</groupId>
138                <artifactId>maven-jar-plugin</artifactId>
139                <configuration>
140                    <archive>
141                        <manifestEntries>
142                            <Automatic-Module-Name>software.amazon.awssdk.thirdparty.jackson.dataformat.cbor</Automatic-Module-Name>
143                        </manifestEntries>
144                        <manifest>
145                            <addDefaultEntries>false</addDefaultEntries>
146                        </manifest>
147                        <addMavenDescriptor>false</addMavenDescriptor>
148                    </archive>
149                </configuration>
150            </plugin>
151            <plugin>
152                <artifactId>maven-javadoc-plugin</artifactId>
153                <executions>
154                    <execution>
155                        <id>javadoc-jar</id>
156                        <phase>package</phase>
157                        <goals>
158                            <goal>jar</goal>
159                        </goals>
160                    </execution>
161                </executions>
162                <configuration>
163                    <sourcepath>${basedir}/../../core/profiles/src/main/java/software/amazon/awssdk/profiles;${basedir}/../../core/sdk-core/src/main/java/software/amazon/awssdk/core</sourcepath>
164                    <failOnError>false</failOnError>
165                </configuration>
166            </plugin>
167        </plugins>
168    </build>
169</project>
170