Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle jmh error #217

Open
jonyangx opened this issue Jan 10, 2022 · 1 comment
Open

gradle jmh error #217

jonyangx opened this issue Jan 10, 2022 · 1 comment

Comments

@jonyangx
Copy link

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:

  1. gradle clean jmh
  2. 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!

@KarboniteKream
Copy link

KarboniteKream commented Jan 29, 2022

As the error says, you have not defined any repositories. You can add the following to your build.gradle

repositories {
    mavenCentral()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants