ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Euan Guttridge <EGuttri...@buildonline.com>
Subject RE: Solaris script - invoked from - NT script
Date Thu, 11 Oct 2001 11:46:07 GMT
The problem was rsh did not invoke the profile, hence the env vars, so I
used your method, but still within the NT ant script which worked well.
Thanks.

<target name="backup_buildux03">
	<exec executable="rsh">
	<arg line="10.19.12.24 -l dmadmin JAVA_HOME=/usr;export
JAVA_HOME;set;/opt/Ant/jakarta-ant-1.4/bin/ant -buildfile
/export/home/dmadmin/ant_scripts/ant_backup_buildux03.xml" />
	</exec>
	
</target>

-----Original Message-----
From: Will Dyke [mailto:will.dyke@bbc.co.uk]
Sent: 11 October 2001 12:16
To: 'ant-user@jakarta.apache.org'
Subject: RE: Solaris script - invoked from - NT script


Could you not write a shell script that
sets these variables and invokes Ant?

e.g.

#!/bin/sh

ANT_HOME=/opt/Ant/jakarta-ant-1.4
JAVA_HOME=/path/to/java
export ANT_HOME JAVA_HOME

cd $ANT_HOME/bin

./ant -buildfile /export/home/dmadmin/ant_scripts/ant_backup_buildux03.xml



Will

> -----Original Message-----
> From: Euan Guttridge [mailto:EGuttridge@buildonline.com]
> Sent: 11 October 2001 12:10
> To: 'ant-user@jakarta.apache.org'
> Subject: Solaris script - invoked from - NT script
> 
> 
> Hi,
> 
> I am attempting to run an ant script on a Solaris machine, 
> invoked from an
> ant script on an NT machine. The only problem is that the 
> remote ant script
> does not recognise the local env variables of path and java_home when
> invoked from the NT script, hence I get the error msg below:
> 
> backup_buildux03:
>      [exec] Error: JAVA_HOME is not defined correctly.
>      [exec]   We cannot execute java
> 
> Path can be got round by simply specifying the full path to ant, but
> java_home? Can this be specified in the command line? Why 
> does this happen
> anyway?
> 
> 
> Points to note:
> 1) rsh security is not the problem
> 2) the ant script runs fine, when run locally on the solaris machine
> 3) the path and java_home vars are therefore fine on the local machine
> 
> 
> 
> NT Ant script:
> 
> <project name="Dev2_to_Staging2" default="backup_buildux03">
> 
> <target name="backup_buildux03">
> 	<exec executable="rsh">
> 	<arg line="10.3.19.24 -l dmadmin 
> /opt/Ant/jakarta-ant-1.4/bin/ant
> -buildfile 
> /export/home/dmadmin/ant_scripts/ant_backup_buildux03.xml" />
> 	</exec>
> 	
> </target>
> 
> </project>
> 
> 
> 
> Solaris Ant script:
> <project name="ant_backup_buildux03" default="TAR">
> 
> 
> <!-- SMETHODS TAR -->
> 
> <target name="tar_smethods">
> 
> 	<!-- set timestamp -->
> 	<tstamp/>	
> 
> 	<!-- tar webdocs -->
> 	<tar
> tarfile="/opt/documentum/product/4.0.5/bin/bol_servermethods/s
> methods_backup
> _${DSTAMP}_${TSTAMP}.tar"
> 	
> basedir="/opt/documentum/product/4.0.5/bin/bol_servermethods"
> 		excludes="smethods_backup*,smethods.tar"
> 	/>
> 	<!-- zip the tar file -->
> 	<gzip
> src="/opt/documentum/product/4.0.5/bin/bol_servermethods/smeth
> ods_backup_${D
> STAMP}_${TSTAMP}.tar" 
> 	
> zipfile="/opt/documentum/product/4.0.5/bin/bol_servermethods/s
> methods_backup
> _${DSTAMP}_${TSTAMP}.tar.gz"
> 	 />
> 	 <!-- delete the tar file, just keep the tar.gz file -->
> 	 <delete
> file="/opt/documentum/product/4.0.5/bin/bol_servermethods/smet
> hods_backup_${
> DSTAMP}_${TSTAMP}.tar" />
> 	 
> </target>
> 
> <!-- END OF SMETHODS TAR -->
> 
> 
> <target name="TAR"
> 		depends="tar_smethods">
> </target>
> 
> </project>
> 
> 


This e-mail, and any attachment, is confidential. If you have received
it in error, please delete it from your system, do not use or disclose
the information in any way, and notify me immediately. The contents of
this message may contain personal views which are not the views of the
BBC, unless specifically stated.

Mime
View raw message