# Gradlew Jenkins pipeline

**URL:** <https://discuss.gradle.org/t/gradlew-jenkins-pipeline/35638>\
**Category:** Help/Discuss\
**Created:** [April 10, 2020, 2:19pm UTC](https://discuss.gradle.org/t/gradlew-jenkins-pipeline/35638 "2020-04-10T14:19:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thepowderriverfarrie](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@thepowderriverfarrie](https://discuss.gradle.org/u/thepowderriverfarrie)\
**Post date:** [April 10, 2020, 2:19pm UTC](https://discuss.gradle.org/t/gradlew-jenkins-pipeline/35638/1 "2020-04-10T14:19:52Z")

</div>

Gradlew runs on the Ubuntu server just fine. When calling ./gradlew --help from a test script in the Jenkins pipeline it runs fine. When calling a task from the build.gradle file however it fails with the error:

Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory()

Any insight to a solution would be appreciated.

---

<div class="post-metadata">

**Author:** ![Stefan\_Wolf](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/stefan_wolf/32/5519_2.png) [@Stefan\_Wolf](https://discuss.gradle.org/u/Stefan_Wolf)\
**Post date:** [June 8, 2020, 7:33am UTC](https://discuss.gradle.org/t/gradlew-jenkins-pipeline/35638/2 "2020-06-08T07:33:49Z")

</div>

Hi Dan,

it may be that the home directory set for the user running Gradle is not writable. A stack trace for the error you are seeing would be helpful to get a better idea what is wrong.

Cheers,  
Stefan
