user518066
user518066

Reputation: 1417

Gradle publishToMavenLocal

When I use gradle clean build publishToMavenLocal with

publishing {
    publications {
        maven(MavenPublication) {
            from components.java
        }
    }
} 

using gradle 7.1. It works on local gradle build. However, when I run on Jenkins, I get:

org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
Perhaps you forgot to surround the code with a step that provides this, such as: node

When, I comment out the publishing section in build.gradle it works in Jenkins.

Any ideas?

Thanks

Upvotes: 0

Views: 184

Answers (1)

Cisco
Cisco

Reputation: 22952

Publishing to Maven local requires disk space, or working space.

Based on: https://support.cloudbees.com/hc/en-us/articles/4402585187483-How-to-troubleshoot-hudson-FilePath-is-missing-in-a-Pipeline-run

Upvotes: 1

Related Questions