jmh-gradle-plugin
jmh-gradle-plugin copied to clipboard
gradle jmh error
Describe the bug
- What went wrong: Execution failed for task ':jmhRunBytecodeGenerator'.
Could not resolve all files for configuration ':jmh'. Cannot resolve external dependency org.openjdk.jmh:jmh-core:1.29 because no repositories are defined. Required by: project : Cannot resolve external dependency org.openjdk.jmh:jmh-generator-bytecode:1.29 because no repositories are defined. Required by: project :
build.gradle classpath "me.champeau.jmh:jmh-gradle-plugin:0.6.6"
ependencies {
api group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: '1.34'
api group: 'org.openjdk.jmh', name: 'jmh-core', version: '1.34'
}
apply plugin: "me.champeau.jmh"
jmh {
includes = ['.*Benchmark']
warmupIterations.set(2)
iterations.set(2)
fork.set(2)
includeTests = true
}
To Reproduce Steps to reproduce the behavior:
- gradle clean jmh
- See error
Bugs reported with a simple, minimal example are more likely to be fixed quickly than bugs without reproducers: figuring out a way to reproduce your problem is often what takes most time, so anything you can do to provide the minimal reproducible example, ideally in form of a test case, is welcome!
As the error says, you have not defined any repositories. You can add the following to your build.gradle
repositories {
mavenCentral()
}