1<!-- 2 ~ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 ~ 4 ~ Licensed under the Apache License, Version 2.0 (the "License"). 5 ~ You may not use this file except in compliance with the License. 6 ~ A copy of the License is located at 7 ~ 8 ~ http://aws.amazon.com/apache2.0 9 ~ 10 ~ or in the "license" file accompanying this file. This file is distributed 11 ~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 ~ express or implied. See the License for the specific language governing 13 ~ permissions and limitations under the License. 14 --> 15 16<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 17 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 18 <modelVersion>4.0.0</modelVersion> 19 <parent> 20 <groupId>software.amazon.awssdk</groupId> 21 <artifactId>aws-sdk-java-pom</artifactId> 22 <version>2.24.3</version> 23 <relativePath>../../pom.xml</relativePath> 24 </parent> 25 26 <artifactId>sdk-benchmarks</artifactId> 27 <packaging>jar</packaging> 28 29 <name>AWS Java SDK :: Test :: SDK Benchmarks</name> 30 <description>Contains JMH benchmark code for the SDK</description> 31 32 <properties> 33 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 34 35 <!-- 36 JMH version to use with this project. 37 --> 38 <jmh.version>1.29</jmh.version> 39 40 <!-- 41 Java source/target to use for compilation. 42 --> 43 <javac.target>1.8</javac.target> 44 45 <!-- 46 Name of the benchmark Uber-JAR to generate. 47 --> 48 <uberjar.name>benchmarks</uberjar.name> 49 50 <sdk-v1.version>1.11.404</sdk-v1.version> 51 <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version> 52 </properties> 53 54 <dependencies> 55 <dependency> 56 <groupId>org.openjdk.jmh</groupId> 57 <artifactId>jmh-core</artifactId> 58 <version>${jmh.version}</version> 59 </dependency> 60 <dependency> 61 <groupId>org.openjdk.jmh</groupId> 62 <artifactId>jmh-generator-annprocess</artifactId> 63 <version>${jmh.version}</version> 64 <scope>provided</scope> 65 </dependency> 66 67 <dependency> 68 <groupId>com.amazonaws</groupId> 69 <artifactId>aws-java-sdk-core</artifactId> 70 <version>${sdk-v1.version}</version> 71 </dependency> 72 73 <dependency> 74 <groupId>com.amazonaws</groupId> 75 <artifactId>aws-java-sdk-dynamodb</artifactId> 76 <version>${sdk-v1.version}</version> 77 </dependency> 78 79 <dependency> 80 <groupId>software.amazon.awssdk</groupId> 81 <artifactId>dynamodb</artifactId> 82 <version>${awsjavasdk.version}</version> 83 </dependency> 84 85 <dependency> 86 <groupId>com.amazonaws</groupId> 87 <artifactId>aws-java-sdk-ec2</artifactId> 88 <version>${sdk-v1.version}</version> 89 </dependency> 90 91 <dependency> 92 <groupId>software.amazon.awssdk</groupId> 93 <artifactId>ec2</artifactId> 94 <version>${awsjavasdk.version}</version> 95 </dependency> 96 97 <dependency> 98 <groupId>software.amazon.awssdk</groupId> 99 <artifactId>aws-query-protocol</artifactId> 100 <version>${awsjavasdk.version}</version> 101 </dependency> 102 103 <dependency> 104 <groupId>software.amazon.awssdk</groupId> 105 <artifactId>aws-json-protocol</artifactId> 106 <version>${awsjavasdk.version}</version> 107 </dependency> 108 109 <dependency> 110 <groupId>software.amazon.awssdk</groupId> 111 <artifactId>protocol-core</artifactId> 112 <version>${awsjavasdk.version}</version> 113 </dependency> 114 115 <dependency> 116 <groupId>software.amazon.awssdk</groupId> 117 <artifactId>sdk-core</artifactId> 118 <version>${awsjavasdk.version}</version> 119 </dependency> 120 121 <dependency> 122 <groupId>software.amazon.awssdk</groupId> 123 <artifactId>http-client-spi</artifactId> 124 <version>${awsjavasdk.version}</version> 125 </dependency> 126 <dependency> 127 <groupId>software.amazon.awssdk</groupId> 128 <artifactId>url-connection-client</artifactId> 129 <version>${awsjavasdk.version}</version> 130 </dependency> 131 <dependency> 132 <groupId>software.amazon.awssdk</groupId> 133 <artifactId>netty-nio-client</artifactId> 134 <version>${awsjavasdk.version}</version> 135 </dependency> 136 <dependency> 137 <groupId>software.amazon.awssdk</groupId> 138 <artifactId>dynamodb-enhanced</artifactId> 139 <version>${awsjavasdk.version}</version> 140 </dependency> 141 <dependency> 142 <groupId>io.netty</groupId> 143 <artifactId>netty-tcnative-boringssl-static</artifactId> 144 <scope>compile</scope> 145 </dependency> 146 <dependency> 147 <groupId>software.amazon.awssdk</groupId> 148 <artifactId>regions</artifactId> 149 <version>${awsjavasdk.version}</version> 150 </dependency> 151 <dependency> 152 <groupId>software.amazon.awssdk</groupId> 153 <artifactId>auth</artifactId> 154 <version>${awsjavasdk.version}</version> 155 </dependency> 156 <dependency> 157 <groupId>software.amazon.awssdk</groupId> 158 <artifactId>apache-client</artifactId> 159 <version>${awsjavasdk.version}</version> 160 </dependency> 161 <dependency> 162 <groupId>software.amazon.awssdk</groupId> 163 <artifactId>protocol-tests</artifactId> 164 <version>${awsjavasdk.version}</version> 165 <scope>compile</scope> 166 </dependency> 167 <dependency> 168 <groupId>org.apache.logging.log4j</groupId> 169 <artifactId>log4j-api</artifactId> 170 <scope>compile</scope> 171 </dependency> 172 <dependency> 173 <groupId>org.apache.logging.log4j</groupId> 174 <artifactId>log4j-core</artifactId> 175 <scope>compile</scope> 176 </dependency> 177 <dependency> 178 <groupId>org.apache.logging.log4j</groupId> 179 <artifactId>log4j-slf4j-impl</artifactId> 180 <scope>compile</scope> 181 </dependency> 182 <dependency> 183 <groupId>org.eclipse.jetty</groupId> 184 <artifactId>jetty-servlet</artifactId> 185 </dependency> 186 <dependency> 187 <groupId>org.eclipse.jetty</groupId> 188 <artifactId>jetty-server</artifactId> 189 </dependency> 190 <dependency> 191 <groupId>org.eclipse.jetty.http2</groupId> 192 <artifactId>http2-server</artifactId> 193 </dependency> 194 <dependency> 195 <groupId>org.eclipse.jetty</groupId> 196 <artifactId>jetty-alpn-java-server</artifactId> 197 </dependency> 198 <dependency> 199 <groupId>org.eclipse.jetty.http2</groupId> 200 <artifactId>http2-hpack</artifactId> 201 </dependency> 202 <dependency> 203 <groupId>software.amazon.awssdk</groupId> 204 <artifactId>aws-crt-client</artifactId> 205 <version>${awsjavasdk.version}</version> 206 <scope>compile</scope> 207 </dependency> 208 <dependency> 209 <groupId>commons-cli</groupId> 210 <artifactId>commons-cli</artifactId> 211 <scope>compile</scope> 212 </dependency> 213 </dependencies> 214 215 <dependencyManagement> 216 <dependencies> 217 <dependency> 218 <groupId>com.fasterxml.jackson.core</groupId> 219 <artifactId>jackson-databind</artifactId> 220 <version>${jackson.databind.version}</version> 221 </dependency> 222 <dependency> 223 <groupId>com.fasterxml.jackson.core</groupId> 224 <artifactId>jackson-core</artifactId> 225 <version>${jackson.version}</version> 226 </dependency> 227 <dependency> 228 <groupId>com.fasterxml.jackson.core</groupId> 229 <artifactId>jackson-annotations</artifactId> 230 <version>${jackson.version}</version> 231 </dependency> 232 <dependency> 233 <groupId>software.amazon.awssdk</groupId> 234 <artifactId>bom-internal</artifactId> 235 <version>${awsjavasdk.version}</version> 236 <type>pom</type> 237 <scope>import</scope> 238 </dependency> 239 <dependency> 240 <groupId>org.eclipse.jetty</groupId> 241 <artifactId>jetty-bom</artifactId> 242 <version>${jetty.version}</version> 243 <type>pom</type> 244 <scope>import</scope> 245 </dependency> 246 </dependencies> 247 </dependencyManagement> 248 249 <build> 250 <resources> 251 <resource> 252 <directory>src/main/resources</directory> 253 </resource> 254 </resources> 255 <pluginManagement> 256 <plugins> 257 <plugin> 258 <groupId>org.apache.maven.plugins</groupId> 259 <artifactId>maven-compiler-plugin</artifactId> 260 <version>3.1</version> 261 <!-- Override the configuration in the parent--> 262 <configuration combine.self="override"> 263 <compilerVersion>${javac.target}</compilerVersion> 264 <source>${javac.target}</source> 265 <target>${javac.target}</target> 266 </configuration> 267 <executions> 268 <execution> 269 <id>compile</id> 270 <phase>none</phase> 271 </execution> 272 </executions> 273 <inherited>false</inherited> 274 </plugin> 275 <plugin> 276 <artifactId>maven-clean-plugin</artifactId> 277 <version>3.1.0</version> 278 </plugin> 279 <plugin> 280 <artifactId>maven-deploy-plugin</artifactId> 281 <version>2.8.1</version> 282 </plugin> 283 <plugin> 284 <artifactId>maven-install-plugin</artifactId> 285 <version>2.5.1</version> 286 </plugin> 287 <plugin> 288 <artifactId>maven-jar-plugin</artifactId> 289 <version>2.4</version> 290 </plugin> 291 <plugin> 292 <artifactId>maven-javadoc-plugin</artifactId> 293 <version>2.9.1</version> 294 </plugin> 295 <plugin> 296 <artifactId>maven-resources-plugin</artifactId> 297 <version>2.6</version> 298 </plugin> 299 <plugin> 300 <artifactId>maven-site-plugin</artifactId> 301 <version>3.3</version> 302 </plugin> 303 <plugin> 304 <artifactId>maven-source-plugin</artifactId> 305 <version>2.2.1</version> 306 </plugin> 307 <plugin> 308 <artifactId>maven-surefire-plugin</artifactId> 309 <version>2.17</version> 310 </plugin> 311 </plugins> 312 </pluginManagement> 313 <plugins> 314 <plugin> 315 <groupId>org.apache.maven.plugins</groupId> 316 <artifactId>maven-compiler-plugin</artifactId> 317 </plugin> 318 <plugin> 319 <groupId>org.apache.maven.plugins</groupId> 320 <artifactId>maven-shade-plugin</artifactId> 321 <version>2.2</version> 322 <executions> 323 <execution> 324 <phase>package</phase> 325 <goals> 326 <goal>shade</goal> 327 </goals> 328 <configuration> 329 <finalName>${uberjar.name}</finalName> 330 <createDependencyReducedPom>false</createDependencyReducedPom> 331 <artifactSet> 332 <includes> 333 <include>*:*</include> 334 </includes> 335 </artifactSet> 336 <transformers> 337 <transformer 338 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> 339 <manifestEntries> 340 <Main-Class>org.openjdk.jmh.Main</Main-Class> 341 </manifestEntries> 342 </transformer> 343 <!-- This is important to run h2 server --> 344 <!-- https://github.com/jetty-project/embedded-jetty-live-war/blob/master/theserver/pom.xml --> 345 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> 346 </transformers> 347 <filters> 348 <filter> 349 <!-- 350 Shading signed JARs will fail without this. 351 http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar 352 --> 353 <artifact>*:*</artifact> 354 <excludes> 355 <exclude>META-INF/*.SF</exclude> 356 <exclude>META-INF/*.DSA</exclude> 357 <exclude>META-INF/*.RSA</exclude> 358 </excludes> 359 </filter> 360 </filters> 361 </configuration> 362 </execution> 363 </executions> 364 </plugin> 365 <plugin> 366 <groupId>org.codehaus.mojo</groupId> 367 <!-- Need to use exec not java see:http://mail.openjdk.java.net/pipermail/jmh-dev/2014-July/001192.html, https://stackoverflow.com/questions/15013651/using-maven-execexec-with-arguments --> 368 <artifactId>exec-maven-plugin</artifactId> 369 <version>${exec-maven-plugin.version}</version> 370 <configuration> 371 <executable>java</executable> 372 <arguments> 373 <argument>-classpath</argument> 374 <classpath/> 375 <argument>software.amazon.awssdk.benchmark.BenchmarkRunner</argument> 376 <!-- Fail process on failed benchmarks --> 377 <argument>-c</argument> 378 </arguments> 379 </configuration> 380 </plugin> 381 <plugin> 382 <groupId>com.github.spotbugs</groupId> 383 <artifactId>spotbugs-maven-plugin</artifactId> 384 <configuration> 385 <!-- Skipping spotbugs for the generated JMH classes--> 386 <skip>true</skip> 387 </configuration> 388 </plugin> 389 <plugin> 390 <groupId>org.apache.maven.plugins</groupId> 391 <artifactId>maven-dependency-plugin</artifactId> 392 <executions> 393 <execution> 394 <goals> 395 <goal>analyze-only</goal> 396 </goals> 397 </execution> 398 </executions> 399 <configuration> 400 <!-- Skipping maven dependencies analysis to speed up the build --> 401 <skip>true</skip> 402 </configuration> 403 </plugin> 404 </plugins> 405 </build> 406 407</project> 408