ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Euan Guttridge <EGuttri...@buildonline.com>
Subject Solaris script - invoked from - NT script
Date Thu, 11 Oct 2001 11:10:12 GMT
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/smethods_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/smethods_backup_${D
STAMP}_${TSTAMP}.tar" 
	
zipfile="/opt/documentum/product/4.0.5/bin/bol_servermethods/smethods_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/smethods_backup_${
DSTAMP}_${TSTAMP}.tar" />
	 
</target>

<!-- END OF SMETHODS TAR -->


<target name="TAR"
		depends="tar_smethods">
</target>

</project>



Mime
View raw message