6
votes

I'm setting up Jenkins for the first time and running into an issue where Jenkins does not appear to even attempt to execute the Ant task I've specified.

I've defined my JDK and Ant installations under Manage Jenkins.(jenkins installations)

I've setup my Job to Invoke Ant using the Targets 'war-all'(job build)

Whether I force a build or wait for it to naturally execute after the next commit, there is nothing in the Build Console Output about attempting to execute the ant task.

Here is a sample Console Output:(console output)

Any ideas as to why it might not be executing would be appreciated. Also tips on how I can find more logging from Jenkins which might provide clues as to why it is not executing would be helpful. I'm not sure what Logger I might specify or even then where the logging information is written on the file system.

5
I can successfully run the ant target manually from the command line.Sarah Haskins
Have the same problem. Did you find a solution?Stas

5 Answers

3
votes

The problem was that I was selecting "Build multi-configuration project" as the type of my job. When I select "Build a free-style software project" as my job type the Ant task will execute after the SVN update.

0
votes

Looks like your svn doesn't see any changes and therefor is not re-building the module.

Try deleting the workspace and re-trigger the build, or change the check-out strategy to 'Always check out a fresh copy'.

0
votes

I faced the same problem when upgraded to 1.417 from 1.413.

The combobox "Ant version" disappeared from "Invoke ant" build step. It should be here.

I just downgraded to 1.413 and continue to work.

So, the answer is - you should specify "Ant version" in project settings. But you cannot do it in 1.417.

0
votes

It seems like Jenkins doesn't like when you create a job before configuring JDK. If that happens, job will never work properly. So, for me the solution was:

  1. Delete job.
  2. Configure JDK
  3. Re-create job.

Probably the same problem may arise when job's JDK is deleted.

0
votes

In my case,ant default target was not being picked up from build.xml so I had to explicitly mention the target in jenkins option. I resolved this by changing the jdk to default and then again switched to what was set earlier.This is a workaround but not sure how this resolved.