|
| 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>msaf-printer</artifactId> |
| 9 | + <version>1.0-SNAPSHOT</version> |
| 10 | + |
| 11 | + <distributionManagement> |
| 12 | + <repository> |
| 13 | + <id>github</id> |
| 14 | + <name>GitHub Packages</name> |
| 15 | + <url>https://maven.pkg.github.com/localstack-samples/amazon-managed-service-for-apache-flink-examples</url> |
| 16 | + </repository> |
| 17 | + </distributionManagement> |
| 18 | + |
| 19 | + <properties> |
| 20 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 21 | + <buildDirectory>${project.basedir}/target</buildDirectory> |
| 22 | + <jar.finalName>${project.name}</jar.finalName> |
| 23 | + <target.java.version>11</target.java.version> |
| 24 | + <maven.compiler.source>${target.java.version}</maven.compiler.source> |
| 25 | + <maven.compiler.target>${target.java.version}</maven.compiler.target> |
| 26 | + <flink.version>1.20.0</flink.version> |
| 27 | + <flink.connector.version>5.0.0-1.20</flink.connector.version> |
| 28 | + <kda.runtime.version>1.2.0</kda.runtime.version> |
| 29 | + <log4j.version>2.23.1</log4j.version> |
| 30 | + </properties> |
| 31 | + |
| 32 | + <dependencyManagement> |
| 33 | + <dependencies> |
| 34 | + <dependency> |
| 35 | + <groupId>com.amazonaws</groupId> |
| 36 | + <artifactId>aws-java-sdk-bom</artifactId> |
| 37 | + <!-- Get the latest SDK version from https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom --> |
| 38 | + <version>1.12.677</version> |
| 39 | + <type>pom</type> |
| 40 | + <scope>import</scope> |
| 41 | + </dependency> |
| 42 | + </dependencies> |
| 43 | + </dependencyManagement> |
| 44 | + |
| 45 | + <dependencies> |
| 46 | + <!-- Apache Flink dependencies --> |
| 47 | + <!-- These dependencies are provided, because they should not be packaged into the JAR file. --> |
| 48 | + <dependency> |
| 49 | + <groupId>org.apache.flink</groupId> |
| 50 | + <artifactId>flink-streaming-java</artifactId> |
| 51 | + <version>${flink.version}</version> |
| 52 | + <scope>provided</scope> |
| 53 | + </dependency> |
| 54 | + <dependency> |
| 55 | + <groupId>org.apache.flink</groupId> |
| 56 | + <artifactId>flink-clients</artifactId> |
| 57 | + <version>${flink.version}</version> |
| 58 | + <scope>provided</scope> |
| 59 | + </dependency> |
| 60 | + <dependency> |
| 61 | + <groupId>org.apache.flink</groupId> |
| 62 | + <artifactId>flink-runtime-web</artifactId> |
| 63 | + <version>${flink.version}</version> |
| 64 | + <scope>provided</scope> |
| 65 | + </dependency> |
| 66 | + |
| 67 | + <!-- Library to retrieve runtime application properties in Managed Service for Apache Flink --> |
| 68 | + <dependency> |
| 69 | + <groupId>com.amazonaws</groupId> |
| 70 | + <artifactId>aws-kinesisanalytics-runtime</artifactId> |
| 71 | + <version>${kda.runtime.version}</version> |
| 72 | + <scope>provided</scope> |
| 73 | + </dependency> |
| 74 | + |
| 75 | + <!-- Flink connectors --> |
| 76 | + <dependency> |
| 77 | + <groupId>org.apache.flink</groupId> |
| 78 | + <artifactId>flink-connector-datagen</artifactId> |
| 79 | + <version>${flink.version}</version> |
| 80 | + </dependency> |
| 81 | + <dependency> |
| 82 | + <groupId>org.apache.flink</groupId> |
| 83 | + <artifactId>flink-connector-files</artifactId> |
| 84 | + <version>${flink.version}</version> |
| 85 | + <scope>provided</scope> |
| 86 | + </dependency> |
| 87 | + <dependency> |
| 88 | + <groupId>org.apache.flink</groupId> |
| 89 | + <artifactId>flink-s3-fs-hadoop</artifactId> |
| 90 | + <version>${flink.version}</version> |
| 91 | + </dependency> |
| 92 | + <dependency> |
| 93 | + <groupId>org.apache.flink</groupId> |
| 94 | + <artifactId>flink-connector-base</artifactId> |
| 95 | + <version>${flink.version}</version> |
| 96 | + <scope>provided</scope> |
| 97 | + </dependency> |
| 98 | + |
| 99 | + <!-- Add logging framework, to produce console output when running in the IDE. --> |
| 100 | + <!-- These dependencies are excluded from the application JAR by default. --> |
| 101 | + <dependency> |
| 102 | + <groupId>org.apache.logging.log4j</groupId> |
| 103 | + <artifactId>log4j-slf4j-impl</artifactId> |
| 104 | + <version>${log4j.version}</version> |
| 105 | + </dependency> |
| 106 | + <dependency> |
| 107 | + <groupId>org.apache.logging.log4j</groupId> |
| 108 | + <artifactId>log4j-api</artifactId> |
| 109 | + <version>${log4j.version}</version> |
| 110 | + </dependency> |
| 111 | + <dependency> |
| 112 | + <groupId>org.apache.logging.log4j</groupId> |
| 113 | + <artifactId>log4j-core</artifactId> |
| 114 | + <version>${log4j.version}</version> |
| 115 | + </dependency> |
| 116 | + </dependencies> |
| 117 | + |
| 118 | + <build> |
| 119 | + <directory>${buildDirectory}</directory> |
| 120 | + <finalName>${jar.finalName}</finalName> |
| 121 | + |
| 122 | + <plugins> |
| 123 | + <!-- Java Compiler --> |
| 124 | + <plugin> |
| 125 | + <groupId>org.apache.maven.plugins</groupId> |
| 126 | + <artifactId>maven-compiler-plugin</artifactId> |
| 127 | + <version>3.8.1</version> |
| 128 | + <configuration> |
| 129 | + <source>${target.java.version}</source> |
| 130 | + <target>${target.java.version}</target> |
| 131 | + <forceJavacCompilerUse>true</forceJavacCompilerUse> |
| 132 | + </configuration> |
| 133 | + </plugin> |
| 134 | + <!-- We use the maven-shade plugin to create a fat jar that contains all necessary dependencies. --> |
| 135 | + <!-- Change the value of <mainClass>...</mainClass> if your program entry point changes. --> |
| 136 | + <plugin> |
| 137 | + <groupId>org.apache.maven.plugins</groupId> |
| 138 | + <artifactId>maven-shade-plugin</artifactId> |
| 139 | + <version>3.2.1</version> |
| 140 | + <executions> |
| 141 | + <!-- Run shade goal on package phase --> |
| 142 | + <execution> |
| 143 | + <phase>package</phase> |
| 144 | + <goals> |
| 145 | + <goal>shade</goal> |
| 146 | + </goals> |
| 147 | + <configuration> |
| 148 | + <artifactSet> |
| 149 | + <excludes> |
| 150 | + <exclude>org.apache.flink:force-shading</exclude> |
| 151 | + <exclude>com.google.code.findbugs:jsr305</exclude> |
| 152 | + <exclude>org.slf4j:*</exclude> |
| 153 | + <exclude>org.apache.logging.log4j:*</exclude> |
| 154 | + </excludes> |
| 155 | + </artifactSet> |
| 156 | + <filters> |
| 157 | + <filter> |
| 158 | + <!-- Do not copy the signatures in the META-INF folder. |
| 159 | + Otherwise, this might cause SecurityExceptions when using the JAR. --> |
| 160 | + <artifact>*:*</artifact> |
| 161 | + <excludes> |
| 162 | + <exclude>META-INF/*.SF</exclude> |
| 163 | + <exclude>META-INF/*.DSA</exclude> |
| 164 | + <exclude>META-INF/*.RSA</exclude> |
| 165 | + </excludes> |
| 166 | + </filter> |
| 167 | + </filters> |
| 168 | + <transformers> |
| 169 | + <transformer |
| 170 | + implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 171 | + <transformer |
| 172 | + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| 173 | + <mainClass>com.amazonaws.services.msf.StreamingJob</mainClass> |
| 174 | + </transformer> |
| 175 | + </transformers> |
| 176 | + </configuration> |
| 177 | + </execution> |
| 178 | + </executions> |
| 179 | + </plugin> |
| 180 | + |
| 181 | + </plugins> |
| 182 | + </build> |
| 183 | + |
| 184 | +</project> |
0 commit comments