I'm using Jenkins to build a project. My build process is done through gradlew.
I set the gradlew location to:
/var/jenkins_home/workspace/project/X/Y/Z/projectname/gradlew build javadoc
My build fails with this error: Task 'javadoc' not found in root project 'project'.
This means that Jenkins is trying to execute my task from the directory /var/jenkins_home/workspace/project/ instead of /var/jenkins_home/workspace/project/X/Y/Z/projectname/.
I don't understand how Jenkins is executing a task from the wrong directory. Any input on this issue is appreciated!