2 Copyright (c) 2014, Oracle America, Inc.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 * Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
11 * Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution.
15 * Neither the name of Oracle nor the names of its contributors may be used
16 to endorse or promote products derived from this software without
17 specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 THE POSSIBILITY OF SUCH DAMAGE.
32 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34 <modelVersion>4.0.0</modelVersion>
36 <groupId>org.jalview</groupId>
37 <artifactId>benchmarking</artifactId>
38 <version>1.0-SNAPSHOT</version>
39 <packaging>jar</packaging>
41 <name>JMH benchmark sample: Java</name>
44 This is the demo/sample template build script for building Java benchmarks with JMH.
51 <url>file://${project.basedir}/lib</url>
57 <groupId>org.openjdk.jmh</groupId>
58 <artifactId>jmh-core</artifactId>
59 <version>${jmh.version}</version>
62 <groupId>org.openjdk.jmh</groupId>
63 <artifactId>jmh-generator-annprocess</artifactId>
64 <version>${jmh.version}</version>
65 <scope>provided</scope>
68 <groupId>jalview.org</groupId>
69 <artifactId>jalview</artifactId>
70 <version>1.0</version>
75 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
78 JMH version to use with this project.
80 <jmh.version>1.19</jmh.version>
83 Java source/target to use for compilation.
85 <javac.target>1.8</javac.target>
88 Name of the benchmark Uber-JAR to generate.
90 <uberjar.name>benchmarks</uberjar.name>
96 <groupId>org.apache.maven.plugins</groupId>
97 <artifactId>maven-compiler-plugin</artifactId>
98 <version>3.1</version>
100 <compilerVersion>${javac.target}</compilerVersion>
101 <source>${javac.target}</source>
102 <target>${javac.target}</target>
106 <groupId>org.apache.maven.plugins</groupId>
107 <artifactId>maven-shade-plugin</artifactId>
108 <version>2.2</version>
111 <phase>package</phase>
116 <finalName>${uberjar.name}</finalName>
118 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
119 <mainClass>org.openjdk.jmh.Main</mainClass>
125 Shading signed JARs will fail without this.
126 http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
128 <artifact>*:*</artifact>
130 <exclude>META-INF/*.SF</exclude>
131 <exclude>META-INF/*.DSA</exclude>
132 <exclude>META-INF/*.RSA</exclude>
144 <artifactId>maven-clean-plugin</artifactId>
145 <version>2.5</version>
148 <artifactId>maven-deploy-plugin</artifactId>
149 <version>2.8.1</version>
152 <artifactId>maven-install-plugin</artifactId>
153 <version>2.5.1</version>
156 <artifactId>maven-jar-plugin</artifactId>
157 <version>2.4</version>
160 <artifactId>maven-javadoc-plugin</artifactId>
161 <version>2.9.1</version>
164 <artifactId>maven-resources-plugin</artifactId>
165 <version>2.6</version>
168 <artifactId>maven-site-plugin</artifactId>
169 <version>3.3</version>
172 <artifactId>maven-source-plugin</artifactId>
173 <version>2.2.1</version>
176 <artifactId>maven-surefire-plugin</artifactId>
177 <version>2.17</version>