Jenkins can't find the build.xml file

2,144 views
Skip to first unread message

Janez Novak

unread,
Aug 17, 2015, 7:17:18 AM8/17/15
to Jenkins Users
Hi,

I'm trying to build a simple example project (available here: http://eureka.ykyuen.info/2013/10/03/apache-ant-a-simple-ant-build-project/) just to see how Jenkins works (I'm new to it and Continuous Integration in general). I tried to do it by following a tutorial (available here: http://eureka.ykyuen.info/2013/10/04/jenkins-setup-a-simple-ant-build-project/).

When I start the build from Jenkins, the build fails and this is the build log:

---------------------------------------------------------------------------------------------------------------------------
Building in workspace /var/lib/jenkins/workspace/com-eureka
FATAL: Unable to find build script at /var/lib/jenkins/workspace/com-eureka/build.xml
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
---------------------------------------------------------------------------------------------------------------------------

As you can see, the name of my example project is "com-eureka", and it is located in the /var/lib/jenkins/workspace/ folder.
Based on the tutorial, the build.xml file should be located in the /var/lib/jenkins/workspace/com-eureka folder.
I've checked and the file is indeed there, but is seems as though Jenkins can't see it.

I'm running Jenkins on localhost, I'm using Ant (I tried with versions 1.9.2 and 1.9.6; I set the Jenkins configuration to download and install Ant automatically).

Daniel Beck

unread,
Aug 17, 2015, 7:28:38 AM8/17/15
to jenkins...@googlegroups.com
Could be a permissions issue. Make sure the user Jenkins runs as is owner of the workspace and everything in it.

Note that you generally want to check out everything from SCM (Subversion, Git,…) rather than prepare a workspace manually.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/66ea7048-2968-4a40-b49e-6e41694922e5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Walter Kelt

unread,
Aug 17, 2015, 7:34:14 AM8/17/15
to jenkins...@googlegroups.com
Does the file have proper permissions so that it is readable by Jenkins ?

Sent from my iPhone
--

Matic Pajnič

unread,
Aug 17, 2015, 7:57:06 AM8/17/15
to jenkins...@googlegroups.com
If I run jenkins on user X, then user X has to be the owner of the files? I'm asking because I also have a user called "jenkins", that's the default owner of the files Jenkins creates when operating.

The project files (including build.xml) are currently owned by user X.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/b3G4KdA2Fyo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/49BF8B70-F602-4CD6-8529-CA4AD057B408%40comcast.net.

Walter Kelt

unread,
Aug 17, 2015, 8:05:23 AM8/17/15
to jenkins...@googlegroups.com
To see if it you have a permissions issue, u can use chmod to set read permissions on the file for user/group/other. 

You could also use chown to set a different
Owner

Sent from my iPhone

Matic Pajnič

unread,
Aug 17, 2015, 8:22:09 AM8/17/15
to jenkins...@googlegroups.com
It was indeed a file permissions issue. I solved it by simply setting all the jenkins files and folders to be universally readable/writable.

Thx for helping :)

Reply all
Reply to author
Forward
0 new messages