1 <!--
  2  Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
  3  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4 
  5  This code is free software; you can redistribute it and/or modify it
  6  under the terms of the GNU General Public License version 2 only, as
  7  published by the Free Software Foundation.
  8 
  9  This code is distributed in the hope that it will be useful, but WITHOUT
 10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  version 2 for more details (a copy is included in the LICENSE file that
 13  accompanied this code).
 14 
 15  You should have received a copy of the GNU General Public License version
 16  2 along with this work; if not, write to the Free Software Foundation,
 17  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18 
 19  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  or visit www.oracle.com if you need additional information or have any
 21  questions.
 22 -->
 23 
 24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 25          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 26     <modelVersion>4.0.0</modelVersion>
 27 
 28     <groupId>org.openjdk</groupId>
 29     <artifactId>bench</artifactId>
 30     <version>1.0</version>
 31     <packaging>jar</packaging>
 32 
 33     <name>JMH benchmarks</name>
 34 
 35     <dependencies>
 36         <dependency>
 37             <groupId>org.openjdk.jmh</groupId>
 38             <artifactId>jmh-core</artifactId>
 39             <version>${jmh.version}</version>
 40         </dependency>
 41         <dependency>
 42             <groupId>org.openjdk.jmh</groupId>
 43             <artifactId>jmh-generator-annprocess</artifactId>
 44             <version>${jmh.version}</version>
 45             <scope>provided</scope>
 46         </dependency>
 47     </dependencies>
 48 
 49     <properties>
 50         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 51 
 52         <!--
 53             JMH version to use with this project.
 54           -->
 55         <jmh.version>1.23</jmh.version>
 56 
 57         <!--
 58             Java source/target to use for compilation.
 59           -->
 60         <javac.target>19</javac.target>
 61 
 62         <!--
 63             Name of the benchmark Uber-JAR to generate.
 64           -->
 65         <uberjar.name>benchmarks</uberjar.name>
 66     </properties>
 67 
 68     <build>
 69 
 70         <sourceDirectory>.</sourceDirectory>
 71 
 72         <plugins>
 73             <plugin>
 74                 <groupId>org.apache.maven.plugins</groupId>
 75                 <artifactId>maven-compiler-plugin</artifactId>
 76                 <version>3.8.1</version>
 77                 <configuration>
 78                     <compilerVersion>${javac.target}</compilerVersion>
 79                     <source>${javac.target}</source>
 80                     <target>${javac.target}</target>
 81                      <compilerArgs>
 82                         <arg>--enable-preview</arg>
 83                         <arg>--add-exports</arg><arg>java.base/jdk.internal.vm=ALL-UNNAMED</arg>
 84                         <arg>--add-exports</arg><arg>java.base/sun.security.util=ALL-UNNAMED</arg>
 85                     </compilerArgs>
 86                 </configuration>
 87             </plugin>
 88             <plugin>
 89                 <groupId>org.apache.maven.plugins</groupId>
 90                 <artifactId>maven-shade-plugin</artifactId>
 91                 <version>3.2.3</version>
 92                 <executions>
 93                     <execution>
 94                         <phase>package</phase>
 95                         <goals>
 96                             <goal>shade</goal>
 97                         </goals>
 98                         <configuration>
 99                             <finalName>${uberjar.name}</finalName>
100                             <transformers>
101                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
102                                     <mainClass>org.openjdk.jmh.Main</mainClass>
103                                 </transformer>
104                             </transformers>
105                             <filters>
106                                 <filter>
107                                     <!--
108                                         Shading signed JARs will fail without this.
109                                         http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
110                                     -->
111                                     <artifact>*:*</artifact>
112                                     <excludes>
113                                         <exclude>META-INF/*.SF</exclude>
114                                         <exclude>META-INF/*.DSA</exclude>
115                                         <exclude>META-INF/*.RSA</exclude>
116                                     </excludes>
117                                 </filter>
118                             </filters>
119                         </configuration>
120                     </execution>
121                 </executions>
122             </plugin>
123         </plugins>
124         <pluginManagement>
125             <plugins>
126                 <plugin>
127                     <artifactId>maven-clean-plugin</artifactId>
128                     <version>3.1.0</version>
129                 </plugin>
130                 <plugin>
131                     <artifactId>maven-deploy-plugin</artifactId>
132                     <version>3.0.0-M1</version>
133                 </plugin>
134                 <plugin>
135                     <artifactId>maven-install-plugin</artifactId>
136                     <version>3.0.0-M1</version>
137                 </plugin>
138                 <plugin>
139                     <artifactId>maven-jar-plugin</artifactId>
140                     <version>3.1.0</version>
141                 </plugin>
142                 <plugin>
143                     <artifactId>maven-javadoc-plugin</artifactId>
144                     <version>3.0.0-M1</version>
145                 </plugin>
146                 <plugin>
147                     <artifactId>maven-resources-plugin</artifactId>
148                     <version>3.1.0</version>
149                 </plugin>
150                 <plugin>
151                     <artifactId>maven-site-plugin</artifactId>
152                     <version>3.7.1</version>
153                 </plugin>
154                 <plugin>
155                     <artifactId>maven-source-plugin</artifactId>
156                     <version>3.0.1</version>
157                 </plugin>
158                 <plugin>
159                     <artifactId>maven-surefire-plugin</artifactId>
160                     <version>3.0.0-M3</version>
161                 </plugin>
162             </plugins>
163         </pluginManagement>
164     </build>
165 
166 </project>