Re: publish help

Jim Hague <[email protected]> Thu, 11 May 2006 09:30:35 +0100
Newsgroups gmane.comp.java.anthill
Message-ID <[email protected]>
On Thursday 11 May 2006 00:25, Scott Gardner wrote:
> Is there any examples of publish scripts out there? The examples do not set
> this property and short of looking in the source, I cannot find any
> information on it.

I believe (and I'm sure Eric will be along soon with the straight dope) that 
publish scripts are deprecated. The 'correct' thing to do these days is to 
publish from within your build.xml script. The publish directory is passed in 
by Anthill on the command line.

From one of my build scripts I find:

  <property name="deployDir" location="deploy"/>
  <property name="publish" location="${deployDir}"/>

This sets property 'publish' to the name of the passed-in publish directory, 
or to 'deploy' if none were passed. Later on I create a tar file with my 
build results:

    <!-- Create the publication directory -->
    <mkdir dir="${publish}"/>

    <!-- Create the gzipped tar in the publish directory -->
    <tar destfile="${publish}/${server-targz}" compression="gzip">
	...

This Works For Me.
-- 
Jim Hague - [email protected]          Never trust a computer you can't lift.