Skip to content

Commit 7be01d1

Browse files
committed
add JMH sample
1 parent 0ae1f58 commit 7be01d1

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

spring-boot-example/pom.xml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@
301301
<groupId>org.openjdk.jmh</groupId>
302302
<artifactId>jmh-core</artifactId>
303303
<version>${jmh-core.version}</version>
304-
<scope>test</scope>
305304
</dependency>
306305
<dependency>
307306
<groupId>org.openjdk.jmh</groupId>
@@ -412,6 +411,36 @@
412411
<format>html</format>
413412
</configuration>
414413
</plugin>
414+
415+
<plugin>
416+
<artifactId>maven-dependency-plugin</artifactId>
417+
<executions>
418+
<execution>
419+
<id>build-classpath</id>
420+
<goals>
421+
<goal>build-classpath</goal>
422+
</goals>
423+
<configuration>
424+
<includeScope>runtime</includeScope>
425+
<outputProperty>depClasspath</outputProperty>
426+
</configuration>
427+
</execution>
428+
</executions>
429+
</plugin>
430+
<plugin>
431+
<groupId>org.codehaus.mojo</groupId>
432+
<artifactId>exec-maven-plugin</artifactId>
433+
<version>3.0.0</version>
434+
<configuration>
435+
<mainClass>de.rieckpil.blog.jmh.StringConcatenationBenchmark</mainClass>
436+
<systemProperties>
437+
<systemProperty>
438+
<key>java.class.path</key>
439+
<value>${project.build.outputDirectory}${path.separator}${depClasspath}</value>
440+
</systemProperty>
441+
</systemProperties>
442+
</configuration>
443+
</plugin>
415444
</plugins>
416445
</build>
417446
</project>

0 commit comments

Comments
 (0)