Remote ant any one please help

Help
2005-04-13
2013-04-24
  • raghurajang
    raghurajang
    2005-04-13

    Hi All,

    I have problem to remote ant make it working

    Here is what i did

    1. at my server i have my build.xml has with just one target
        as
               <target name="startAntServer">
                      <echo message="Starting Ant server"/>
                      <antserver port="1234" />
                  </target>

    2. and at my client machine build.xml have something like
    <target name="testRemoteAnt">
         <remoteant machine="remhost">
         <runant dir="/build.xml"  target="testTarget">
             </runant>
         </remoteant>
      </target>
       <target name="testTarget">
        <echo>test test test</echo>
       </target>

    3. Then from my server i ran ant startServer command
        it started the server
    4. Then from my client side i ran ant testRemoteant
        then it gives me the following error
        [remoteant] Command caused a build
    failure:net.sf.antcontrib.antserver.commands.RunAntCommand@3bce8de2

    5. When i ran them instead having 2 machines it works fine

    Please help me

     
    • xkoden
      xkoden
      2005-08-30

      I'm getting the exact same problem.  It runs fine on localhost, but when I put one on a different machine, it gives me that build failure!

      That totally defeats the purpose of having remoteant / antserver.  I don't know what is going wrong.

       
    • xkoden
      xkoden
      2005-08-31

      it could be a server side build failure.  It doesn't report it, but it's not runant causing the error.  Check the stuff on your server.

       
    • Thach Nguyen
      Thach Nguyen
      2006-08-14

      Could it be that you want to call runtarget instead of runant? Your runant task says to go to the target box and run an ant script at /build.xml (which means the build.xml file has to be at the root of the server machine).

      If you use runtarget then it should just run the target of the default script where the antserver is currently running. OR if as you have it with runant, then you can change the runant task as <runtask antfile="build.xml" target="testTarget">