pom.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!--
  2. Copyright (c) 2014, Oracle America, Inc.
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are met:
  6. * Redistributions of source code must retain the above copyright notice,
  7. this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. * Neither the name of Oracle nor the names of its contributors may be used
  12. to endorse or promote products derived from this software without
  13. specific prior written permission.
  14. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  15. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  16. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  17. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  18. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  19. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  20. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  21. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  22. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  23. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  24. THE POSSIBILITY OF SUCH DAMAGE.
  25. -->
  26. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  27. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  28. <modelVersion>4.0.0</modelVersion>
  29. <groupId>org.sample</groupId>
  30. <artifactId>test</artifactId>
  31. <version>1.0</version>
  32. <packaging>jar</packaging>
  33. <name>JMH benchmark sample: Java</name>
  34. <!--
  35. This is the demo/sample template build script for building Java benchmarks with JMH.
  36. Edit as needed.
  37. -->
  38. <prerequisites>
  39. <maven>3.0</maven>
  40. </prerequisites>
  41. <dependencies>
  42. <dependency>
  43. <groupId>org.openjdk.jmh</groupId>
  44. <artifactId>jmh-core</artifactId>
  45. <version>${jmh.version}</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.openjdk.jmh</groupId>
  49. <artifactId>jmh-generator-annprocess</artifactId>
  50. <version>${jmh.version}</version>
  51. <scope>provided</scope>
  52. </dependency>
  53. </dependencies>
  54. <properties>
  55. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  56. <jmh.version>1.5.2</jmh.version>
  57. <javac.target>1.6</javac.target>
  58. <uberjar.name>benchmarks</uberjar.name>
  59. </properties>
  60. <build>
  61. <plugins>
  62. <plugin>
  63. <groupId>org.apache.maven.plugins</groupId>
  64. <artifactId>maven-compiler-plugin</artifactId>
  65. <version>3.1</version>
  66. <configuration>
  67. <compilerVersion>${javac.target}</compilerVersion>
  68. <source>${javac.target}</source>
  69. <target>${javac.target}</target>
  70. </configuration>
  71. </plugin>
  72. <plugin>
  73. <groupId>org.apache.maven.plugins</groupId>
  74. <artifactId>maven-shade-plugin</artifactId>
  75. <version>2.2</version>
  76. <executions>
  77. <execution>
  78. <phase>package</phase>
  79. <goals>
  80. <goal>shade</goal>
  81. </goals>
  82. <configuration>
  83. <finalName>${uberjar.name}</finalName>
  84. <transformers>
  85. <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  86. <mainClass>org.openjdk.jmh.Main</mainClass>
  87. </transformer>
  88. </transformers>
  89. <filters>
  90. <filter>
  91. <!--
  92. Shading signed JARs will fail without this.
  93. http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
  94. -->
  95. <artifact>*:*</artifact>
  96. <excludes>
  97. <exclude>META-INF/*.SF</exclude>
  98. <exclude>META-INF/*.DSA</exclude>
  99. <exclude>META-INF/*.RSA</exclude>
  100. </excludes>
  101. </filter>
  102. </filters>
  103. </configuration>
  104. </execution>
  105. </executions>
  106. </plugin>
  107. </plugins>
  108. <pluginManagement>
  109. <plugins>
  110. <plugin>
  111. <artifactId>maven-clean-plugin</artifactId>
  112. <version>2.5</version>
  113. </plugin>
  114. <plugin>
  115. <artifactId>maven-deploy-plugin</artifactId>
  116. <version>2.8.1</version>
  117. </plugin>
  118. <plugin>
  119. <artifactId>maven-install-plugin</artifactId>
  120. <version>2.5.1</version>
  121. </plugin>
  122. <plugin>
  123. <artifactId>maven-jar-plugin</artifactId>
  124. <version>2.4</version>
  125. </plugin>
  126. <plugin>
  127. <artifactId>maven-javadoc-plugin</artifactId>
  128. <version>2.9.1</version>
  129. </plugin>
  130. <plugin>
  131. <artifactId>maven-resources-plugin</artifactId>
  132. <version>2.6</version>
  133. </plugin>
  134. <plugin>
  135. <artifactId>maven-site-plugin</artifactId>
  136. <version>3.3</version>
  137. </plugin>
  138. <plugin>
  139. <artifactId>maven-source-plugin</artifactId>
  140. <version>2.2.1</version>
  141. </plugin>
  142. <plugin>
  143. <artifactId>maven-surefire-plugin</artifactId>
  144. <version>2.17</version>
  145. </plugin>
  146. </plugins>
  147. </pluginManagement>
  148. </build>
  149. </project>