Search code examples
spring-bootgradlenewman

Gradle Postman Runner plugin not found


Gradle + Spring Boot here. Trying to get the gradle-postman-runner plugin working. I add this to my build.gradle:

plugins {
    // ... other stuff up here
    id "com.moowork.node" version "1.3.1"
    id "com.github.michaelruocco.gradle-postman-runner"
}

node {
    download = true
}

postman {
    collections = fileTree(dir: 'src/test/resources/postman', include: '**/*.json')
}

My Postman collection is currently stored at src/test/resourcers/postman/MyApp.postman_collection.json).

When I run ./gradlew postman I get:

myuser@My-MacBook-Pro-15 myapp-ws % ./gradlew postman

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/myuser/workspace/myuser/myapp/repos/myapp-ws/app/build.gradle' line: 11

* What went wrong:
Plugin [id: 'com.github.michaelruocco.gradle-postman-runner'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 750ms

Anyone know why this isn't being found and what the fix is?


Solution

  • You are missing the version, the readme of the project is inaccurate:

    https://plugins.gradle.org/plugin/com.github.michaelruocco.gradle-postman-runner

    plugins {
      id("com.github.michaelruocco.gradle-postman-runner") version "0.1.4"
    }