xref: /aosp_15_r20/external/aws-sdk-java-v2/third-party/third-party-slf4j-api/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" f4ile 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-slf4j-api</artifactId>
28    <name>AWS Java SDK :: Third Party :: SLF4J API</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            <!-- Shaded -->
46            <groupId>org.slf4j</groupId>
47            <artifactId>slf4j-api</artifactId>
48            <version>${slf4j.version}</version>
49            <optional>true</optional>
50        </dependency>
51    </dependencies>
52
53    <build>
54        <plugins>
55            <!-- Shade SLF4J -->
56            <plugin>
57                <groupId>org.apache.maven.plugins</groupId>
58                <artifactId>maven-shade-plugin</artifactId>
59                <version>3.5.0</version>
60
61                <configuration>
62                    <artifactSet>
63                        <includes>
64                            <include>org.slf4j:*</include>
65                        </includes>
66                    </artifactSet>
67                    <relocations>
68                        <relocation>
69                            <pattern>org.slf4j</pattern>
70                            <shadedPattern>software.amazon.awssdk.thirdparty.org.slf4j</shadedPattern>
71                        </relocation>
72                    </relocations>
73                    <filters>
74                        <filter>
75                            <artifact>org.slf4j:*</artifact>
76                            <excludes>
77                                <exclude>META-INF/**/pom.xml</exclude>
78                                <exclude>META-INF/**/pom.properties</exclude>
79                                <!-- exclude multirelease classes -->
80                                <exclude>META-INF/versions/**/*.class</exclude>
81                            </excludes>
82                        </filter>
83                    </filters>
84                    <transformers>
85                        <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
86                    </transformers>
87                    <shadedArtifactAttached>false</shadedArtifactAttached>
88                    <createDependencyReducedPom>true</createDependencyReducedPom>
89                    <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
90                </configuration>
91                <executions>
92                    <execution>
93                        <phase>package</phase>
94                        <goals>
95                            <goal>shade</goal>
96                        </goals>
97                    </execution>
98                </executions>
99            </plugin>
100
101            <!-- Ensure that IntelliJ loads the shaded jar -->
102            <plugin>
103                <groupId>org.codehaus.mojo</groupId>
104                <artifactId>build-helper-maven-plugin</artifactId>
105                <executions>
106                    <execution>
107                        <id>compile</id>
108                        <phase>package</phase>
109                        <goals>
110                            <goal>attach-artifact</goal>
111                        </goals>
112                        <configuration>
113                            <artifacts>
114                                <artifact>
115                                    <file>${basedir}/target/aws-sdk-java-third-party-slf4j-api-${awsjavasdk.version}.jar</file>
116                                    <type>jar</type>
117                                    <classifier>optional</classifier>
118                                </artifact>
119                            </artifacts>
120                        </configuration>
121                    </execution>
122                </executions>
123            </plugin>
124            <plugin>
125                <groupId>org.apache.maven.plugins</groupId>
126                <artifactId>maven-jar-plugin</artifactId>
127                <configuration>
128                    <archive>
129                        <manifestEntries>
130                            <Automatic-Module-Name>software.amazon.awssdk.thirdparty.slf4j</Automatic-Module-Name>
131                        </manifestEntries>
132                        <manifest>
133                            <addDefaultEntries>false</addDefaultEntries>
134                        </manifest>
135                        <addMavenDescriptor>false</addMavenDescriptor>
136                    </archive>
137                </configuration>
138            </plugin>
139            <plugin>
140                <artifactId>maven-javadoc-plugin</artifactId>
141                <executions>
142                    <execution>
143                        <id>javadoc-jar</id>
144                        <phase>package</phase>
145                        <goals>
146                            <goal>jar</goal>
147                        </goals>
148                    </execution>
149                </executions>
150                <configuration>
151                    <sourcepath>${basedir}/../../core/profiles/src/main/java/software/amazon/awssdk/profiles;${basedir}/../../core/sdk-core/src/main/java/software/amazon/awssdk/core</sourcepath>
152                    <failOnError>false</failOnError>
153                </configuration>
154            </plugin>
155        </plugins>
156    </build>
157</project>
158