-1

With the Java microbenchmark harness, I have a project that builds and installs fine depending on a jar of functions that i'm benchmarking. The benchmark code is still in the JMH directory created from maven. This is all fine. Here are the pom.xml lines I added to get this to work:

<dependency>
    <groupId>zerog.util.grisu</groupId>
    <artifactId>grisu</artifactId>
    <scope>system</scope>
    <version>0.1</version>
    <systemPath>/home/jnordwick/workspace/zerog-grisu/zerog-grisu.jar</systemPath>
</dependency>

However, the constantly exporting a new jar is getting tiresome and I have made a couple mistakes which caused me to not run against changes I just made.

How can I make it so that JMH mvn clean install works against a directory of class files instead (i.e., the eclipse bin directory)?

Rafael Winterhalter
  • 42,759
  • 13
  • 108
  • 192
JasonN
  • 1,339
  • 1
  • 15
  • 27

1 Answers1

1

Make your project into a proper Maven-built one, and depend on it in your benchmarks. This will let Maven to package the classes from your project into JAR, and provide it as the dependency to the benchmark project.

This extends to almost any other sane build system with built-in dependency management, and you have to use one for just about any long-running project anyway.

Aleksey Shipilev
  • 18,599
  • 2
  • 67
  • 86
  • The thing you don't know about me, is that i suck horribly with maven or any build system too much more complex than make :/ Thanks I'll give it a try later. – JasonN Feb 03 '15 at 07:42