ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: 1 Questions in ANT
Date Fri, 03 Mar 2006 19:17:35 GMT
I'm not exactly clear on your question...So you are deploying something
to both windows (locally) and linux (remote machine). Let me offer my 2
cents.

I prefer to deploy things, regardless of the OS and local/remote, in the
same exact way. In other words, consider using ftp (or better yet scp)
to deploy in all cases, local or remote. You would have to configure ftp
(or ssh server) on your local windows box, but there is a clear
advantage to this approach. You will be running the same tasks and Ant
will be doing the exact same thing during the deployment, regardless of
the destination. To facilitate this, I would create a properties file
for the environment that is loaded for environment specific
properties... like hostname, remote dir, etc. To deploy to multiple
environments at once, you can loop over a list of environments with the
ant-contrib <foreach> task.

Hope this helps.

-Rob Anderson

> -----Original Message-----
> From: Karthik [mailto:karthikn@xius.org] 
> Sent: Thursday, March 02, 2006 11:54 PM
> To: user@ant.apache.org
> Subject: 1 Questions in ANT
> 
> Hi form
> 
>   I have 1 Questions
> 
>   1)I have a "build.xml" file with  many normal targets,
>     But for LINUX - OS with same build.xml , Do i need to Add 
> the FTP tasks for EACH of the targets
>     or is there an feature avaliable in ANT.
> 
>     ex:-
> 
>       Source OS using ANT to Copy is         : "windows"
>       Destination OS of each target may be   : "windows  or 
> Linux Systems"
> 
> 
>       build.xml is as follows....
> 
>       <target name="01JAN2005">
>   	<copy todir="${dest.dir}">
>       <fileset dir="${src.dir}/*"/>
>   	</copy>
>  	</target>
> 
>       <target name="15JAN2005" depends="15JAN2005">
>     	<copy todir="${dest.dir}">
>     	<fileset dir="${src.dir}/*"/>
>     	</copy>
>       </target>
> 
>         ----
> 
> 
>       <target name="01JAN2005" >
> 	  <fileset dir="${libs}">
> 	  <include name="**/*.jar"/>
> 	  </fileset>
> 	  <ftp server="${ftptype}"
> 	       remotedir="${ftpremotedir}"
> 	       userid="${ftpid}"
> 	       password="${ftppas}"
> 	       separator="/"
> 	       action="put">
> 
> 	     <fileset dir="${src.dir}">
> 		<include name="**/*"/>
> 	      </fileset>
> 	   </ftp>
> 	</target>
> 
> 
> 
>       <target name="15JAN2005" >
> 	  <fileset dir="${libs}">
> 	  <include name="**/*.jar"/>
> 	  </fileset>
> 	  <ftp server="${ftptype}"
> 	       remotedir="${ftpremotedir}"
> 	       userid="${ftpid}"
> 	       password="${ftppas}"
> 	       separator="/"
> 	       action="put">
> 
> 	     <fileset dir="${src.dir}">
> 		<include name="**/*"/>
> 	      </fileset>
> 	   </ftp>
> 	</target>
> 
> 
> Please some body help me
> 
> 
> 
> with regards
> Karthik
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message