| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Copyright 2016-2017 JetBrains s.r.o. |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <project |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" |
| xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.jetbrains.kotlinx</groupId> |
| <artifactId>kotlinx-coroutines</artifactId> |
| <version>0.16-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>benchmarks</artifactId> |
| <packaging>jar</packaging> |
| |
| <properties> |
| <jmh.version>1.18</jmh.version> |
| <javac.target>1.8</javac.target> |
| <jmh.generator>default</jmh.generator> |
| <uberjar.name>benchmarks</uberjar.name> |
| <akka.version>2.0.2</akka.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.openjdk.jmh</groupId> |
| <artifactId>jmh-core</artifactId> |
| <version>${jmh.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.typesafe.akka</groupId> |
| <artifactId>akka-actor</artifactId> |
| <version>${akka.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.jetbrains.kotlinx</groupId> |
| <artifactId>kotlinx-coroutines-core</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.jetbrains.kotlinx</groupId> |
| <artifactId>kotlinx-coroutines-core</artifactId> |
| <version>${project.version}</version> |
| <classifier>tests</classifier> |
| </dependency> |
| </dependencies> |
| |
| <repositories> |
| <repository> |
| <id>typesafe</id> |
| <name>Typesafe Repository</name> |
| <url>http://repo.typesafe.com/typesafe/releases/</url> |
| </repository> |
| </repositories> |
| |
| <build> |
| <plugins> |
| <!-- |
| 1. Compile Kotlin sources first. |
| --> |
| |
| <plugin> |
| <artifactId>kotlin-maven-plugin</artifactId> |
| <groupId>org.jetbrains.kotlin</groupId> |
| <!-- |
| Put an approriate Kotlin compiler version here. |
| --> |
| <version>${kotlin.version}</version> |
| |
| <executions> |
| <execution> |
| <id>process-sources</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>compile</goal> |
| </goals> |
| <configuration> |
| <sourceDirs> |
| <sourceDir>${project.basedir}/src/main/kotlin</sourceDir> |
| </sourceDirs> |
| </configuration> |
| </execution> |
| |
| <execution> |
| <id>process-test-sources</id> |
| <phase>test-compile</phase> |
| <goals> |
| <goal>test-compile</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- |
| 2. Invoke JMH generators to produce benchmark code |
| --> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.2.1</version> |
| <executions> |
| <execution> |
| <phase>process-sources</phase> |
| <goals> |
| <goal>java</goal> |
| </goals> |
| <configuration> |
| <includePluginDependencies>true</includePluginDependencies> |
| <mainClass>org.openjdk.jmh.generators.bytecode.JmhBytecodeGenerator</mainClass> |
| <arguments> |
| <argument>${project.basedir}/target/classes/</argument> |
| <argument>${project.basedir}/target/generated-sources/jmh/</argument> |
| <argument>${project.basedir}/target/classes/</argument> |
| <argument>${jmh.generator}</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| <dependencies> |
| <dependency> |
| <groupId>org.openjdk.jmh</groupId> |
| <artifactId>jmh-generator-bytecode</artifactId> |
| <version>${jmh.version}</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| |
| <!-- |
| 3. Add JMH generated code to the compile session. |
| --> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>1.8</version> |
| <executions> |
| <execution> |
| <id>add-source</id> |
| <phase>process-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${project.basedir}/target/generated-sources/jmh</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- |
| 4. Compile JMH generated code. |
| --> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <version>3.1</version> |
| <configuration> |
| <compilerVersion>${javac.target}</compilerVersion> |
| <source>${javac.target}</source> |
| <target>${javac.target}</target> |
| <compilerArgument>-proc:none</compilerArgument> |
| </configuration> |
| </plugin> |
| |
| <!-- |
| 5. Package all the dependencies into the JAR |
| --> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <version>2.2</version> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <finalName>${uberjar.name}</finalName> |
| <transformers> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| <mainClass>org.openjdk.jmh.Main</mainClass> |
| </transformer> |
| </transformers> |
| <filters> |
| <filter> |
| <!-- |
| Shading signed JARs will fail without this. |
| http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar |
| --> |
| <artifact>*:*</artifact> |
| <excludes> |
| <exclude>META-INF/*.SF</exclude> |
| <exclude>META-INF/*.DSA</exclude> |
| <exclude>META-INF/*.RSA</exclude> |
| </excludes> |
| </filter> |
| </filters> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |