Why don't you use " antcontrib " for remote deployment, 

Your main build.xml file:

<!-- ================================================================ -->
<!-- Executing the build file on remote machine                       -->
<!-- ================================================================ -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
        <!-- depends="move-icp" -->
        <target name="remote-exe" description="Run the remote master build 
file">
                <remoteant machine="${remote.mc.name}" port="${remote.mc.port}">
                        <runtarget target="main-tar"/>
                </remoteant>
</target>

Your remote ant xml file:

<?xml version="1.0" encoding="iso-8859-1"?>
<project name="RunAntServer" default="start-ser" basedir=".">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>

<!-- ================================================================ -->
<!-- This will start the ANT RMI server                               -->
<!-- ================================================================ -->
        <target name="start-ser" description="Start ANT server">
                <echo>Running ANT server.....</echo>
                <antserver port="34567"/>
        </target>
        
<!-- ================================================================ -->
<!-- Give a call to clean target of master build file                 -->
<!-- ================================================================ -->
        <target name="remote-clean" description="Delete icp folder">
                <ant target="clean-icp" antfile="/usr/local/build.xml" />
        </target>

<!-- ================================================================ -->
<!-- Give a call to main target of master build file                  -->
<!-- ================================================================ -->
        <target name="main-tar">
                <ant target="build-all" antfile="/usr/local/build.xml"/>
        </target>

</project>


--Pritesh

-----Original Message-----
From: Dubois, Fabien [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 17, 2008 2:36 PM
To: Ant Users List
Subject: RE: Create a task to deploy in a remote server

To copy a war to the good folder (tomcat/webapps).
Now a trying to use : sshexec.
But I have problem to include the optional jar jsch-0.1.37.

Thank you for your help

-----Message d'origine-----
De : Steve Loughran [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 17 avril 2008 11:02
À : Ant Users List
Objet : Re: Create a task to deploy in a remote server

Dubois, Fabien wrote:
> Hi,
> 
>  
> 
> How can I create a task to deploy in a remote machine?
> 
>  
> 
> Thank you in advance :)

what do you mean by "deploy" ?

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the 
intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any 
part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this 
message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to