like, in pseudocode, do you want to do this:
set servers = "\\my-server1\,\\my-server2,\\my-server3"
for each server
copy all files from this dir into {server}\thatdir
??
Marc
(in pseudocode):
DeployToServer("\\my-server")
DeployToServer("\\my-server2")
here goes:
<project name="macrodef" basedir=".">
<target name="init">
<property name="server1" location="spoofserver1" />
<property name="server2" location="spoofserver2" />
<property name="src" location="." />
</target>
<target name="clean" depends="init">
<!-- this sucks... duplication -->
<echo message="deleting target directories and recreating" />
<delete dir="${server1}" includeemptydirs="true" />
<delete dir="${server2}" includeemptydirs="true" />
<mkdir dir="${server1}" />
<mkdir dir="${server2}" />
</target>
<target name="deploy" depends="clean">
<copyToServer todir="${server1}" />
<copyToServer todir="${server2}" />
</target>
<macrodef name="copyToServer">
<attribute name="todir" default="." />
<sequential>
<echo message="Copying ${src} to @{todir}" />
<!-- your existing copy stuff would go here! -->
<copy todir="@{todir}" preservelastmodified="true" includeEmptyDirs="false">
<fileset dir="${src}" includes="**/*.*" />
</copy>
</sequential>
</macrodef>
</project>
http://www.thecrumb.com/wiki/Ant
In my main build script I use the input task to prompt me to select a
server to deploy to:
<input message="Where do you want to deploy to?"
validargs="${deploy.list}"
addproperty="deploy.server"
defaultvalue="${deploy.default}"/>
This pulls a list of my servers (deploy.list) and when selected writes
that to the deploy.server property.
I do the same thing with SVN - allowing the user to select a server and
what revision they want to deploy:
<input message="Enter revision (HEAD or number: Hit <enter> to
use default value of HEAD)" addproperty="svn.revision"
defaultvalue="HEAD" />
My Ant page on my Wiki is under a bit of construction but most links
work and if you run into anything that's broken just let me know and I
can get you what you need.
Jim
http://www.thecrumb.com/files/ant-presentation.zip
It includes a /jar directory which contains all the extra task .jar
files that I've found useful. I'm working on improving that even more -
just so it's super easy to grab all those and get running without
scouring the net trying to figure out what to download...
Jim
<input message="Where do you want to deploy to?"
validargs="${deploy.list}"
addproperty="deploy.server"
defaultvalue="${deploy.default}"/>
In an external property file I have my servers defined:
# enter locations you would like to deploy to deploy.server
deploy.list = KIRK, SPOCK
deploy.default = KIRK
Depending on what they pick I then include a server.property file which
has properties defined for just that server which I use to define my
paths where I'm going to copy files to:
<property file="${deploy.server}.properties"/>
Kirk.properties:
# properties for deployment to //kirk
deploy.uncpath = //kirk/${project.name}$
deploy.reseturl =
https://appdev.niehs.nih.gov/projectname/index.cfm?reset=true
More on my wiki:
http://www.thecrumb.com/wiki/ant#my_ant_buildfile_scripts
Jim
> -----Original Message-----
> From: Clarkee21 [mailto:Clar...@gmail.com]
> Sent: Tuesday, April 08, 2008 8:35 AM
> To: CFEclipse Users
> Subject: Re: ANT Permission problems
>
>