To be honest, I have never tried invoking ant from the build step in
jenkins..I just took a look at it, but I don't see how this would be more
beneficial (or easier) for me, since I have everything already set up on
the slave machine...all I should be doing is executing an ant command to
run the script.

Is there some benefit to invoking ant in jenkins vs executing it from the
slave?

Thanks for your response.

-John P.


On Fri, May 2, 2014 at 2:48 AM, Richard Bywater <rich...@byh2o.com> wrote:

> Is thre a reason you aren't using an Ant Build Step and instead are doing
> it via a Batch script step?
>
> Richard.
>
>
> On Friday, May 2, 2014, John Park <john.p...@sightlinesystems.com> wrote:
>
>> Les, Mark,
>>
>> Thank you so much for you responses. I did verify that ANT_HOME is set
>> and in my PATH within my environment:
>> variables on the slave machine (I did an echo for %PATH%, and saw my the
>> path to my ANT bin folder).  I think the problem is that I am not
>> configuring the job correctly from the jenkins browser.  Here is what I did:
>>
>> After verifying that a Java Web Start connection was successful, I
>> created a new job, checked the 'Restrict where this project can be run'
>> box.
>>
>> I then added a new build step to execute a windows batch file.  I then
>> added the command:
>>
>> C:\Program Files\<apache-ant>\bin\ant.bat <path to build.xml> all
>>
>> This wouldn't work, so what I did next was throw some commands in another
>> .bat.  Here's what I had in the script:
>>
>> cd <path to build.xml>
>> ant all
>>
>> No dice, kept getting the following error:
>>
>> "C>:\<path to my .bat file>
>> The system cannot find the path specified.
>>
>> Would I need to have a set command in my bat file to point to my ANT_HOME
>> bin directory?
>>
>> Thanks,
>>
>> -John P.
>>
>>
>> On Thu, May 1, 2014 at 11:57 PM, Les Mikesell <lesmikes...@gmail.com>wrote:
>>
>>> On Thu, May 1, 2014 at 9:00 PM, Mark Waite <mark.earl.wa...@gmail.com>
>>> wrote:
>>> > The machine which is trying to execute your ant.bat file probably does
>>> not
>>> > have the Ant bin directory in its path.  Since it can't find the
>>> ant.bat
>>> > file, it fails.  There are a few approaches you might consider:
>>> >
>>> > - Modify the PATH on the Windows slave to include the Ant bin
>>> directory (the
>>> > location of ant.bat)
>>> > - Configure Jenkins to automatically install ant for you (global
>>> > configuration), then select that specific ant version in your job
>>> > - Start the Windows slave from a batch file that modifies the PATH to
>>> > include the Ant bin directory
>>> >
>>>
>>> It might be a little easier to follow things if you add at least 2 jdk
>>> and ant versions in your global config and set their locations in the
>>> node configurations (even if you don't currently need more than one of
>>> each...).  Then the job configuration will give you a version
>>> selection for  the tool versions and if anything isn't found you'll
>>> have a better idea of where the location is controlled.
>>>
>>> --
>>>    Les Mikesell
>>>      lesmikes...@gmail.com
>>>
>>> --
>>> 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/0ELSkd80t_Q/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> jenkinsci-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> 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-users+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> 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/0ELSkd80t_Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to