Ant does not installed

1,056 views
Skip to first unread message

Mustafa Suha Botsali

unread,
Jul 8, 2011, 8:53:26 AM7/8/11
to jenkins...@googlegroups.com
Hi I have

jenkins-war:1.418 on RHEL 5.5 i couldn t  get ant to run.
I have old installation of hudson and when I look at tools folder
I see an ant. But for  jenkins automatic install does not start from apache site.
So there is nothing in my tools folder. I tried to copy ant from old hudson installation
but it doesn't work either.

I still gives me the error below.

"[workspace] $ ant -file build.xml -lib /var/lib/jenkins/plugins/artifactory/WEB-INF/lib -listener org.jfrog.build.extractor.listener.ArtifactoryBuildListener
FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations?
java.io.IOException: Cannot run program "ant" (in directory "/var/lib/jenkins/jobs/basarioykusu-ant/workspace"): java.io.IOException: error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:698)
	at hudson.Launcher$ProcStarter.start(Launcher.java:329)
	at hudson.Launcher$ProcStarter.join(Launcher.java:336)
	at hudson.tasks.Ant.perform(Ant.java:216)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:664)
	at hudson.model.Build$RunnerImpl.build(Build.java:177)
	at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:430)
	at hudson.model.Run.run(Run.java:1376)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:175)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
	at java.lang.ProcessImpl.start(ProcessImpl.java:81)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
	... 15 more
Build step 'Invoke Ant' marked build as failure 
Finished: FAILURE"


What can I do  to get ant work ?

Thanks.

Rob Petti

unread,
Jul 8, 2011, 10:54:12 AM7/8/11
to jenkins...@googlegroups.com
Looks like you just need to configure an ant installation on the Jenkins configuration page. http://JENKINSURL/configure. Then just configure your job to use it.

Sami Tikka

unread,
Jul 10, 2011, 4:41:07 PM7/10/11
to jenkins...@googlegroups.com
How long did you wait before declaring "automatic install does not
start"? It takes around 30 minutes to install Ant automatically or at
least it does for me. It is a bit strange, but it has always worked if
I just wait long enough.

-- Sami

2011/7/8 Mustafa Suha Botsali <bot...@gmail.com>:

Mustafa Suha Botsali

unread,
Jul 11, 2011, 5:14:42 AM7/11/11
to jenkins...@googlegroups.com
Hello

I tried many configurations. I also waited for 30 mins. But it doesn t work either. There is no clue for starting download in Jenkins.log.
 I do not know the problem. I had hudson installed before, jenkins imported old hudson  home without asking (/var/lib/hudson to /var/lib/jenkins) I moved /var/lib/jenkins to /var/lib/jenkins-old  don  t know maybe that is the problem. But I forced from rpm to install again. It created /var/lib/jenkins and it started working. 

I did all of these to use new artifactory plugin. But ant doesn t work . 

Later I putted red lines below into config.xml and it doesn t give same error again. But whenever I make a change in project configuration,red lines disappear. And there is no menu for to choose in project configuration to determine which ant to use.
 
<hudson.tasks.Ant>
      <targets></targets>
      <antName>localant</antName>
      <antOpts>-classpath /usr/local/apache-tomcat-7.0.14</antOpts>
      <buildFile>build.xml</buildFile>
    </hudson.tasks.Ant>

Thanks.

Mustafa Suha Botsali

unread,
Jul 11, 2011, 7:07:08 AM7/11/11
to jenkins...@googlegroups.com
After I upgraded to Jenkins 1.419 problem solved.
I should read the changelog more carefully.

Thanks.
Reply all
Reply to author
Forward
0 new messages