changeset 1332:fa510264b3f6

7901739: Update benchmark archetypes: Java version, suggested plugin versions, etc
author shade
date Thu, 21 Jul 2016 17:42:20 +0300
parents eead74fabfb4
children c698f6c0e0fc
files jmh-archetypes/jmh-groovy-benchmark-archetype/src/main/resources/archetype-resources/pom.xml jmh-archetypes/jmh-groovy-benchmark-archetype/src/test/resources/projects/test/archetype.properties jmh-archetypes/jmh-groovy-benchmark-archetype/src/test/resources/projects/test/goal.txt jmh-archetypes/jmh-java-benchmark-archetype/src/main/resources/archetype-resources/pom.xml jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/pom.xml jmh-archetypes/jmh-scala-benchmark-archetype/src/main/resources/archetype-resources/pom.xml jmh-archetypes/jmh-scala-benchmark-archetype/src/test/resources/projects/test/archetype.properties jmh-archetypes/jmh-scala-benchmark-archetype/src/test/resources/projects/test/goal.txt
diffstat 8 files changed, 119 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-archetypes/jmh-groovy-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:02:51 2016 +0300
+++ b/jmh-archetypes/jmh-groovy-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:42:20 2016 +0300
@@ -49,10 +49,11 @@
             <artifactId>jmh-core</artifactId>
             <version>\${jmh.version}</version>
         </dependency>
-        <!--
-           Put the dependency on Groovy here:
-             org.codehaus.groovy:groovy:2.2.2 is on of the possible dependencies
-         -->
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy</artifactId>
+            <version>\${groovy.version}</version>
+        </dependency>
     </dependencies>
 
     <prerequisites>
@@ -61,9 +62,35 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+        <!--
+            JMH version to use with this project.
+          -->
         <jmh.version>${project.version}</jmh.version>
-        <jmh.generator>default</jmh.generator>  <!-- or "asm", or "reflection" -->
-        <javac.target>1.6</javac.target>
+
+        <!--
+            Java source/target to use for compilation.
+          -->
+        <javac.target>1.8</javac.target>
+
+        <!--
+           Put an approriate Groovy version here.
+           Available versions are listed here:
+               https://mvnrepository.com/artifact/org.codehaus.groovy/groovy
+         -->
+        <groovy.version>2.4.7</groovy.version>
+
+        <!--
+            Select a JMH benchmark generator to use. Available options:
+               default:    whatever JMH chooses by default;
+               asm:        parse bytecode with ASM;
+               reflection: load classes and use Reflection over them;
+          -->
+        <jmh.generator>default</jmh.generator>
+
+        <!--
+            Name of the benchmark Uber-JAR to generate.
+          -->
         <uberjar.name>benchmarks</uberjar.name>
     </properties>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-archetypes/jmh-groovy-benchmark-archetype/src/test/resources/projects/test/archetype.properties	Thu Jul 21 17:42:20 2016 +0300
@@ -0,0 +1,4 @@
+groupId=org.openjdk.jmh
+artifactId=jmh-groovy-benchmark-archetype-test
+version=1.0-SNAPSHOT
+package=org.openjdk.jmh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-archetypes/jmh-groovy-benchmark-archetype/src/test/resources/projects/test/goal.txt	Thu Jul 21 17:42:20 2016 +0300
@@ -0,0 +1,1 @@
+verify
\ No newline at end of file
--- a/jmh-archetypes/jmh-java-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:02:51 2016 +0300
+++ b/jmh-archetypes/jmh-java-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:42:20 2016 +0300
@@ -65,8 +65,20 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+        <!--
+            JMH version to use with this project.
+          -->
         <jmh.version>${project.version}</jmh.version>
-        <javac.target>1.6</javac.target>
+
+        <!--
+            Java source/target to use for compilation.
+          -->
+        <javac.target>1.8</javac.target>
+
+        <!--
+            Name of the benchmark Uber-JAR to generate.
+          -->
         <uberjar.name>benchmarks</uberjar.name>
     </properties>
 
--- a/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:02:51 2016 +0300
+++ b/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:42:20 2016 +0300
@@ -63,15 +63,35 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+        <!--
+            JMH version to use with this project.
+          -->
         <jmh.version>${project.version}</jmh.version>
-        <jmh.generator>default</jmh.generator>  <!-- or "asm", or "reflection" -->
-        <javac.target>1.6</javac.target>
+
+        <!--
+            Java source/target to use for compilation.
+          -->
+        <javac.target>1.8</javac.target>
+
         <!--
            Put an approriate Kotlin compiler and stdlib version here.
            Available versions are listed here:
                 http://kotlinlang.org/docs/reference/using-maven.html#plugin-and-versions
          -->
         <kotlin.version>1.0.2</kotlin.version>
+
+        <!--
+            Select a JMH benchmark generator to use. Available options:
+               default:    whatever JMH chooses by default;
+               asm:        parse bytecode with ASM;
+               reflection: load classes and use Reflection over them;
+          -->
+        <jmh.generator>default</jmh.generator>
+
+        <!--
+            Name of the benchmark Uber-JAR to generate.
+          -->
         <uberjar.name>benchmarks</uberjar.name>
     </properties>
 
--- a/jmh-archetypes/jmh-scala-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:02:51 2016 +0300
+++ b/jmh-archetypes/jmh-scala-benchmark-archetype/src/main/resources/archetype-resources/pom.xml	Thu Jul 21 17:42:20 2016 +0300
@@ -49,10 +49,11 @@
             <artifactId>jmh-core</artifactId>
             <version>\${jmh.version}</version>
         </dependency>
-        <!--
-            Put the appropriate dependency on scala-library here:
-              org.scala-lang:scala-library:2.10.3 is one of the choices.
-          -->
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+            <version>\${scala.stdLib.version}</version>
+        </dependency>
     </dependencies>
 
     <prerequisites>
@@ -61,9 +62,42 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+        <!--
+            JMH version to use with this project.
+          -->
         <jmh.version>${project.version}</jmh.version>
-        <jmh.generator>default</jmh.generator>  <!-- or "asm", or "reflection" -->
-        <javac.target>1.6</javac.target>
+
+        <!--
+            Java source/target to use for compilation.
+          -->
+        <javac.target>1.8</javac.target>
+
+        <!--
+            Put an approriate Scala stdlib version here.
+            Available versions are listed here:
+               https://mvnrepository.com/artifact/org.scala-lang/scala-library
+        -->
+        <scala.stdLib.version>2.11.8</scala.stdLib.version>
+
+        <!--
+            Put an appropriate Scala Maven plugin version here.
+            Available versions can be spotted here:
+               https://mvnrepository.com/artifact/net.alchim31.maven/scala-maven-plugin
+         -->
+        <scala.mavenPlugin.version>3.2.2</scala.mavenPlugin.version>
+
+        <!--
+            Select a JMH benchmark generator to use. Available options:
+               default:    whatever JMH chooses by default;
+               asm:        parse bytecode with ASM;
+               reflection: load classes and use Reflection over them;
+          -->
+        <jmh.generator>default</jmh.generator>
+
+        <!--
+            Name of the benchmark Uber-JAR to generate.
+          -->
         <uberjar.name>benchmarks</uberjar.name>
     </properties>
 
@@ -102,7 +136,7 @@
             <plugin>
                 <groupId>net.alchim31.maven</groupId>
                 <artifactId>scala-maven-plugin</artifactId>
-                <version>3.1.6</version>
+                <version>\${scala.mavenPlugin.version}</version>
                 <configuration>
                     <recompileMode>incremental</recompileMode>
                 </configuration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-archetypes/jmh-scala-benchmark-archetype/src/test/resources/projects/test/archetype.properties	Thu Jul 21 17:42:20 2016 +0300
@@ -0,0 +1,4 @@
+groupId=org.openjdk.jmh
+artifactId=jmh-scala-benchmark-archetype-test
+version=1.0-SNAPSHOT
+package=org.openjdk.jmh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-archetypes/jmh-scala-benchmark-archetype/src/test/resources/projects/test/goal.txt	Thu Jul 21 17:42:20 2016 +0300
@@ -0,0 +1,1 @@
+verify
\ No newline at end of file