|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | + xmlns="http://maven.apache.org/POM/4.0.0" |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | + <modelVersion>4.0.0</modelVersion> |
| 6 | + |
| 7 | + <groupId>com.amazonaws</groupId> |
| 8 | + <artifactId>aws-msf-async-io</artifactId> |
| 9 | + <version>1.0</version> |
| 10 | + <packaging>jar</packaging> |
| 11 | + |
| 12 | + <properties> |
| 13 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 14 | + <buildDirectory>${project.basedir}/target</buildDirectory> |
| 15 | + <jar.finalName>${project.name}-${project.version}</jar.finalName> |
| 16 | + <target.java.version>11</target.java.version> |
| 17 | + <maven.compiler.source>${target.java.version}</maven.compiler.source> |
| 18 | + <maven.compiler.target>${target.java.version}</maven.compiler.target> |
| 19 | + <flink.version>1.20.0</flink.version> |
| 20 | + <flink.connector.version>4.3.0-1.19</flink.connector.version> |
| 21 | + <kda.runtime.version>1.2.0</kda.runtime.version> |
| 22 | + <log4j.version>2.23.1</log4j.version> |
| 23 | + <jackson.version>2.16.2</jackson.version> |
| 24 | + </properties> |
| 25 | + |
| 26 | + <dependencyManagement> |
| 27 | + <dependencies> |
| 28 | + <dependency> |
| 29 | + <groupId>com.amazonaws</groupId> |
| 30 | + <artifactId>aws-java-sdk-bom</artifactId> |
| 31 | + <!-- Get the latest SDK version from https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom --> |
| 32 | + <version>1.12.676</version> |
| 33 | + <type>pom</type> |
| 34 | + <scope>import</scope> |
| 35 | + </dependency> |
| 36 | + </dependencies> |
| 37 | + </dependencyManagement> |
| 38 | + |
| 39 | + <dependencies> |
| 40 | + <!-- Amazon Managed Service for Apache Flink (formerly Amazon Kinesis Data Analytics) runtime--> |
| 41 | + <dependency> |
| 42 | + <groupId>com.amazonaws</groupId> |
| 43 | + <artifactId>aws-kinesisanalytics-runtime</artifactId> |
| 44 | + <version>${kda.runtime.version}</version> |
| 45 | + </dependency> |
| 46 | + |
| 47 | + <!-- Apache Flink dependencies --> |
| 48 | + <!-- These dependencies are provided, because they should not be packaged into the JAR file. --> |
| 49 | + <dependency> |
| 50 | + <groupId>org.apache.flink</groupId> |
| 51 | + <artifactId>flink-streaming-java</artifactId> |
| 52 | + <version>${flink.version}</version> |
| 53 | + <scope>provided</scope> |
| 54 | + </dependency> |
| 55 | + <dependency> |
| 56 | + <groupId>org.apache.flink</groupId> |
| 57 | + <artifactId>flink-runtime-web</artifactId> |
| 58 | + <version>${flink.version}</version> |
| 59 | + <scope>provided</scope> |
| 60 | + </dependency> |
| 61 | + |
| 62 | + <!-- Flink Kinesis connector --> |
| 63 | + <dependency> |
| 64 | + <groupId>org.apache.flink</groupId> |
| 65 | + <artifactId>flink-connector-base</artifactId> |
| 66 | + <version>${flink.version}</version> |
| 67 | + </dependency> |
| 68 | + <dependency> |
| 69 | + <groupId>org.apache.flink</groupId> |
| 70 | + <artifactId>flink-connector-kinesis</artifactId> |
| 71 | + <version>${flink.connector.version}</version> |
| 72 | + </dependency> |
| 73 | + <dependency> |
| 74 | + <groupId>org.apache.flink</groupId> |
| 75 | + <artifactId>flink-connector-datagen</artifactId> |
| 76 | + <version>${flink.version}</version> |
| 77 | + </dependency> |
| 78 | + |
| 79 | + <!-- Add logging framework, to produce console output when running in the IDE. --> |
| 80 | + <!-- These dependencies are excluded from the application JAR by default. --> |
| 81 | + <dependency> |
| 82 | + <groupId>org.apache.logging.log4j</groupId> |
| 83 | + <artifactId>log4j-slf4j-impl</artifactId> |
| 84 | + <version>${log4j.version}</version> |
| 85 | + <scope>compile</scope> |
| 86 | + </dependency> |
| 87 | + <dependency> |
| 88 | + <groupId>org.apache.logging.log4j</groupId> |
| 89 | + <artifactId>log4j-api</artifactId> |
| 90 | + <version>${log4j.version}</version> |
| 91 | + <scope>compile</scope> |
| 92 | + </dependency> |
| 93 | + <dependency> |
| 94 | + <groupId>org.apache.logging.log4j</groupId> |
| 95 | + <artifactId>log4j-core</artifactId> |
| 96 | + <version>${log4j.version}</version> |
| 97 | + <scope>compile</scope> |
| 98 | + </dependency> |
| 99 | + |
| 100 | + <!-- HTTP Async Client --> |
| 101 | + <dependency> |
| 102 | + <groupId>org.asynchttpclient</groupId> |
| 103 | + <artifactId>async-http-client</artifactId> |
| 104 | + <version>3.0.0</version> |
| 105 | + </dependency> |
| 106 | + </dependencies> |
| 107 | + |
| 108 | + <build> |
| 109 | + <directory>${buildDirectory}</directory> |
| 110 | + <finalName>${jar.finalName}</finalName> |
| 111 | + |
| 112 | + <plugins> |
| 113 | + <!-- Java Compiler --> |
| 114 | + <plugin> |
| 115 | + <groupId>org.apache.maven.plugins</groupId> |
| 116 | + <artifactId>maven-compiler-plugin</artifactId> |
| 117 | + <version>3.8.1</version> |
| 118 | + <configuration> |
| 119 | + <source>${target.java.version}</source> |
| 120 | + <target>${target.java.version}</target> |
| 121 | + </configuration> |
| 122 | + </plugin> |
| 123 | + |
| 124 | + <!-- Shade plugin to build the fat-jar including all required dependencies --> |
| 125 | + <!-- Change the value of <mainClass>...</mainClass> if your program entry point changes. --> |
| 126 | + <plugin> |
| 127 | + <groupId>org.apache.maven.plugins</groupId> |
| 128 | + <artifactId>maven-shade-plugin</artifactId> |
| 129 | + <version>3.2.1</version> |
| 130 | + <executions> |
| 131 | + <!-- Run shade goal on package phase --> |
| 132 | + <execution> |
| 133 | + <phase>package</phase> |
| 134 | + <goals> |
| 135 | + <goal>shade</goal> |
| 136 | + </goals> |
| 137 | + <configuration> |
| 138 | + <artifactSet> |
| 139 | + <excludes> |
| 140 | + <exclude>org.apache.flink:force-shading</exclude> |
| 141 | + <exclude>com.google.code.findbugs:jsr305</exclude> |
| 142 | + <exclude>org.slf4j:*</exclude> |
| 143 | + <exclude>log4j:*</exclude> |
| 144 | + </excludes> |
| 145 | + </artifactSet> |
| 146 | + <filters> |
| 147 | + <filter> |
| 148 | + <!-- Do not copy the signatures in the META-INF folder. |
| 149 | + Otherwise, this might cause SecurityExceptions when using the JAR. --> |
| 150 | + <artifact>*:*</artifact> |
| 151 | + <excludes> |
| 152 | + <exclude>META-INF/*.SF</exclude> |
| 153 | + <exclude>META-INF/*.DSA</exclude> |
| 154 | + <exclude>META-INF/*.RSA</exclude> |
| 155 | + </excludes> |
| 156 | + </filter> |
| 157 | + </filters> |
| 158 | + <transformers> |
| 159 | + <transformer |
| 160 | + implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 161 | + <transformer |
| 162 | + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| 163 | + <mainClass>com.amazonaws.services.msf.RetriesFlinkJob</mainClass> |
| 164 | + </transformer> |
| 165 | + </transformers> |
| 166 | + </configuration> |
| 167 | + </execution> |
| 168 | + </executions> |
| 169 | + </plugin> |
| 170 | + </plugins> |
| 171 | + </build> |
| 172 | +</project> |
0 commit comments